Skip to content

Feast Serving should notify users of invalid feature names #454

Description

@woop

Expected Behavior

When requesting for a non-existing feature the user should be informed if the feature does not exist.

Current Behavior

When running the below (there is no version 3)

online_features = client.get_online_features(
    feature_refs=[
        f"daily_transactions:3",
        f"total_transactions:3",
    ],
    entity_rows=[
        GetOnlineFeaturesRequest.EntityRow(
            fields={
                "customer_id": Value(
                    int64_val=1001)
            }
        )
    ],
)
print(online_features)

the user sees

InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
	status = StatusCode.UNKNOWN
	details = ""
	debug_error_string = "{"created":"@1580607090.708289999","description":"Error received from peer ipv4:172.28.0.8:6566","file":"src/core/lib/surface/call.cc","file_line":1056,"grpc_message":"","grpc_status":2}"
>

But Feast Serving does know what the exception is

2020-02-02 01:31:30.703  WARN 690ef6bd9e82 --- [ault-executor-1] f.s.c.ServingServiceGRpcController       : Failed to get Online Features
feast.serving.exception.SpecRetrievalException: Unable to retrieve feature project: "customer_project"
name: "daily_transactions"
version: 3

        at feast.serving.specs.CachedSpecService.lambda$getFeatureSets$0(CachedSpecService.java:120)
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
        at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
        at feast.serving.specs.CachedSpecService.getFeatureSets(CachedSpecService.java:124)
        at feast.serving.service.RedisServingService.getOnlineFeatures(RedisServingService.java:96)
        at feast.serving.controller.ServingServiceGRpcController.getOnlineFeatures(ServingServiceGRpcController.java:73)
        at feast.serving.ServingServiceGrpc$MethodHandlers.invoke(ServingServiceGrpc.java:495)
        at io.grpc.stub.ServerCalls$UnaryServerCallHandler$UnaryServerCallListener.onHalfClose(ServerCalls.java:171)
        at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.halfClosed(ServerCallImpl.java:283)
        at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1HalfClosed.runInContext(ServerImpl.java:710)
        at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
        at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

Steps to reproduce

Simply request a feature from online serving that does not exist.

Possible Solution

This is a matter of looking at the exception handling inside Feast Serving's handler.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions