Skip to content

Commit 13fa653

Browse files
committed
Address review comments
Signed-off-by: Kevin Zhang <[email protected]>
1 parent f283f72 commit 13fa653

File tree

6 files changed

+11
-243
lines changed

6 files changed

+11
-243
lines changed

sdk/python/feast/feature_store.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1371,7 +1371,7 @@ def write_to_online_store(
13711371
provider.ingest_df(feature_view, entities, df)
13721372

13731373
@log_exceptions_and_usage
1374-
def write_to_offline_store(
1374+
def _write_to_offline_store(
13751375
self,
13761376
feature_view_name: str,
13771377
df: pd.DataFrame,

sdk/python/feast/infra/offline_stores/file.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -407,23 +407,23 @@ def write_logged_features(
407407
@staticmethod
408408
def offline_write_batch(
409409
config: RepoConfig,
410-
table: FeatureView,
410+
feature_view: FeatureView,
411411
data: pyarrow.Table,
412412
progress: Optional[Callable[[int], Any]],
413413
):
414-
if not table.batch_source:
414+
if not feature_view.batch_source:
415415
raise ValueError(
416416
"feature view does not have a batch source to persist offline data"
417417
)
418418
if not isinstance(config.offline_store, FileOfflineStoreConfig):
419419
raise ValueError(
420420
f"offline store config is of type {type(config.offline_store)} when file type required"
421421
)
422-
if not isinstance(table.batch_source, FileSource):
422+
if not isinstance(feature_view.batch_source, FileSource):
423423
raise ValueError(
424-
f"feature view batch source is {type(table.batch_source)} not file source"
424+
f"feature view batch source is {type(feature_view.batch_source)} not file source"
425425
)
426-
file_options = table.batch_source.file_options
426+
file_options = feature_view.batch_source.file_options
427427
filesystem, path = FileSource.create_filesystem_and_path(
428428
file_options.uri, file_options.s3_endpoint_override
429429
)

sdk/python/feast/infra/offline_stores/offline_store.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ def write_logged_features(
274274
@staticmethod
275275
def offline_write_batch(
276276
config: RepoConfig,
277-
table: FeatureView,
277+
feature_view: FeatureView,
278278
data: pyarrow.Table,
279279
progress: Optional[Callable[[int], Any]],
280280
):

sdk/python/feast/infra/passthrough_provider.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,6 @@ def offline_write_batch(
109109
) -> None:
110110
set_usage_attribute("provider", self.__class__.__name__)
111111

112-
if "created" not in data.column_names:
113-
raise ValueError("input dataframe must have a created timestamp column")
114-
115112
if self.offline_store:
116113
self.offline_store.offline_write_batch(config, table, data, progress)
117114

sdk/python/tests/integration/offline_store/test_offline_push.py

Lines changed: 0 additions & 229 deletions
This file was deleted.

sdk/python/tests/integration/offline_store/test_offline_write.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def test_writing_incorrect_order_fails(environment, universal_data_sources):
5353
},
5454
)
5555
with pytest.raises(ValueError):
56-
store.write_to_offline_store(
56+
store._write_to_offline_store(
5757
driver_stats.name, expected_df, allow_registry_cache=False
5858
)
5959

@@ -101,7 +101,7 @@ def test_writing_incorrect_schema_fails(environment, universal_data_sources):
101101
},
102102
)
103103
with pytest.raises(ValueError):
104-
store.write_to_offline_store(
104+
store._write_to_offline_store(
105105
driver_stats.name, expected_df, allow_registry_cache=False
106106
)
107107

@@ -153,7 +153,7 @@ def test_writing_consecutively_to_offline_store(environment, universal_data_sour
153153
"created": [ts, ts],
154154
},
155155
)
156-
store.write_to_offline_store(
156+
store._write_to_offline_store(
157157
driver_stats.name, first_df, allow_registry_cache=False
158158
)
159159

@@ -184,7 +184,7 @@ def test_writing_consecutively_to_offline_store(environment, universal_data_sour
184184
},
185185
)
186186

187-
store.write_to_offline_store(
187+
store._write_to_offline_store(
188188
driver_stats.name, second_df, allow_registry_cache=False
189189
)
190190

0 commit comments

Comments
 (0)