Skip to content

Feast Serving should notify users of invalid feature names #454

Closed

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.

Activity

  1. ches commented on Feb 14, 2020

    @ches
    Member

    Related to #278, this one is classified as a bug but it might be that the enhancement requested in #278 answers what the behavior should be in this error case.

  2. woop commented on Feb 15, 2020

    @woop
    MemberAuthor

    Related to #278, this one is classified as a bug but it might be that the enhancement requested in #278 answers what the behavior should be in this error case.

    I think these are different, but could potentially be solved in one go.

    This error should occur if the user provides the wrong feature reference or the feature reference has not propagated to a Serving deployment from Core. #278 assumes references are present but only a subset of data is returned.

    Whether #278 and #454 are solved in the same way will come down to how we implement metadata that is returned about the request. The easiest for now is to separate these two.

    1. Fail if a reference is missing (but be descriptive)
    2. Return metadata about missing data (described in Return missing feature metadata in response #278)

    In theory we could return (1) as metadata (error codes?) in (2), but structuring this response will be a bit of an art.

  3. self-assigned this
    on Apr 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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