Skip to content

Commit 155d1ed

Browse files
committed
fix feature view proto
Signed-off-by: HaoXuAI <sduxuhao@gmail.com>
1 parent a09b7e5 commit 155d1ed

File tree

3 files changed

+20
-12
lines changed

3 files changed

+20
-12
lines changed

sdk/python/feast/feature_view.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,7 @@ def to_proto(self) -> FeatureViewProto:
365365
owner=self.owner,
366366
ttl=(ttl_duration if ttl_duration is not None else None),
367367
online=self.online,
368+
offline=self.offline,
368369
batch_source=batch_source_proto,
369370
stream_source=stream_source_proto,
370371
)
@@ -414,6 +415,7 @@ def from_proto(cls, feature_view_proto: FeatureViewProto):
414415
tags=dict(feature_view_proto.spec.tags),
415416
owner=feature_view_proto.spec.owner,
416417
online=feature_view_proto.spec.online,
418+
offline=feature_view_proto.spec.offline,
417419
ttl=(
418420
timedelta(days=0)
419421
if feature_view_proto.spec.ttl.ToNanoseconds() == 0

sdk/python/feast/protos/feast/core/FeatureView_pb2.py

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/python/feast/protos/feast/core/FeatureView_pb2.pyi

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ class FeatureViewSpec(google.protobuf.message.Message):
9090
BATCH_SOURCE_FIELD_NUMBER: builtins.int
9191
STREAM_SOURCE_FIELD_NUMBER: builtins.int
9292
ONLINE_FIELD_NUMBER: builtins.int
93+
OFFLINE_FIELD_NUMBER: builtins.int
9394
name: builtins.str
9495
"""Name of the feature view. Must be unique. Not updated."""
9596
project: builtins.str
@@ -124,7 +125,11 @@ class FeatureViewSpec(google.protobuf.message.Message):
124125
def stream_source(self) -> feast.core.DataSource_pb2.DataSource:
125126
"""Streaming DataSource from where this view can consume "online" feature data."""
126127
online: builtins.bool
127-
"""Whether these features should be served online or not"""
128+
"""Whether these features should be served online or not
129+
This is also used to determine whether the features should be written to the online store
130+
"""
131+
offline: builtins.bool
132+
"""Whether these features should be written to the offline store"""
128133
def __init__(
129134
self,
130135
*,
@@ -140,9 +145,10 @@ class FeatureViewSpec(google.protobuf.message.Message):
140145
batch_source: feast.core.DataSource_pb2.DataSource | None = ...,
141146
stream_source: feast.core.DataSource_pb2.DataSource | None = ...,
142147
online: builtins.bool = ...,
148+
offline: builtins.bool = ...,
143149
) -> None: ...
144150
def HasField(self, field_name: typing_extensions.Literal["batch_source", b"batch_source", "stream_source", b"stream_source", "ttl", b"ttl"]) -> builtins.bool: ...
145-
def ClearField(self, field_name: typing_extensions.Literal["batch_source", b"batch_source", "description", b"description", "entities", b"entities", "entity_columns", b"entity_columns", "features", b"features", "name", b"name", "online", b"online", "owner", b"owner", "project", b"project", "stream_source", b"stream_source", "tags", b"tags", "ttl", b"ttl"]) -> None: ...
151+
def ClearField(self, field_name: typing_extensions.Literal["batch_source", b"batch_source", "description", b"description", "entities", b"entities", "entity_columns", b"entity_columns", "features", b"features", "name", b"name", "offline", b"offline", "online", b"online", "owner", b"owner", "project", b"project", "stream_source", b"stream_source", "tags", b"tags", "ttl", b"ttl"]) -> None: ...
146152

147153
global___FeatureViewSpec = FeatureViewSpec
148154

0 commit comments

Comments
 (0)