Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove historical feature in serving store #87

Merged
merged 8 commits into from
Feb 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 20 additions & 56 deletions protos/feast/serving/Serving.proto
Original file line number Diff line number Diff line change
Expand Up @@ -26,73 +26,37 @@ option java_outer_classname = "ServingAPIProto";
option go_package = "github.com/gojek/feast/protos/generated/go/feast/serving";

service ServingAPI {
// Query features from Feast
rpc QueryFeatures (QueryFeatures.Request) returns (QueryFeatures.Response) {};
// Query features from Feast serving storage
rpc QueryFeatures (QueryFeaturesRequest) returns (QueryFeaturesResponse) {};
}

message QueryFeatures {
message Request {
// e.g. "driver", "customer", "city".
string entityName = 1;
// List of entity ID.
repeated string entityId = 2;
// List of request details, contains: featureId, type of query, and limit.
repeated RequestDetail requestDetails = 3;
// Filter specifying only to retrieve features having timestamp within this range.
TimestampRange timestampRange = 4;
}

message Response {
// e.g. "driver", "customer", "city".
string entityName = 1;
// map of entity ID and its entity's properties.
map<string, Entity> entities = 2;
}
}

message RequestDetail {
// feature ID to be included in the query.
message QueryFeaturesRequest {
// e.g. "driver", "customer", "city".
string entityName = 1;
// List of entity ID.
repeated string entityId = 2;
// List of feature ID.
// feature ID is in the form of [entity_name].[granularity].[feature_name]
// e.g: "driver.day.total_accepted_booking"
// all requested feature ID shall have same entity name.
string featureId = 1;
// request type either LAST or LIST.
// LAST : return only the latest value based on timestamp.
// LIST : return list of historical data sorted by timestamp.
RequestType type = 2;
// only applicable to LIST.
// length of the returned list <= limit.
// default = 0
int32 limit = 3;
}

enum RequestType {
// LAST : return only the latest value based on timestamp. (default)
LAST = 0;
// LIST : return list of historical data sorted by timestamp.
LIST = 1;
repeated string featureId = 3;
}

// range of timestamp for querying
// valid timestamp range is having start <= end
message TimestampRange {
// start time of the range query.
google.protobuf.Timestamp start = 1;
// end time of the range query.
google.protobuf.Timestamp end = 2;
message QueryFeaturesResponse {
// Entity name of the response
string entityName = 1;
// map of entity ID and its entity's properties.
map<string, Entity> entities = 2;
}

message Entity {
// map of feature ID and its feature value.
map<string, FeatureValueList> features = 1;
map<string, FeatureValue> features = 1;
}

message FeatureValueList {
// list of feature value
// if "type" in "requestDetail" is "LAST", then the length will always be 1.
// if "type" in "requestDetail" is "LIST", then the length is <= "limit".
feast.types.ValueList valueList = 1;
// list of timestamp of the value.
// the i-th timestamps correspond to the i-th value.
feast.types.TimestampList timestampList = 2;
message FeatureValue {
// value of feature
feast.types.Value value = 1;
// timestamp of the feature
google.protobuf.Timestamp timestamp = 2;
}
90 changes: 44 additions & 46 deletions protos/generated/go/feast/core/CoreService.pb.go

Large diffs are not rendered by default.

36 changes: 17 additions & 19 deletions protos/generated/go/feast/core/DatasetService.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading