Skip to content

Commit

Permalink
Add online store info (#2834)
Browse files Browse the repository at this point in the history
* Update protobuf

Signed-off-by: khorshuheng <khor.heng@gojek.com>

* Add online store information to feature table proto

Signed-off-by: khorshuheng <khor.heng@gojek.com>

* Linting

Signed-off-by: khorshuheng <khor.heng@gojek.com>

* allow online store to be set on feature table

Signed-off-by: khorshuheng <khor.heng@gojek.com>

Co-authored-by: khorshuheng <khor.heng@gojek.com>
  • Loading branch information
khorshuheng and khorshuheng committed Jun 26, 2022
1 parent ab50941 commit 0e38403
Show file tree
Hide file tree
Showing 27 changed files with 3,188 additions and 2,460 deletions.
9 changes: 9 additions & 0 deletions protos/feast/core/FeatureTable.proto
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
import "feast/core/DataSource.proto";
import "feast/core/Feature.proto";
import "feast/core/OnlineStore.proto";

message FeatureTable {
// User-specified specifications of this feature table.
Expand Down Expand Up @@ -65,6 +66,14 @@ message FeatureTableSpec {
// Only stream DataSource can be specified
// (ie source type should start with 'STREAM_')
DataSource stream_source = 8;


// Used by Feast Serving to indicate that feature is stale.
// Must be less than max_age, since after max_age feature most probably will be garbage collected
google.protobuf.Duration staleness_threshold = 9;

// Database where features are stored for online serving
OnlineStore online_store = 10;
}

message FeatureTableMeta {
Expand Down
53 changes: 53 additions & 0 deletions protos/feast/core/OnlineStore.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
//
// * Copyright 2022 The Feast Authors
// *
// * Licensed under the Apache License, Version 2.0 (the "License");
// * you may not use this file except in compliance with the License.
// * You may obtain a copy of the License at
// *
// * https://www.apache.org/licenses/LICENSE-2.0
// *
// * Unless required by applicable law or agreed to in writing, software
// * distributed under the License is distributed on an "AS IS" BASIS,
// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// * See the License for the specific language governing permissions and
// * limitations under the License.
//

syntax = "proto3";
package feast.core;

option java_package = "feast.proto.core";
option java_outer_classname = "OnlineStoreProto";
option go_package = "github.com/feast-dev/feast/sdk/go/protos/feast/core";

import "google/protobuf/duration.proto";

// OnlineStore provides a location where Feast reads and writes feature values.
// Feature values will be written to the Store in the form of FeatureRow elements.
// The way FeatureRow is encoded and decoded when it is written to and read from
// the Store depends on the type of the Store.
//
message OnlineStore {

// Name of the store.
string name = 1;

// Type of store.
StoreType type = 2;

// Description.
string description = 3;

}

enum StoreType {
// Unset
UNSET = 0;

// google cloud NOSQL database service
BIGTABLE = 1;

// redis in-memory database
REDIS = 2;
}
4 changes: 2 additions & 2 deletions sdk/python/feast/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ def create_project(self, project: str):
CreateProjectRequest(name=project),
timeout=self._config.getint(opt.GRPC_CONNECTION_TIMEOUT),
metadata=self._get_grpc_metadata(),
) # type: CreateProjectResponse
)

def archive_project(self, project):
"""
Expand All @@ -475,7 +475,7 @@ def archive_project(self, project):
ArchiveProjectRequest(name=project),
timeout=self._config.getint(opt.GRPC_CONNECTION_TIMEOUT),
metadata=self._get_grpc_metadata(),
) # type: ArchiveProjectResponse
)
except grpc.RpcError as e:
raise grpc.RpcError(e.details())

Expand Down

0 comments on commit 0e38403

Please sign in to comment.