diff --git a/go.mod b/go.mod index 636e30f4218..66e56091399 100644 --- a/go.mod +++ b/go.mod @@ -25,3 +25,5 @@ require ( google.golang.org/grpc v1.19.1 gopkg.in/yaml.v2 v2.2.2 ) + +go 1.13 diff --git a/sdk/go/client.go b/sdk/go/client.go new file mode 100644 index 00000000000..25cff153c82 --- /dev/null +++ b/sdk/go/client.go @@ -0,0 +1,60 @@ +package feast + +import ( + "context" + "fmt" + "github.com/opentracing/opentracing-go" + + "github.com/gojek/feast/sdk/go/protos/feast/serving" + "google.golang.org/grpc" + + "go.opencensus.io/plugin/ocgrpc" +) + +// Client is a feast serving client. +type Client interface { + GetOnlineFeatures(ctx context.Context, req *OnlineFeaturesRequest) (*OnlineFeaturesResponse, error) + GetFeastServingInfo(ctx context.Context, in *serving.GetFeastServingInfoRequest) (*serving.GetFeastServingInfoResponse, error) +} + +// GrpcClient is a grpc client for feast serving. +type GrpcClient struct { + cli serving.ServingServiceClient +} + +// NewGrpcClient constructs a client that can interact via grpc with the feast serving instance at the given host:port. +func NewGrpcClient(host string, port int) (*GrpcClient, error) { + feastCli := &GrpcClient{} + + adr := fmt.Sprintf("%s:%d", host, port) + conn, err := grpc.Dial(adr, grpc.WithStatsHandler(&ocgrpc.ClientHandler{}), grpc.WithInsecure()) + if err != nil { + return nil, err + } + feastCli.cli = serving.NewServingServiceClient(conn) + return feastCli, nil +} + +// GetOnlineFeatures gets the latest values of the request features from the Feast serving instance provided. +func (fc *GrpcClient) GetOnlineFeatures(ctx context.Context, req *OnlineFeaturesRequest) ( + *OnlineFeaturesResponse, error) { + span, ctx := opentracing.StartSpanFromContext(ctx, "get_online_features") + defer span.Finish() + + featuresRequest, err := req.buildRequest() + if err != nil { + return nil, err + } + resp, err := fc.cli.GetOnlineFeatures(ctx, featuresRequest) + + return &OnlineFeaturesResponse{RawResponse: resp}, nil +} + +// GetInfo gets information about the feast serving instance this client is connected to. +func (fc *GrpcClient) GetFeastServingInfo(ctx context.Context, in *serving.GetFeastServingInfoRequest) ( + *serving.GetFeastServingInfoResponse, error) { + span, ctx := opentracing.StartSpanFromContext(ctx, "get_info") + defer span.Finish() + + return fc.cli.GetFeastServingInfo(ctx, in) +} diff --git a/sdk/go/go.mod b/sdk/go/go.mod new file mode 100644 index 00000000000..7c029da1095 --- /dev/null +++ b/sdk/go/go.mod @@ -0,0 +1,12 @@ +module github.com/gojek/feast/sdk/go + +go 1.13 + +require ( + github.com/golang/protobuf v1.3.2 + github.com/google/go-cmp v0.3.0 + github.com/opentracing/opentracing-go v1.1.0 + github.com/stretchr/testify v1.4.0 // indirect + go.opencensus.io v0.22.1 + google.golang.org/grpc v1.24.0 +) diff --git a/sdk/go/go.sum b/sdk/go/go.sum new file mode 100644 index 00000000000..56df48673e5 --- /dev/null +++ b/sdk/go/go.sum @@ -0,0 +1,73 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6 h1:ZgQEtGgCBiWRM39fZuwSd1LwSqqSW0hOdXCYYDX0R3I= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +go.opencensus.io v0.22.1 h1:8dP3SGL7MPB94crU3bEPplMPe83FI4EouesJUeFHv50= +go.opencensus.io v0.22.1/go.mod h1:Ap50jQcDJrx6rB6VgeeFPtuPIf3wMRvRfrfYDO6+BmA= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a h1:oWX7TPOiFAMXLq8o0ikBYfCJVlRHBcsciT5bXOrH628= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd h1:r7DufRZuZbWB7j439YfAzP8RPDa9unLkpwQKUYbIMPI= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8 h1:Nw54tB0rB7hY/N0NQvRW8DG4Yk3Q6T9cu9RcFQDu1tc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb h1:i1Ppqkc3WQXikh8bXiwHqAN5Rv3/qDCcRk0/Otx73BY= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.24.0 h1:vb/1TCsVn3DcJlQ0Gs1yB1pKI6Do2/QNwxdKqmc/b0s= +google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/sdk/go/protos/feast/serving/ServingService.pb.go b/sdk/go/protos/feast/serving/ServingService.pb.go index bb2a0191b41..33d0cedff2b 100644 --- a/sdk/go/protos/feast/serving/ServingService.pb.go +++ b/sdk/go/protos/feast/serving/ServingService.pb.go @@ -149,206 +149,159 @@ func (DataFormat) EnumDescriptor() ([]byte, []int) { return fileDescriptor_0c1ba93cf29a8d9d, []int{3} } -type GetFeastServingVersionRequest struct { +type GetFeastServingInfoRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *GetFeastServingVersionRequest) Reset() { *m = GetFeastServingVersionRequest{} } -func (m *GetFeastServingVersionRequest) String() string { return proto.CompactTextString(m) } -func (*GetFeastServingVersionRequest) ProtoMessage() {} -func (*GetFeastServingVersionRequest) Descriptor() ([]byte, []int) { +func (m *GetFeastServingInfoRequest) Reset() { *m = GetFeastServingInfoRequest{} } +func (m *GetFeastServingInfoRequest) String() string { return proto.CompactTextString(m) } +func (*GetFeastServingInfoRequest) ProtoMessage() {} +func (*GetFeastServingInfoRequest) Descriptor() ([]byte, []int) { return fileDescriptor_0c1ba93cf29a8d9d, []int{0} } -func (m *GetFeastServingVersionRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetFeastServingVersionRequest.Unmarshal(m, b) +func (m *GetFeastServingInfoRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetFeastServingInfoRequest.Unmarshal(m, b) } -func (m *GetFeastServingVersionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetFeastServingVersionRequest.Marshal(b, m, deterministic) +func (m *GetFeastServingInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetFeastServingInfoRequest.Marshal(b, m, deterministic) } -func (m *GetFeastServingVersionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetFeastServingVersionRequest.Merge(m, src) +func (m *GetFeastServingInfoRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetFeastServingInfoRequest.Merge(m, src) } -func (m *GetFeastServingVersionRequest) XXX_Size() int { - return xxx_messageInfo_GetFeastServingVersionRequest.Size(m) +func (m *GetFeastServingInfoRequest) XXX_Size() int { + return xxx_messageInfo_GetFeastServingInfoRequest.Size(m) } -func (m *GetFeastServingVersionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetFeastServingVersionRequest.DiscardUnknown(m) +func (m *GetFeastServingInfoRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetFeastServingInfoRequest.DiscardUnknown(m) } -var xxx_messageInfo_GetFeastServingVersionRequest proto.InternalMessageInfo +var xxx_messageInfo_GetFeastServingInfoRequest proto.InternalMessageInfo -type GetFeastServingVersionResponse struct { - Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` +type GetFeastServingInfoResponse struct { + // Feast version of this serving deployment. + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + // Type of serving deployment, either ONLINE or BATCH. Different store types support different + // feature retrieval methods. + Type FeastServingType `protobuf:"varint,2,opt,name=type,proto3,enum=feast.serving.FeastServingType" json:"type,omitempty"` + // Note: Batch specific options start from 10. + // Staging location for this serving store, if any. + JobStagingLocation string `protobuf:"bytes,10,opt,name=job_staging_location,json=jobStagingLocation,proto3" json:"job_staging_location,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *GetFeastServingVersionResponse) Reset() { *m = GetFeastServingVersionResponse{} } -func (m *GetFeastServingVersionResponse) String() string { return proto.CompactTextString(m) } -func (*GetFeastServingVersionResponse) ProtoMessage() {} -func (*GetFeastServingVersionResponse) Descriptor() ([]byte, []int) { +func (m *GetFeastServingInfoResponse) Reset() { *m = GetFeastServingInfoResponse{} } +func (m *GetFeastServingInfoResponse) String() string { return proto.CompactTextString(m) } +func (*GetFeastServingInfoResponse) ProtoMessage() {} +func (*GetFeastServingInfoResponse) Descriptor() ([]byte, []int) { return fileDescriptor_0c1ba93cf29a8d9d, []int{1} } -func (m *GetFeastServingVersionResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetFeastServingVersionResponse.Unmarshal(m, b) +func (m *GetFeastServingInfoResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetFeastServingInfoResponse.Unmarshal(m, b) } -func (m *GetFeastServingVersionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetFeastServingVersionResponse.Marshal(b, m, deterministic) +func (m *GetFeastServingInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetFeastServingInfoResponse.Marshal(b, m, deterministic) } -func (m *GetFeastServingVersionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetFeastServingVersionResponse.Merge(m, src) +func (m *GetFeastServingInfoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetFeastServingInfoResponse.Merge(m, src) } -func (m *GetFeastServingVersionResponse) XXX_Size() int { - return xxx_messageInfo_GetFeastServingVersionResponse.Size(m) +func (m *GetFeastServingInfoResponse) XXX_Size() int { + return xxx_messageInfo_GetFeastServingInfoResponse.Size(m) } -func (m *GetFeastServingVersionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetFeastServingVersionResponse.DiscardUnknown(m) +func (m *GetFeastServingInfoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetFeastServingInfoResponse.DiscardUnknown(m) } -var xxx_messageInfo_GetFeastServingVersionResponse proto.InternalMessageInfo +var xxx_messageInfo_GetFeastServingInfoResponse proto.InternalMessageInfo -func (m *GetFeastServingVersionResponse) GetVersion() string { +func (m *GetFeastServingInfoResponse) GetVersion() string { if m != nil { return m.Version } return "" } -type GetFeastServingTypeRequest struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetFeastServingTypeRequest) Reset() { *m = GetFeastServingTypeRequest{} } -func (m *GetFeastServingTypeRequest) String() string { return proto.CompactTextString(m) } -func (*GetFeastServingTypeRequest) ProtoMessage() {} -func (*GetFeastServingTypeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_0c1ba93cf29a8d9d, []int{2} -} - -func (m *GetFeastServingTypeRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetFeastServingTypeRequest.Unmarshal(m, b) -} -func (m *GetFeastServingTypeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetFeastServingTypeRequest.Marshal(b, m, deterministic) -} -func (m *GetFeastServingTypeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetFeastServingTypeRequest.Merge(m, src) -} -func (m *GetFeastServingTypeRequest) XXX_Size() int { - return xxx_messageInfo_GetFeastServingTypeRequest.Size(m) -} -func (m *GetFeastServingTypeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetFeastServingTypeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetFeastServingTypeRequest proto.InternalMessageInfo - -type GetFeastServingTypeResponse struct { - Type FeastServingType `protobuf:"varint,1,opt,name=type,proto3,enum=feast.serving.FeastServingType" json:"type,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetFeastServingTypeResponse) Reset() { *m = GetFeastServingTypeResponse{} } -func (m *GetFeastServingTypeResponse) String() string { return proto.CompactTextString(m) } -func (*GetFeastServingTypeResponse) ProtoMessage() {} -func (*GetFeastServingTypeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_0c1ba93cf29a8d9d, []int{3} -} - -func (m *GetFeastServingTypeResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetFeastServingTypeResponse.Unmarshal(m, b) -} -func (m *GetFeastServingTypeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetFeastServingTypeResponse.Marshal(b, m, deterministic) -} -func (m *GetFeastServingTypeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetFeastServingTypeResponse.Merge(m, src) -} -func (m *GetFeastServingTypeResponse) XXX_Size() int { - return xxx_messageInfo_GetFeastServingTypeResponse.Size(m) -} -func (m *GetFeastServingTypeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetFeastServingTypeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetFeastServingTypeResponse proto.InternalMessageInfo - -func (m *GetFeastServingTypeResponse) GetType() FeastServingType { +func (m *GetFeastServingInfoResponse) GetType() FeastServingType { if m != nil { return m.Type } return FeastServingType_FEAST_SERVING_TYPE_INVALID } -type GetFeaturesRequest struct { +func (m *GetFeastServingInfoResponse) GetJobStagingLocation() string { + if m != nil { + return m.JobStagingLocation + } + return "" +} + +type GetOnlineFeaturesRequest struct { // List of feature sets and their features that are being retrieved - FeatureSets []*GetFeaturesRequest_FeatureSet `protobuf:"bytes,1,rep,name=feature_sets,json=featureSets,proto3" json:"feature_sets,omitempty"` + FeatureSets []*GetOnlineFeaturesRequest_FeatureSet `protobuf:"bytes,1,rep,name=feature_sets,json=featureSets,proto3" json:"feature_sets,omitempty"` // List of entity rows, containing entity id and timestamp data. // Used during retrieval of feature rows and for joining feature // rows into a final dataset - EntityRows []*GetFeaturesRequest_EntityRow `protobuf:"bytes,2,rep,name=entity_rows,json=entityRows,proto3" json:"entity_rows,omitempty"` - OmitEntitiesInResponse bool `protobuf:"varint,3,opt,name=omit_entities_in_response,json=omitEntitiesInResponse,proto3" json:"omit_entities_in_response,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetFeaturesRequest) Reset() { *m = GetFeaturesRequest{} } -func (m *GetFeaturesRequest) String() string { return proto.CompactTextString(m) } -func (*GetFeaturesRequest) ProtoMessage() {} -func (*GetFeaturesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_0c1ba93cf29a8d9d, []int{4} + EntityRows []*GetOnlineFeaturesRequest_EntityRow `protobuf:"bytes,2,rep,name=entity_rows,json=entityRows,proto3" json:"entity_rows,omitempty"` + // Option to omit entities from the response. If true, only feature + // values will be returned. + OmitEntitiesInResponse bool `protobuf:"varint,3,opt,name=omit_entities_in_response,json=omitEntitiesInResponse,proto3" json:"omit_entities_in_response,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetOnlineFeaturesRequest) Reset() { *m = GetOnlineFeaturesRequest{} } +func (m *GetOnlineFeaturesRequest) String() string { return proto.CompactTextString(m) } +func (*GetOnlineFeaturesRequest) ProtoMessage() {} +func (*GetOnlineFeaturesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_0c1ba93cf29a8d9d, []int{2} } -func (m *GetFeaturesRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetFeaturesRequest.Unmarshal(m, b) +func (m *GetOnlineFeaturesRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetOnlineFeaturesRequest.Unmarshal(m, b) } -func (m *GetFeaturesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetFeaturesRequest.Marshal(b, m, deterministic) +func (m *GetOnlineFeaturesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetOnlineFeaturesRequest.Marshal(b, m, deterministic) } -func (m *GetFeaturesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetFeaturesRequest.Merge(m, src) +func (m *GetOnlineFeaturesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetOnlineFeaturesRequest.Merge(m, src) } -func (m *GetFeaturesRequest) XXX_Size() int { - return xxx_messageInfo_GetFeaturesRequest.Size(m) +func (m *GetOnlineFeaturesRequest) XXX_Size() int { + return xxx_messageInfo_GetOnlineFeaturesRequest.Size(m) } -func (m *GetFeaturesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetFeaturesRequest.DiscardUnknown(m) +func (m *GetOnlineFeaturesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetOnlineFeaturesRequest.DiscardUnknown(m) } -var xxx_messageInfo_GetFeaturesRequest proto.InternalMessageInfo +var xxx_messageInfo_GetOnlineFeaturesRequest proto.InternalMessageInfo -func (m *GetFeaturesRequest) GetFeatureSets() []*GetFeaturesRequest_FeatureSet { +func (m *GetOnlineFeaturesRequest) GetFeatureSets() []*GetOnlineFeaturesRequest_FeatureSet { if m != nil { return m.FeatureSets } return nil } -func (m *GetFeaturesRequest) GetEntityRows() []*GetFeaturesRequest_EntityRow { +func (m *GetOnlineFeaturesRequest) GetEntityRows() []*GetOnlineFeaturesRequest_EntityRow { if m != nil { return m.EntityRows } return nil } -func (m *GetFeaturesRequest) GetOmitEntitiesInResponse() bool { +func (m *GetOnlineFeaturesRequest) GetOmitEntitiesInResponse() bool { if m != nil { return m.OmitEntitiesInResponse } return false } -type GetFeaturesRequest_FeatureSet struct { +type GetOnlineFeaturesRequest_FeatureSet struct { // Feature set name Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Feature set version @@ -366,60 +319,60 @@ type GetFeaturesRequest_FeatureSet struct { XXX_sizecache int32 `json:"-"` } -func (m *GetFeaturesRequest_FeatureSet) Reset() { *m = GetFeaturesRequest_FeatureSet{} } -func (m *GetFeaturesRequest_FeatureSet) String() string { return proto.CompactTextString(m) } -func (*GetFeaturesRequest_FeatureSet) ProtoMessage() {} -func (*GetFeaturesRequest_FeatureSet) Descriptor() ([]byte, []int) { - return fileDescriptor_0c1ba93cf29a8d9d, []int{4, 0} +func (m *GetOnlineFeaturesRequest_FeatureSet) Reset() { *m = GetOnlineFeaturesRequest_FeatureSet{} } +func (m *GetOnlineFeaturesRequest_FeatureSet) String() string { return proto.CompactTextString(m) } +func (*GetOnlineFeaturesRequest_FeatureSet) ProtoMessage() {} +func (*GetOnlineFeaturesRequest_FeatureSet) Descriptor() ([]byte, []int) { + return fileDescriptor_0c1ba93cf29a8d9d, []int{2, 0} } -func (m *GetFeaturesRequest_FeatureSet) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetFeaturesRequest_FeatureSet.Unmarshal(m, b) +func (m *GetOnlineFeaturesRequest_FeatureSet) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetOnlineFeaturesRequest_FeatureSet.Unmarshal(m, b) } -func (m *GetFeaturesRequest_FeatureSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetFeaturesRequest_FeatureSet.Marshal(b, m, deterministic) +func (m *GetOnlineFeaturesRequest_FeatureSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetOnlineFeaturesRequest_FeatureSet.Marshal(b, m, deterministic) } -func (m *GetFeaturesRequest_FeatureSet) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetFeaturesRequest_FeatureSet.Merge(m, src) +func (m *GetOnlineFeaturesRequest_FeatureSet) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetOnlineFeaturesRequest_FeatureSet.Merge(m, src) } -func (m *GetFeaturesRequest_FeatureSet) XXX_Size() int { - return xxx_messageInfo_GetFeaturesRequest_FeatureSet.Size(m) +func (m *GetOnlineFeaturesRequest_FeatureSet) XXX_Size() int { + return xxx_messageInfo_GetOnlineFeaturesRequest_FeatureSet.Size(m) } -func (m *GetFeaturesRequest_FeatureSet) XXX_DiscardUnknown() { - xxx_messageInfo_GetFeaturesRequest_FeatureSet.DiscardUnknown(m) +func (m *GetOnlineFeaturesRequest_FeatureSet) XXX_DiscardUnknown() { + xxx_messageInfo_GetOnlineFeaturesRequest_FeatureSet.DiscardUnknown(m) } -var xxx_messageInfo_GetFeaturesRequest_FeatureSet proto.InternalMessageInfo +var xxx_messageInfo_GetOnlineFeaturesRequest_FeatureSet proto.InternalMessageInfo -func (m *GetFeaturesRequest_FeatureSet) GetName() string { +func (m *GetOnlineFeaturesRequest_FeatureSet) GetName() string { if m != nil { return m.Name } return "" } -func (m *GetFeaturesRequest_FeatureSet) GetVersion() int32 { +func (m *GetOnlineFeaturesRequest_FeatureSet) GetVersion() int32 { if m != nil { return m.Version } return 0 } -func (m *GetFeaturesRequest_FeatureSet) GetFeatureNames() []string { +func (m *GetOnlineFeaturesRequest_FeatureSet) GetFeatureNames() []string { if m != nil { return m.FeatureNames } return nil } -func (m *GetFeaturesRequest_FeatureSet) GetMaxAge() *duration.Duration { +func (m *GetOnlineFeaturesRequest_FeatureSet) GetMaxAge() *duration.Duration { if m != nil { return m.MaxAge } return nil } -type GetFeaturesRequest_EntityRow struct { +type GetOnlineFeaturesRequest_EntityRow struct { // Request timestamp of this row. This value will be used, together with maxAge, // to determine feature staleness. EntityTimestamp *timestamp.Timestamp `protobuf:"bytes,1,opt,name=entity_timestamp,json=entityTimestamp,proto3" json:"entity_timestamp,omitempty"` @@ -430,46 +383,168 @@ type GetFeaturesRequest_EntityRow struct { XXX_sizecache int32 `json:"-"` } -func (m *GetFeaturesRequest_EntityRow) Reset() { *m = GetFeaturesRequest_EntityRow{} } -func (m *GetFeaturesRequest_EntityRow) String() string { return proto.CompactTextString(m) } -func (*GetFeaturesRequest_EntityRow) ProtoMessage() {} -func (*GetFeaturesRequest_EntityRow) Descriptor() ([]byte, []int) { - return fileDescriptor_0c1ba93cf29a8d9d, []int{4, 1} +func (m *GetOnlineFeaturesRequest_EntityRow) Reset() { *m = GetOnlineFeaturesRequest_EntityRow{} } +func (m *GetOnlineFeaturesRequest_EntityRow) String() string { return proto.CompactTextString(m) } +func (*GetOnlineFeaturesRequest_EntityRow) ProtoMessage() {} +func (*GetOnlineFeaturesRequest_EntityRow) Descriptor() ([]byte, []int) { + return fileDescriptor_0c1ba93cf29a8d9d, []int{2, 1} } -func (m *GetFeaturesRequest_EntityRow) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetFeaturesRequest_EntityRow.Unmarshal(m, b) +func (m *GetOnlineFeaturesRequest_EntityRow) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetOnlineFeaturesRequest_EntityRow.Unmarshal(m, b) } -func (m *GetFeaturesRequest_EntityRow) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetFeaturesRequest_EntityRow.Marshal(b, m, deterministic) +func (m *GetOnlineFeaturesRequest_EntityRow) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetOnlineFeaturesRequest_EntityRow.Marshal(b, m, deterministic) } -func (m *GetFeaturesRequest_EntityRow) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetFeaturesRequest_EntityRow.Merge(m, src) +func (m *GetOnlineFeaturesRequest_EntityRow) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetOnlineFeaturesRequest_EntityRow.Merge(m, src) } -func (m *GetFeaturesRequest_EntityRow) XXX_Size() int { - return xxx_messageInfo_GetFeaturesRequest_EntityRow.Size(m) +func (m *GetOnlineFeaturesRequest_EntityRow) XXX_Size() int { + return xxx_messageInfo_GetOnlineFeaturesRequest_EntityRow.Size(m) } -func (m *GetFeaturesRequest_EntityRow) XXX_DiscardUnknown() { - xxx_messageInfo_GetFeaturesRequest_EntityRow.DiscardUnknown(m) +func (m *GetOnlineFeaturesRequest_EntityRow) XXX_DiscardUnknown() { + xxx_messageInfo_GetOnlineFeaturesRequest_EntityRow.DiscardUnknown(m) } -var xxx_messageInfo_GetFeaturesRequest_EntityRow proto.InternalMessageInfo +var xxx_messageInfo_GetOnlineFeaturesRequest_EntityRow proto.InternalMessageInfo -func (m *GetFeaturesRequest_EntityRow) GetEntityTimestamp() *timestamp.Timestamp { +func (m *GetOnlineFeaturesRequest_EntityRow) GetEntityTimestamp() *timestamp.Timestamp { if m != nil { return m.EntityTimestamp } return nil } -func (m *GetFeaturesRequest_EntityRow) GetFields() map[string]*types.Value { +func (m *GetOnlineFeaturesRequest_EntityRow) GetFields() map[string]*types.Value { if m != nil { return m.Fields } return nil } +type GetBatchFeaturesRequest struct { + // List of feature sets and their features that are being retrieved. + FeatureSets []*GetBatchFeaturesRequest_FeatureSet `protobuf:"bytes,1,rep,name=feature_sets,json=featureSets,proto3" json:"feature_sets,omitempty"` + // Source of the entity dataset containing the timestamps and entity keys to retrieve + // features for. + DatasetSource *DatasetSource `protobuf:"bytes,2,opt,name=dataset_source,json=datasetSource,proto3" json:"dataset_source,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetBatchFeaturesRequest) Reset() { *m = GetBatchFeaturesRequest{} } +func (m *GetBatchFeaturesRequest) String() string { return proto.CompactTextString(m) } +func (*GetBatchFeaturesRequest) ProtoMessage() {} +func (*GetBatchFeaturesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_0c1ba93cf29a8d9d, []int{3} +} + +func (m *GetBatchFeaturesRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetBatchFeaturesRequest.Unmarshal(m, b) +} +func (m *GetBatchFeaturesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetBatchFeaturesRequest.Marshal(b, m, deterministic) +} +func (m *GetBatchFeaturesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetBatchFeaturesRequest.Merge(m, src) +} +func (m *GetBatchFeaturesRequest) XXX_Size() int { + return xxx_messageInfo_GetBatchFeaturesRequest.Size(m) +} +func (m *GetBatchFeaturesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetBatchFeaturesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetBatchFeaturesRequest proto.InternalMessageInfo + +func (m *GetBatchFeaturesRequest) GetFeatureSets() []*GetBatchFeaturesRequest_FeatureSet { + if m != nil { + return m.FeatureSets + } + return nil +} + +func (m *GetBatchFeaturesRequest) GetDatasetSource() *DatasetSource { + if m != nil { + return m.DatasetSource + } + return nil +} + +type GetBatchFeaturesRequest_FeatureSet struct { + // Feature set name + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Feature set version + Version int32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` + // Features that should be retrieved from this feature set + FeatureNames []string `protobuf:"bytes,3,rep,name=feature_names,json=featureNames,proto3" json:"feature_names,omitempty"` + // The features will be retrieved if: + // entity_timestamp - max_age <= event_timestamp <= entity_timestamp + // + // If unspecified the default max_age specified in FeatureSetSpec will + // be used. + MaxAge *duration.Duration `protobuf:"bytes,4,opt,name=max_age,json=maxAge,proto3" json:"max_age,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetBatchFeaturesRequest_FeatureSet) Reset() { *m = GetBatchFeaturesRequest_FeatureSet{} } +func (m *GetBatchFeaturesRequest_FeatureSet) String() string { return proto.CompactTextString(m) } +func (*GetBatchFeaturesRequest_FeatureSet) ProtoMessage() {} +func (*GetBatchFeaturesRequest_FeatureSet) Descriptor() ([]byte, []int) { + return fileDescriptor_0c1ba93cf29a8d9d, []int{3, 0} +} + +func (m *GetBatchFeaturesRequest_FeatureSet) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetBatchFeaturesRequest_FeatureSet.Unmarshal(m, b) +} +func (m *GetBatchFeaturesRequest_FeatureSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetBatchFeaturesRequest_FeatureSet.Marshal(b, m, deterministic) +} +func (m *GetBatchFeaturesRequest_FeatureSet) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetBatchFeaturesRequest_FeatureSet.Merge(m, src) +} +func (m *GetBatchFeaturesRequest_FeatureSet) XXX_Size() int { + return xxx_messageInfo_GetBatchFeaturesRequest_FeatureSet.Size(m) +} +func (m *GetBatchFeaturesRequest_FeatureSet) XXX_DiscardUnknown() { + xxx_messageInfo_GetBatchFeaturesRequest_FeatureSet.DiscardUnknown(m) +} + +var xxx_messageInfo_GetBatchFeaturesRequest_FeatureSet proto.InternalMessageInfo + +func (m *GetBatchFeaturesRequest_FeatureSet) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *GetBatchFeaturesRequest_FeatureSet) GetVersion() int32 { + if m != nil { + return m.Version + } + return 0 +} + +func (m *GetBatchFeaturesRequest_FeatureSet) GetFeatureNames() []string { + if m != nil { + return m.FeatureNames + } + return nil +} + +func (m *GetBatchFeaturesRequest_FeatureSet) GetMaxAge() *duration.Duration { + if m != nil { + return m.MaxAge + } + return nil +} + type GetOnlineFeaturesResponse struct { + // Feature values retrieved from feast. FieldValues []*GetOnlineFeaturesResponse_FieldValues `protobuf:"bytes,1,rep,name=field_values,json=fieldValues,proto3" json:"field_values,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -480,7 +555,7 @@ func (m *GetOnlineFeaturesResponse) Reset() { *m = GetOnlineFeaturesResp func (m *GetOnlineFeaturesResponse) String() string { return proto.CompactTextString(m) } func (*GetOnlineFeaturesResponse) ProtoMessage() {} func (*GetOnlineFeaturesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_0c1ba93cf29a8d9d, []int{5} + return fileDescriptor_0c1ba93cf29a8d9d, []int{4} } func (m *GetOnlineFeaturesResponse) XXX_Unmarshal(b []byte) error { @@ -508,9 +583,9 @@ func (m *GetOnlineFeaturesResponse) GetFieldValues() []*GetOnlineFeaturesRespons return nil } -// TODO: update this comment -// does not include timestamp, includes features and entities type GetOnlineFeaturesResponse_FieldValues struct { + // Map of feature or entity name to feature/entity values. + // Timestamps are not returned in this response. Fields map[string]*types.Value `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -521,7 +596,7 @@ func (m *GetOnlineFeaturesResponse_FieldValues) Reset() { *m = GetOnline func (m *GetOnlineFeaturesResponse_FieldValues) String() string { return proto.CompactTextString(m) } func (*GetOnlineFeaturesResponse_FieldValues) ProtoMessage() {} func (*GetOnlineFeaturesResponse_FieldValues) Descriptor() ([]byte, []int) { - return fileDescriptor_0c1ba93cf29a8d9d, []int{5, 0} + return fileDescriptor_0c1ba93cf29a8d9d, []int{4, 0} } func (m *GetOnlineFeaturesResponse_FieldValues) XXX_Unmarshal(b []byte) error { @@ -560,7 +635,7 @@ func (m *GetBatchFeaturesResponse) Reset() { *m = GetBatchFeaturesRespon func (m *GetBatchFeaturesResponse) String() string { return proto.CompactTextString(m) } func (*GetBatchFeaturesResponse) ProtoMessage() {} func (*GetBatchFeaturesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_0c1ba93cf29a8d9d, []int{6} + return fileDescriptor_0c1ba93cf29a8d9d, []int{5} } func (m *GetBatchFeaturesResponse) XXX_Unmarshal(b []byte) error { @@ -599,7 +674,7 @@ func (m *GetJobRequest) Reset() { *m = GetJobRequest{} } func (m *GetJobRequest) String() string { return proto.CompactTextString(m) } func (*GetJobRequest) ProtoMessage() {} func (*GetJobRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_0c1ba93cf29a8d9d, []int{7} + return fileDescriptor_0c1ba93cf29a8d9d, []int{6} } func (m *GetJobRequest) XXX_Unmarshal(b []byte) error { @@ -638,7 +713,7 @@ func (m *GetJobResponse) Reset() { *m = GetJobResponse{} } func (m *GetJobResponse) String() string { return proto.CompactTextString(m) } func (*GetJobResponse) ProtoMessage() {} func (*GetJobResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_0c1ba93cf29a8d9d, []int{8} + return fileDescriptor_0c1ba93cf29a8d9d, []int{7} } func (m *GetJobResponse) XXX_Unmarshal(b []byte) error { @@ -689,7 +764,7 @@ func (m *Job) Reset() { *m = Job{} } func (m *Job) String() string { return proto.CompactTextString(m) } func (*Job) ProtoMessage() {} func (*Job) Descriptor() ([]byte, []int) { - return fileDescriptor_0c1ba93cf29a8d9d, []int{9} + return fileDescriptor_0c1ba93cf29a8d9d, []int{8} } func (m *Job) XXX_Unmarshal(b []byte) error { @@ -752,19 +827,135 @@ func (m *Job) GetDataFormat() DataFormat { return DataFormat_DATA_FORMAT_INVALID } +type DatasetSource struct { + // Types that are valid to be assigned to DatasetSource: + // *DatasetSource_FileSource_ + DatasetSource isDatasetSource_DatasetSource `protobuf_oneof:"dataset_source"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DatasetSource) Reset() { *m = DatasetSource{} } +func (m *DatasetSource) String() string { return proto.CompactTextString(m) } +func (*DatasetSource) ProtoMessage() {} +func (*DatasetSource) Descriptor() ([]byte, []int) { + return fileDescriptor_0c1ba93cf29a8d9d, []int{9} +} + +func (m *DatasetSource) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DatasetSource.Unmarshal(m, b) +} +func (m *DatasetSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DatasetSource.Marshal(b, m, deterministic) +} +func (m *DatasetSource) XXX_Merge(src proto.Message) { + xxx_messageInfo_DatasetSource.Merge(m, src) +} +func (m *DatasetSource) XXX_Size() int { + return xxx_messageInfo_DatasetSource.Size(m) +} +func (m *DatasetSource) XXX_DiscardUnknown() { + xxx_messageInfo_DatasetSource.DiscardUnknown(m) +} + +var xxx_messageInfo_DatasetSource proto.InternalMessageInfo + +type isDatasetSource_DatasetSource interface { + isDatasetSource_DatasetSource() +} + +type DatasetSource_FileSource_ struct { + FileSource *DatasetSource_FileSource `protobuf:"bytes,1,opt,name=file_source,json=fileSource,proto3,oneof"` +} + +func (*DatasetSource_FileSource_) isDatasetSource_DatasetSource() {} + +func (m *DatasetSource) GetDatasetSource() isDatasetSource_DatasetSource { + if m != nil { + return m.DatasetSource + } + return nil +} + +func (m *DatasetSource) GetFileSource() *DatasetSource_FileSource { + if x, ok := m.GetDatasetSource().(*DatasetSource_FileSource_); ok { + return x.FileSource + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*DatasetSource) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*DatasetSource_FileSource_)(nil), + } +} + +type DatasetSource_FileSource struct { + // URIs to retrieve the dataset from, e.g. gs://bucket/directory/object.csv. Wildcards are + // supported. This data must be compatible to be uploaded to the serving store, and also be + // accessible by this serving instance. + FileUris []string `protobuf:"bytes,1,rep,name=file_uris,json=fileUris,proto3" json:"file_uris,omitempty"` + // Format of the data. Currently only avro is supported. + DataFormat DataFormat `protobuf:"varint,2,opt,name=data_format,json=dataFormat,proto3,enum=feast.serving.DataFormat" json:"data_format,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DatasetSource_FileSource) Reset() { *m = DatasetSource_FileSource{} } +func (m *DatasetSource_FileSource) String() string { return proto.CompactTextString(m) } +func (*DatasetSource_FileSource) ProtoMessage() {} +func (*DatasetSource_FileSource) Descriptor() ([]byte, []int) { + return fileDescriptor_0c1ba93cf29a8d9d, []int{9, 0} +} + +func (m *DatasetSource_FileSource) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DatasetSource_FileSource.Unmarshal(m, b) +} +func (m *DatasetSource_FileSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DatasetSource_FileSource.Marshal(b, m, deterministic) +} +func (m *DatasetSource_FileSource) XXX_Merge(src proto.Message) { + xxx_messageInfo_DatasetSource_FileSource.Merge(m, src) +} +func (m *DatasetSource_FileSource) XXX_Size() int { + return xxx_messageInfo_DatasetSource_FileSource.Size(m) +} +func (m *DatasetSource_FileSource) XXX_DiscardUnknown() { + xxx_messageInfo_DatasetSource_FileSource.DiscardUnknown(m) +} + +var xxx_messageInfo_DatasetSource_FileSource proto.InternalMessageInfo + +func (m *DatasetSource_FileSource) GetFileUris() []string { + if m != nil { + return m.FileUris + } + return nil +} + +func (m *DatasetSource_FileSource) GetDataFormat() DataFormat { + if m != nil { + return m.DataFormat + } + return DataFormat_DATA_FORMAT_INVALID +} + func init() { proto.RegisterEnum("feast.serving.FeastServingType", FeastServingType_name, FeastServingType_value) proto.RegisterEnum("feast.serving.JobType", JobType_name, JobType_value) proto.RegisterEnum("feast.serving.JobStatus", JobStatus_name, JobStatus_value) proto.RegisterEnum("feast.serving.DataFormat", DataFormat_name, DataFormat_value) - proto.RegisterType((*GetFeastServingVersionRequest)(nil), "feast.serving.GetFeastServingVersionRequest") - proto.RegisterType((*GetFeastServingVersionResponse)(nil), "feast.serving.GetFeastServingVersionResponse") - proto.RegisterType((*GetFeastServingTypeRequest)(nil), "feast.serving.GetFeastServingTypeRequest") - proto.RegisterType((*GetFeastServingTypeResponse)(nil), "feast.serving.GetFeastServingTypeResponse") - proto.RegisterType((*GetFeaturesRequest)(nil), "feast.serving.GetFeaturesRequest") - proto.RegisterType((*GetFeaturesRequest_FeatureSet)(nil), "feast.serving.GetFeaturesRequest.FeatureSet") - proto.RegisterType((*GetFeaturesRequest_EntityRow)(nil), "feast.serving.GetFeaturesRequest.EntityRow") - proto.RegisterMapType((map[string]*types.Value)(nil), "feast.serving.GetFeaturesRequest.EntityRow.FieldsEntry") + proto.RegisterType((*GetFeastServingInfoRequest)(nil), "feast.serving.GetFeastServingInfoRequest") + proto.RegisterType((*GetFeastServingInfoResponse)(nil), "feast.serving.GetFeastServingInfoResponse") + proto.RegisterType((*GetOnlineFeaturesRequest)(nil), "feast.serving.GetOnlineFeaturesRequest") + proto.RegisterType((*GetOnlineFeaturesRequest_FeatureSet)(nil), "feast.serving.GetOnlineFeaturesRequest.FeatureSet") + proto.RegisterType((*GetOnlineFeaturesRequest_EntityRow)(nil), "feast.serving.GetOnlineFeaturesRequest.EntityRow") + proto.RegisterMapType((map[string]*types.Value)(nil), "feast.serving.GetOnlineFeaturesRequest.EntityRow.FieldsEntry") + proto.RegisterType((*GetBatchFeaturesRequest)(nil), "feast.serving.GetBatchFeaturesRequest") + proto.RegisterType((*GetBatchFeaturesRequest_FeatureSet)(nil), "feast.serving.GetBatchFeaturesRequest.FeatureSet") proto.RegisterType((*GetOnlineFeaturesResponse)(nil), "feast.serving.GetOnlineFeaturesResponse") proto.RegisterType((*GetOnlineFeaturesResponse_FieldValues)(nil), "feast.serving.GetOnlineFeaturesResponse.FieldValues") proto.RegisterMapType((map[string]*types.Value)(nil), "feast.serving.GetOnlineFeaturesResponse.FieldValues.FieldsEntry") @@ -772,77 +963,86 @@ func init() { proto.RegisterType((*GetJobRequest)(nil), "feast.serving.GetJobRequest") proto.RegisterType((*GetJobResponse)(nil), "feast.serving.GetJobResponse") proto.RegisterType((*Job)(nil), "feast.serving.Job") + proto.RegisterType((*DatasetSource)(nil), "feast.serving.DatasetSource") + proto.RegisterType((*DatasetSource_FileSource)(nil), "feast.serving.DatasetSource.FileSource") } func init() { proto.RegisterFile("feast/serving/ServingService.proto", fileDescriptor_0c1ba93cf29a8d9d) } var fileDescriptor_0c1ba93cf29a8d9d = []byte{ - // 1039 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcd, 0x76, 0xdb, 0x44, - 0x14, 0x46, 0x76, 0xe2, 0xd6, 0xd7, 0x4d, 0xa2, 0x4e, 0x4a, 0xaa, 0xa8, 0xf9, 0x31, 0x86, 0x73, - 0x30, 0x06, 0x64, 0x8e, 0x0b, 0x05, 0xb2, 0xaa, 0x52, 0x2b, 0xc6, 0x39, 0xa9, 0x14, 0xc6, 0x8a, - 0x0b, 0x2c, 0x10, 0x72, 0x3c, 0x76, 0xd4, 0xd8, 0x56, 0xd0, 0x8c, 0xd3, 0x66, 0xc5, 0x43, 0xf0, - 0x1c, 0x6c, 0x79, 0x20, 0x1e, 0x81, 0x1d, 0x1b, 0x0e, 0x47, 0xa3, 0x91, 0xec, 0x48, 0x0e, 0x4d, - 0x59, 0xb0, 0xd2, 0xcc, 0xbd, 0xdf, 0xbd, 0xdf, 0xcc, 0xa7, 0xb9, 0x77, 0x06, 0x2a, 0x03, 0xe2, - 0x52, 0x56, 0xa7, 0x24, 0xb8, 0xf4, 0x26, 0xc3, 0x7a, 0x27, 0xfa, 0xf2, 0xcf, 0x29, 0xd1, 0x2e, - 0x02, 0x9f, 0xf9, 0x68, 0x85, 0x63, 0x34, 0x81, 0x51, 0x77, 0x87, 0xbe, 0x3f, 0x1c, 0x91, 0x3a, - 0x77, 0xf6, 0xa6, 0x83, 0x3a, 0xf3, 0xc6, 0x84, 0x32, 0x77, 0x7c, 0x11, 0xe1, 0xd5, 0x9d, 0x34, - 0xa0, 0x3f, 0x0d, 0x5c, 0xe6, 0xf9, 0x13, 0xe1, 0x7f, 0x18, 0x71, 0xb2, 0xab, 0x0b, 0x42, 0xeb, - 0x5d, 0x77, 0x34, 0x15, 0x44, 0x95, 0x5d, 0xd8, 0x6e, 0x11, 0x76, 0x10, 0x7a, 0xc5, 0x42, 0xba, - 0x24, 0xa0, 0x9e, 0x3f, 0xc1, 0xe4, 0xe7, 0x29, 0xa1, 0xac, 0xb2, 0x07, 0x3b, 0x37, 0x01, 0xe8, - 0x85, 0x3f, 0xa1, 0x04, 0x29, 0x70, 0xe7, 0x32, 0x32, 0x29, 0x52, 0x59, 0xaa, 0x16, 0x71, 0x3c, - 0xad, 0x6c, 0x81, 0x9a, 0x8a, 0xb5, 0xaf, 0x2e, 0x48, 0x9c, 0x19, 0xc3, 0xa3, 0x85, 0x5e, 0x91, - 0xf6, 0x31, 0x2c, 0x85, 0xcb, 0xe5, 0x39, 0x57, 0x1b, 0xbb, 0xda, 0x35, 0x45, 0xb4, 0x4c, 0x18, - 0x07, 0x57, 0xfe, 0x5a, 0x02, 0x14, 0x25, 0x65, 0xd3, 0x80, 0x50, 0x41, 0x85, 0x2c, 0xb8, 0x37, - 0x88, 0x4c, 0x0e, 0x25, 0x8c, 0x2a, 0x52, 0x39, 0x5f, 0x2d, 0x35, 0x3e, 0x49, 0xe5, 0xcc, 0x06, - 0x6a, 0x62, 0xde, 0x21, 0x0c, 0x97, 0x06, 0xc9, 0x98, 0xa2, 0x23, 0x28, 0x91, 0x09, 0xf3, 0xd8, - 0x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, 0x21, 0xad, 0x5f, 0x7b, 0x79, 0xf6, 0x0a, 0xdc, 0xfa, - 0xf8, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc4, 0xb3, 0x0f, 0x0f, 0x91, 0x0a, 0x00, 0x00, + // 1145 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0x5f, 0x73, 0xdb, 0x44, + 0x10, 0xaf, 0xec, 0x24, 0x6d, 0xd6, 0x8d, 0xa3, 0x5e, 0x4a, 0xab, 0xa8, 0x69, 0xeb, 0x31, 0x0c, + 0x35, 0x7e, 0x90, 0xc1, 0x85, 0x0e, 0x74, 0x86, 0x99, 0xca, 0xb5, 0xec, 0x3a, 0x93, 0xca, 0xe1, + 0x2c, 0xa7, 0xc0, 0x8b, 0x46, 0xb6, 0xcf, 0xae, 0x52, 0x5b, 0x17, 0x74, 0xe7, 0xb6, 0x79, 0xe2, + 0x33, 0x00, 0xef, 0x7c, 0x03, 0x5e, 0xf9, 0x10, 0x3c, 0xf3, 0x09, 0xf8, 0x14, 0x3c, 0x32, 0x3a, + 0x9d, 0xff, 0xc9, 0x4e, 0xeb, 0xf0, 0xc0, 0xf0, 0xe4, 0xbb, 0xdd, 0xdf, 0xde, 0xde, 0xee, 0xfe, + 0x76, 0x4f, 0x86, 0x7c, 0x9f, 0x78, 0x8c, 0x97, 0x18, 0x09, 0x5f, 0xfb, 0xc1, 0xa0, 0xd4, 0x8a, + 0x7f, 0xc5, 0x4f, 0x97, 0x18, 0x67, 0x21, 0xe5, 0x14, 0xed, 0x08, 0x8c, 0x21, 0x31, 0xfa, 0xfd, + 0x01, 0xa5, 0x83, 0x21, 0x29, 0x09, 0x65, 0x67, 0xdc, 0x2f, 0x71, 0x7f, 0x44, 0x18, 0xf7, 0x46, + 0x67, 0x31, 0x5e, 0xbf, 0x97, 0x04, 0xf4, 0xc6, 0xa1, 0xc7, 0x7d,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x78, 0xaa, 0xa1, 0x83, 0x65, 0x93, + 0xd9, 0x8c, 0xd4, 0xef, 0x5e, 0xa0, 0x8d, 0x8f, 0xa9, 0x38, 0xb0, 0xf8, 0x41, 0x5f, 0xd9, 0x95, + 0x99, 0x33, 0x8f, 0x1b, 0xc7, 0xd1, 0xdb, 0xf7, 0x7d, 0x79, 0xe0, 0xf3, 0x97, 0xe3, 0x8e, 0xd1, + 0xa5, 0xa3, 0xd2, 0x80, 0x9e, 0x92, 0x57, 0x25, 0xf9, 0x2f, 0xa1, 0xf7, 0xaa, 0x34, 0xa0, 0xf1, + 0x77, 0x3d, 0x2b, 0x2d, 0xfc, 0x73, 0xe8, 0x6c, 0x09, 0xe9, 0xc3, 0x7f, 0x02, 0x00, 0x00, 0xff, + 0xff, 0x15, 0xb8, 0x91, 0xc9, 0x51, 0x0c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -857,12 +1057,10 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type ServingServiceClient interface { - // Get version information about this Feast serving. - GetFeastServingVersion(ctx context.Context, in *GetFeastServingVersionRequest, opts ...grpc.CallOption) (*GetFeastServingVersionResponse, error) - // Get Feast serving store type: online or batch. - GetFeastServingType(ctx context.Context, in *GetFeastServingTypeRequest, opts ...grpc.CallOption) (*GetFeastServingTypeResponse, error) + // Get information about this Feast serving. + GetFeastServingInfo(ctx context.Context, in *GetFeastServingInfoRequest, opts ...grpc.CallOption) (*GetFeastServingInfoResponse, error) // Get online features synchronously. - GetOnlineFeatures(ctx context.Context, in *GetFeaturesRequest, opts ...grpc.CallOption) (*GetOnlineFeaturesResponse, error) + GetOnlineFeatures(ctx context.Context, in *GetOnlineFeaturesRequest, opts ...grpc.CallOption) (*GetOnlineFeaturesResponse, error) // Get batch features asynchronously. // // The client should check the status of the returned job periodically by @@ -871,7 +1069,7 @@ type ServingServiceClient interface { // status = JOB_STATUS_DONE with no error, then the client can check // the file_uris for the location to download feature values data. // The client is assumed to have access to these file URIs. - GetBatchFeatures(ctx context.Context, in *GetFeaturesRequest, opts ...grpc.CallOption) (*GetBatchFeaturesResponse, error) + GetBatchFeatures(ctx context.Context, in *GetBatchFeaturesRequest, opts ...grpc.CallOption) (*GetBatchFeaturesResponse, error) // Get the latest job status for batch feature retrieval. GetJob(ctx context.Context, in *GetJobRequest, opts ...grpc.CallOption) (*GetJobResponse, error) } @@ -884,25 +1082,16 @@ func NewServingServiceClient(cc *grpc.ClientConn) ServingServiceClient { return &servingServiceClient{cc} } -func (c *servingServiceClient) GetFeastServingVersion(ctx context.Context, in *GetFeastServingVersionRequest, opts ...grpc.CallOption) (*GetFeastServingVersionResponse, error) { - out := new(GetFeastServingVersionResponse) - err := c.cc.Invoke(ctx, "/feast.serving.ServingService/GetFeastServingVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *servingServiceClient) GetFeastServingType(ctx context.Context, in *GetFeastServingTypeRequest, opts ...grpc.CallOption) (*GetFeastServingTypeResponse, error) { - out := new(GetFeastServingTypeResponse) - err := c.cc.Invoke(ctx, "/feast.serving.ServingService/GetFeastServingType", in, out, opts...) +func (c *servingServiceClient) GetFeastServingInfo(ctx context.Context, in *GetFeastServingInfoRequest, opts ...grpc.CallOption) (*GetFeastServingInfoResponse, error) { + out := new(GetFeastServingInfoResponse) + err := c.cc.Invoke(ctx, "/feast.serving.ServingService/GetFeastServingInfo", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *servingServiceClient) GetOnlineFeatures(ctx context.Context, in *GetFeaturesRequest, opts ...grpc.CallOption) (*GetOnlineFeaturesResponse, error) { +func (c *servingServiceClient) GetOnlineFeatures(ctx context.Context, in *GetOnlineFeaturesRequest, opts ...grpc.CallOption) (*GetOnlineFeaturesResponse, error) { out := new(GetOnlineFeaturesResponse) err := c.cc.Invoke(ctx, "/feast.serving.ServingService/GetOnlineFeatures", in, out, opts...) if err != nil { @@ -911,7 +1100,7 @@ func (c *servingServiceClient) GetOnlineFeatures(ctx context.Context, in *GetFea return out, nil } -func (c *servingServiceClient) GetBatchFeatures(ctx context.Context, in *GetFeaturesRequest, opts ...grpc.CallOption) (*GetBatchFeaturesResponse, error) { +func (c *servingServiceClient) GetBatchFeatures(ctx context.Context, in *GetBatchFeaturesRequest, opts ...grpc.CallOption) (*GetBatchFeaturesResponse, error) { out := new(GetBatchFeaturesResponse) err := c.cc.Invoke(ctx, "/feast.serving.ServingService/GetBatchFeatures", in, out, opts...) if err != nil { @@ -931,12 +1120,10 @@ func (c *servingServiceClient) GetJob(ctx context.Context, in *GetJobRequest, op // ServingServiceServer is the server API for ServingService service. type ServingServiceServer interface { - // Get version information about this Feast serving. - GetFeastServingVersion(context.Context, *GetFeastServingVersionRequest) (*GetFeastServingVersionResponse, error) - // Get Feast serving store type: online or batch. - GetFeastServingType(context.Context, *GetFeastServingTypeRequest) (*GetFeastServingTypeResponse, error) + // Get information about this Feast serving. + GetFeastServingInfo(context.Context, *GetFeastServingInfoRequest) (*GetFeastServingInfoResponse, error) // Get online features synchronously. - GetOnlineFeatures(context.Context, *GetFeaturesRequest) (*GetOnlineFeaturesResponse, error) + GetOnlineFeatures(context.Context, *GetOnlineFeaturesRequest) (*GetOnlineFeaturesResponse, error) // Get batch features asynchronously. // // The client should check the status of the returned job periodically by @@ -945,7 +1132,7 @@ type ServingServiceServer interface { // status = JOB_STATUS_DONE with no error, then the client can check // the file_uris for the location to download feature values data. // The client is assumed to have access to these file URIs. - GetBatchFeatures(context.Context, *GetFeaturesRequest) (*GetBatchFeaturesResponse, error) + GetBatchFeatures(context.Context, *GetBatchFeaturesRequest) (*GetBatchFeaturesResponse, error) // Get the latest job status for batch feature retrieval. GetJob(context.Context, *GetJobRequest) (*GetJobResponse, error) } @@ -954,16 +1141,13 @@ type ServingServiceServer interface { type UnimplementedServingServiceServer struct { } -func (*UnimplementedServingServiceServer) GetFeastServingVersion(ctx context.Context, req *GetFeastServingVersionRequest) (*GetFeastServingVersionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetFeastServingVersion not implemented") -} -func (*UnimplementedServingServiceServer) GetFeastServingType(ctx context.Context, req *GetFeastServingTypeRequest) (*GetFeastServingTypeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetFeastServingType not implemented") +func (*UnimplementedServingServiceServer) GetFeastServingInfo(ctx context.Context, req *GetFeastServingInfoRequest) (*GetFeastServingInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetFeastServingInfo not implemented") } -func (*UnimplementedServingServiceServer) GetOnlineFeatures(ctx context.Context, req *GetFeaturesRequest) (*GetOnlineFeaturesResponse, error) { +func (*UnimplementedServingServiceServer) GetOnlineFeatures(ctx context.Context, req *GetOnlineFeaturesRequest) (*GetOnlineFeaturesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetOnlineFeatures not implemented") } -func (*UnimplementedServingServiceServer) GetBatchFeatures(ctx context.Context, req *GetFeaturesRequest) (*GetBatchFeaturesResponse, error) { +func (*UnimplementedServingServiceServer) GetBatchFeatures(ctx context.Context, req *GetBatchFeaturesRequest) (*GetBatchFeaturesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetBatchFeatures not implemented") } func (*UnimplementedServingServiceServer) GetJob(ctx context.Context, req *GetJobRequest) (*GetJobResponse, error) { @@ -974,44 +1158,26 @@ func RegisterServingServiceServer(s *grpc.Server, srv ServingServiceServer) { s.RegisterService(&_ServingService_serviceDesc, srv) } -func _ServingService_GetFeastServingVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetFeastServingVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServingServiceServer).GetFeastServingVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/feast.serving.ServingService/GetFeastServingVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServingServiceServer).GetFeastServingVersion(ctx, req.(*GetFeastServingVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ServingService_GetFeastServingType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetFeastServingTypeRequest) +func _ServingService_GetFeastServingInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetFeastServingInfoRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(ServingServiceServer).GetFeastServingType(ctx, in) + return srv.(ServingServiceServer).GetFeastServingInfo(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/feast.serving.ServingService/GetFeastServingType", + FullMethod: "/feast.serving.ServingService/GetFeastServingInfo", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServingServiceServer).GetFeastServingType(ctx, req.(*GetFeastServingTypeRequest)) + return srv.(ServingServiceServer).GetFeastServingInfo(ctx, req.(*GetFeastServingInfoRequest)) } return interceptor(ctx, in, info, handler) } func _ServingService_GetOnlineFeatures_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetFeaturesRequest) + in := new(GetOnlineFeaturesRequest) if err := dec(in); err != nil { return nil, err } @@ -1023,13 +1189,13 @@ func _ServingService_GetOnlineFeatures_Handler(srv interface{}, ctx context.Cont FullMethod: "/feast.serving.ServingService/GetOnlineFeatures", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServingServiceServer).GetOnlineFeatures(ctx, req.(*GetFeaturesRequest)) + return srv.(ServingServiceServer).GetOnlineFeatures(ctx, req.(*GetOnlineFeaturesRequest)) } return interceptor(ctx, in, info, handler) } func _ServingService_GetBatchFeatures_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetFeaturesRequest) + in := new(GetBatchFeaturesRequest) if err := dec(in); err != nil { return nil, err } @@ -1041,7 +1207,7 @@ func _ServingService_GetBatchFeatures_Handler(srv interface{}, ctx context.Conte FullMethod: "/feast.serving.ServingService/GetBatchFeatures", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServingServiceServer).GetBatchFeatures(ctx, req.(*GetFeaturesRequest)) + return srv.(ServingServiceServer).GetBatchFeatures(ctx, req.(*GetBatchFeaturesRequest)) } return interceptor(ctx, in, info, handler) } @@ -1069,12 +1235,8 @@ var _ServingService_serviceDesc = grpc.ServiceDesc{ HandlerType: (*ServingServiceServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "GetFeastServingVersion", - Handler: _ServingService_GetFeastServingVersion_Handler, - }, - { - MethodName: "GetFeastServingType", - Handler: _ServingService_GetFeastServingType_Handler, + MethodName: "GetFeastServingInfo", + Handler: _ServingService_GetFeastServingInfo_Handler, }, { MethodName: "GetOnlineFeatures", diff --git a/sdk/go/request.go b/sdk/go/request.go new file mode 100644 index 00000000000..a69ab8b55f1 --- /dev/null +++ b/sdk/go/request.go @@ -0,0 +1,73 @@ +package feast + +import ( + "fmt" + "github.com/gojek/feast/sdk/go/protos/feast/serving" + "strconv" + "strings" +) + +var ( + ErrInvalidFeatureName = "Invalid feature name %s provided, feature names must be in the format featureSet:version:featureName." +) + +// OnlineFeaturesRequest wrapper on feast.serving.GetOnlineFeaturesRequest. +type OnlineFeaturesRequest struct { + + // Features is the list of features to obtain from Feast. Each feature must be given by its fully qualified ID, + // in the format featureSet:version:featureName. + Features []string + + // Entities is the list of entity rows to retrieve features on. Each row is a map of entity name to entity value. + Entities []Row +} + +// Builds the feast-specified request payload from the wrapper. +func (r OnlineFeaturesRequest) buildRequest() (*serving.GetOnlineFeaturesRequest, error) { + featureSets, err := buildFeatureSets(r.Features) + if err != nil { + return nil, err + } + + entityRows := make([]*serving.GetOnlineFeaturesRequest_EntityRow, len(r.Entities)) + + for i := range r.Entities { + entityRows[i] = &serving.GetOnlineFeaturesRequest_EntityRow{ + Fields: r.Entities[i], + } + } + return &serving.GetOnlineFeaturesRequest{ + FeatureSets: featureSets, + EntityRows: entityRows, + }, nil +} + +func buildFeatureSets(features []string) ([]*serving.GetOnlineFeaturesRequest_FeatureSet, error) { + featureSetMap := map[string]*serving.GetOnlineFeaturesRequest_FeatureSet{} + for _, feature := range features { + split := strings.Split(feature, ":") + if len(split) != 3 { + return nil, fmt.Errorf(ErrInvalidFeatureName, feature) + } + featureSetName, featureSetVersion, featureName := split[0], split[1], split[2] + key := featureSetName + ":" + featureSetVersion + if fs, ok := featureSetMap[key]; !ok { + version, err := strconv.Atoi(featureSetVersion) + if err != nil { + return nil, fmt.Errorf(ErrInvalidFeatureName, feature) + } + featureSetMap[key] = &serving.GetOnlineFeaturesRequest_FeatureSet{ + Name: featureSetName, + Version: int32(version), + FeatureNames: []string{featureName}, + } + } else { + fs.FeatureNames = append(fs.GetFeatureNames(), featureName) + } + } + var featureSets []*serving.GetOnlineFeaturesRequest_FeatureSet + for _, featureSet := range featureSetMap { + featureSets = append(featureSets, featureSet) + } + return featureSets, nil +} diff --git a/sdk/go/request_test.go b/sdk/go/request_test.go new file mode 100644 index 00000000000..2cf67be1514 --- /dev/null +++ b/sdk/go/request_test.go @@ -0,0 +1,106 @@ +package feast + +import ( + "fmt" + "github.com/gojek/feast/sdk/go/protos/feast/serving" + "github.com/gojek/feast/sdk/go/protos/feast/types" + json "github.com/golang/protobuf/jsonpb" + "github.com/google/go-cmp/cmp" + "testing" +) + +func TestGetOnlineFeaturesRequest(t *testing.T) { + tt := []struct { + name string + req OnlineFeaturesRequest + want *serving.GetOnlineFeaturesRequest + wantErr bool + err error + }{ + { + name: "valid", + req: OnlineFeaturesRequest{ + Features: []string{"fs:1:feature1", "fs:1:feature2", "fs:2:feature1"}, + Entities: []Row{ + {"entity1": Int64Val(1), "entity2": StrVal("bob")}, + {"entity1": Int64Val(1), "entity2": StrVal("annie")}, + {"entity1": Int64Val(1), "entity2": StrVal("jane")}, + }, + }, + want: &serving.GetOnlineFeaturesRequest{ + FeatureSets: []*serving.GetOnlineFeaturesRequest_FeatureSet{ + { + Name: "fs", + Version: 1, + FeatureNames: []string{"feature1", "feature2"}, + }, + { + Name: "fs", + Version: 2, + FeatureNames: []string{"feature1"}, + }, + }, + EntityRows: []*serving.GetOnlineFeaturesRequest_EntityRow{ + { + Fields: map[string]*types.Value{ + "entity1": Int64Val(1), + "entity2": StrVal("bob"), + }, + }, + { + Fields: map[string]*types.Value{ + "entity1": Int64Val(1), + "entity2": StrVal("annie"), + }, + }, + { + Fields: map[string]*types.Value{ + "entity1": Int64Val(1), + "entity2": StrVal("jane"), + }, + }, + }, + OmitEntitiesInResponse: false, + }, + wantErr: false, + err: nil, + }, + { + name: "invalid_feature_name/wrong_format", + req: OnlineFeaturesRequest{ + Features: []string{"fs1:feature1"}, + Entities: []Row{}, + }, + wantErr: true, + err: fmt.Errorf(ErrInvalidFeatureName, "fs1:feature1"), + }, + { + name: "invalid_feature_name/invalid_version", + req: OnlineFeaturesRequest{ + Features: []string{"fs:a:feature1"}, + Entities: []Row{}, + }, + wantErr: true, + err: fmt.Errorf(ErrInvalidFeatureName, "fs:a:feature1"), + }, + } + for _, tc := range tt { + t.Run(tc.name, func(t *testing.T) { + got, err := tc.req.buildRequest() + if (err != nil) != tc.wantErr { + t.Errorf("error = %v, wantErr %v", err, tc.wantErr) + return + } + if tc.wantErr && err.Error() != tc.err.Error() { + t.Errorf("error = %v, expected err = %v", err, tc.err) + return + } + if !cmp.Equal(got, tc.want) { + m := json.Marshaler{} + gotJson, _ := m.MarshalToString(got) + wantJson, _ := m.MarshalToString(tc.want) + t.Errorf("got: \n%v\nwant:\n%v", gotJson, wantJson) + } + }) + } +} diff --git a/sdk/go/response.go b/sdk/go/response.go new file mode 100644 index 00000000000..086321cacdf --- /dev/null +++ b/sdk/go/response.go @@ -0,0 +1,81 @@ +package feast + +import ( + "fmt" + "github.com/gojek/feast/sdk/go/protos/feast/serving" + "github.com/gojek/feast/sdk/go/protos/feast/types" +) + +var ( + ErrLengthMismatch = "Length mismatch; number of na values (%d) not equal to number of features requested (%d)." + ErrFeatureNotFound = "Feature %s not found in response." + ErrTypeMismatch = "Requested output of type %s does not match type of feature value returned." +) + +// OnlineFeaturesResponse is a wrapper around serving.GetOnlineFeaturesResponse. +type OnlineFeaturesResponse struct { + RawResponse *serving.GetOnlineFeaturesResponse +} + +// Rows retrieves the result of the request as a list of Rows. +func (r OnlineFeaturesResponse) Rows() []Row { + rows := make([]Row, len(r.RawResponse.FieldValues)) + for i, val := range r.RawResponse.FieldValues { + rows[i] = val.Fields + } + return rows +} + +// Int64Arrays retrieves the result of the request as a list of int64 slices. Any missing values will be filled +// with the missing values provided. +func (r OnlineFeaturesResponse) Int64Arrays(order []string, fillNa []int64) ([][]int64, error) { + rows := make([][]int64, len(r.RawResponse.FieldValues)) + if len(fillNa) != len(order) { + return nil, fmt.Errorf(ErrLengthMismatch, len(fillNa), len(order)) + } + for i, val := range r.RawResponse.FieldValues { + rows[i] = make([]int64, len(order)) + for j, fname := range order { + fValue, exists := val.Fields[fname] + if !exists { + return nil, fmt.Errorf(ErrFeatureNotFound, fname) + } + val := fValue.GetVal() + if val == nil { + rows[i][j] = fillNa[j] + } else if int64Val, ok := val.(*types.Value_Int64Val); ok { + rows[i][j] = int64Val.Int64Val + } else { + return nil, fmt.Errorf(ErrTypeMismatch, "int64") + } + } + } + return rows, nil +} + +// Float64Arrays retrieves the result of the request as a list of float64 slices. Any missing values will be filled +// with the missing values provided. +func (r OnlineFeaturesResponse) Float64Arrays(order []string, fillNa []float64) ([][]float64, error) { + rows := make([][]float64, len(r.RawResponse.FieldValues)) + if len(fillNa) != len(order) { + return nil, fmt.Errorf(ErrLengthMismatch, len(fillNa), len(order)) + } + for i, val := range r.RawResponse.FieldValues { + rows[i] = make([]float64, len(order)) + for j, fname := range order { + fValue, exists := val.Fields[fname] + if !exists { + return nil, fmt.Errorf(ErrFeatureNotFound, fname) + } + val := fValue.GetVal() + if val == nil { + rows[i][j] = fillNa[j] + } else if doubleVal, ok := val.(*types.Value_DoubleVal); ok { + rows[i][j] = doubleVal.DoubleVal + } else { + return nil, fmt.Errorf(ErrTypeMismatch, "float64") + } + } + } + return rows, nil +} diff --git a/sdk/go/response_test.go b/sdk/go/response_test.go new file mode 100644 index 00000000000..9975457c147 --- /dev/null +++ b/sdk/go/response_test.go @@ -0,0 +1,99 @@ +package feast + +import ( + "fmt" + "github.com/gojek/feast/sdk/go/protos/feast/serving" + "github.com/gojek/feast/sdk/go/protos/feast/types" + "github.com/google/go-cmp/cmp" + "testing" +) + +var response = OnlineFeaturesResponse{ +RawResponse: &serving.GetOnlineFeaturesResponse{ + FieldValues: []*serving.GetOnlineFeaturesResponse_FieldValues{ + { + Fields: map[string]*types.Value{ + "fs:1:feature1": Int64Val(1), + "fs:1:feature2": &types.Value{}, + }, + }, + { + Fields: map[string]*types.Value{ + "fs:1:feature1": Int64Val(2), + "fs:1:feature2": Int64Val(2), + }, + }, + }, +}, +} + +func TestOnlineFeaturesResponseToRow(t *testing.T) { + actual := response.Rows() + expected := []Row{ + {"fs:1:feature1": Int64Val(1), "fs:1:feature2": &types.Value{}}, + {"fs:1:feature1": Int64Val(2), "fs:1:feature2": Int64Val(2)}, + } + if !cmp.Equal(actual, expected) { + t.Errorf("expected: %v, got: %v", expected, actual) + } +} + +func TestOnlineFeaturesResponseToInt64Array(t *testing.T) { + type args struct { + order []string + fillNa []int64 + } + tt := []struct { + name string + args args + want [][]int64 + wantErr bool + err error + }{ + { + name: "valid", + args: args{ + order: []string{"fs:1:feature2", "fs:1:feature1"}, + fillNa: []int64{-1, -1}, + }, + want: [][]int64{{-1, 1}, {2, 2}}, + wantErr: false, + }, + { + name: "length mismatch", + args: args{ + order: []string{"fs:1:feature2", "fs:1:feature1"}, + fillNa: []int64{-1}, + }, + want: nil, + wantErr: true, + err: fmt.Errorf(ErrLengthMismatch, 1, 2), + }, + { + name: "length mismatch", + args: args{ + order: []string{"fs:1:feature2", "fs:1:feature3"}, + fillNa: []int64{-1, -1}, + }, + want: nil, + wantErr: true, + err: fmt.Errorf(ErrFeatureNotFound, "fs:1:feature3"), + }, + } + for _, tc := range tt { + t.Run(tc.name, func(t *testing.T) { + got, err := response.Int64Arrays(tc.args.order, tc.args.fillNa) + if (err != nil) != tc.wantErr { + t.Errorf("error = %v, wantErr %v", err, tc.wantErr) + return + } + if tc.wantErr && err.Error() != tc.err.Error() { + t.Errorf("error = %v, expected err = %v", err, tc.err) + return + } + if !cmp.Equal(got, tc.want) { + t.Errorf("got: \n%v\nwant:\n%v", got, tc.want) + } + }) + } +} \ No newline at end of file diff --git a/sdk/go/types.go b/sdk/go/types.go new file mode 100644 index 00000000000..50a5477f132 --- /dev/null +++ b/sdk/go/types.go @@ -0,0 +1,35 @@ +package feast + +import "github.com/gojek/feast/sdk/go/protos/feast/types" + +type Row map[string]*types.Value + +// StrVal is a int64 type feast value +func StrVal(val string) *types.Value { + return &types.Value{Val: &types.Value_StringVal{StringVal: val}} +} + +// Int32Val is a int64 type feast value +func Int32Val(val int32) *types.Value { + return &types.Value{Val: &types.Value_Int32Val{Int32Val: val}} +} + +// Int64Val is a int64 type feast value +func Int64Val(val int64) *types.Value { + return &types.Value{Val: &types.Value_Int64Val{Int64Val: val}} +} + +// DoubleVal is a float64 type feast value +func DoubleVal(val float64) *types.Value { + return &types.Value{Val: &types.Value_DoubleVal{DoubleVal: val}} +} + +// BoolVal is a bool type feast value +func BoolVal(val bool) *types.Value { + return &types.Value{Val: &types.Value_BoolVal{BoolVal: val}} +} + +// BytesVal is a bytes type feast value +func BytesVal(val []byte) *types.Value { + return &types.Value{Val: &types.Value_BytesVal{BytesVal: val}} +} \ No newline at end of file