Skip to content

Commit 977221f

Browse files
committed
Fix
Signed-off-by: Kevin Zhang <kzhang@tecton.ai>
1 parent c4b2519 commit 977221f

File tree

2 files changed

+34
-23
lines changed

2 files changed

+34
-23
lines changed

docs/how-to-guides/adding-a-new-offline-store.md

Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -63,19 +63,15 @@ To fully implement the interface for the offline store, you will need to impleme
6363
entity_df: Union[pd.DataFrame, str],
6464
registry: Registry, project: str,
6565
full_feature_names: bool = False) -> RetrievalJob:
66-
print("Getting historical features from my offline store")
66+
""" Perform point-in-time correct join of features onto an entity dataframe(entity key and timestamp). More details about how this should work at https://docs.feast.dev/v/v0.6-branch/user-guide/feature-retrieval#3.-historical-feature-retrieval.
67+
print("Getting historical features from my offline store")."""
6768
warnings.warn(
6869
"This offline store is an experimental feature in alpha development. "
6970
"Some functionality may still be unstable so functionality can change in the future.",
7071
RuntimeWarning,
7172
)
72-
return super().get_historical_features(config,
73-
feature_views,
74-
feature_refs,
75-
entity_df,
76-
registry,
77-
project,
78-
full_feature_names)
73+
# Implementation here.
74+
pass
7975

8076
def pull_latest_from_table_or_query(self,
8177
config: RepoConfig,
@@ -86,20 +82,15 @@ To fully implement the interface for the offline store, you will need to impleme
8682
created_timestamp_column: Optional[str],
8783
start_date: datetime,
8884
end_date: datetime) -> RetrievalJob:
85+
""" Pulls data from the offline store for use in materialization."""
8986
print("Pulling latest features from my offline store")
9087
warnings.warn(
9188
"This offline store is an experimental feature in alpha development. "
9289
"Some functionality may still be unstable so functionality can change in the future.",
9390
RuntimeWarning,
9491
)
95-
return super().pull_latest_from_table_or_query(config,
96-
data_source,
97-
join_key_columns,
98-
feature_name_columns,
99-
timestamp_field=timestamp_field,
100-
created_timestamp_column,
101-
start_date,
102-
end_date)
92+
# Implementation here.
93+
pass
10394

10495
def pull_all_from_table_or_query(
10596
config: RepoConfig,
@@ -110,8 +101,14 @@ To fully implement the interface for the offline store, you will need to impleme
110101
start_date: datetime,
111102
end_date: datetime,
112103
) -> RetrievalJob:
113-
return super().pull_all_from_table_or_query(
114-
config, data_source, join_key_columns, feature_name_columns, timestamp_field, start_date, end_date)
104+
""" Optional method that returns a Retrieval Job for all join key columns, feature name columns, and the event timestamp columns that occur between the start_date and end_date."""
105+
warnings.warn(
106+
"This offline store is an experimental feature in alpha development. "
107+
"Some functionality may still be unstable so functionality can change in the future.",
108+
RuntimeWarning,
109+
)
110+
# Implementation here.
111+
pass
115112

116113
def write_logged_features(
117114
config: RepoConfig,
@@ -120,7 +117,13 @@ To fully implement the interface for the offline store, you will need to impleme
120117
logging_config: LoggingConfig,
121118
registry: BaseRegistry,
122119
):
123-
""" Optional function to have Feast support logging your online features. """
120+
""" Optional method to have Feast support logging your online features."""
121+
warnings.warn(
122+
"This offline store is an experimental feature in alpha development. "
123+
"Some functionality may still be unstable so functionality can change in the future.",
124+
RuntimeWarning,
125+
)
126+
# Implementation here.
124127
pass
125128

126129
def offline_write_batch(
@@ -129,7 +132,13 @@ To fully implement the interface for the offline store, you will need to impleme
129132
table: pyarrow.Table,
130133
progress: Optional[Callable[[int], Any]],
131134
):
132-
""" Optional function to have Feast support the offline push api for your offline store. """
135+
""" Optional method to have Feast support the offline push api for your offline store."""
136+
warnings.warn(
137+
"This offline store is an experimental feature in alpha development. "
138+
"Some functionality may still be unstable so functionality can change in the future.",
139+
RuntimeWarning,
140+
)
141+
# Implementation here.
133142
pass
134143

135144
```
@@ -359,8 +368,8 @@ Even if you have created the `OfflineStore` class in a separate repo, you can st
359368
```
360369

361370
3. Next, set up your offline store to run the universal integration tests. These are integration tests specifically intended to test offline and online stores against Feast API functionality, to ensure that the Feast APIs works with your offline store.
362-
- To run the integration tests, you must parametrize the integration test suite based on the `FULL_REPO_CONFIGS` variable defined in `sdk/python/tests/integration/feature_repos/repo_configuration.py` to use your own custom offline store.
363-
- To overwrite the default configurations, you can simply create your own file that contains a `FULL_REPO_CONFIGS` dictionary, and point Feast to that file by setting the environment variable `FULL_REPO_CONFIGS_MODULE` to point to that file. The module should add new `IntegrationTestRepoConfig` classes to the `AVAILABLE_OFFLINE_STORES` by defining an offline and online store.
371+
- Feast parametrizes integration tests using the `FULL_REPO_CONFIGS` variable defined in `sdk/python/tests/integration/feature_repos/repo_configuration.py` which stores different offline store classes for testing.
372+
- To overwrite the default configurations to use your own offline store, you can simply create your own file that contains a `FULL_REPO_CONFIGS` dictionary, and point Feast to that file by setting the environment variable `FULL_REPO_CONFIGS_MODULE` to point to that file. The module should add new `IntegrationTestRepoConfig` classes to the `AVAILABLE_OFFLINE_STORES` by defining an offline store that you would like Feast to test with.
364373

365374
A sample `FULL_REPO_CONFIGS_MODULE` looks something like this:
366375

@@ -369,6 +378,8 @@ Even if you have created the `OfflineStore` class in a separate repo, you can st
369378
from feast.infra.offline_stores.contrib.postgres_offline_store.tests.data_source import (
370379
PostgreSQLDataSourceCreator,
371380
)
381+
382+
AVAILABLE_OFFLINE_STORES = [("local", PostgreSQLDataSourceCreator)]
372383
```
373384
{% endcode %}
374385

docs/how-to-guides/adding-support-for-a-new-online-store.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ Even if you have created the `OnlineStore` class in a separate repo, you can sti
316316

317317

318318
2. The universal tests, which are integration tests specifically intended to test offline and online stores, should be run against Feast to ensure that the Feast APIs works with your online store.
319-
- To run the integration tests, you must parametrize the integration test suite based on the `FULL_REPO_CONFIGS` variable defined in `sdk/python/tests/integration/feature_repos/repo_configuration.py` to use your own custom online store.
319+
- Feast parametrizes integration tests using the `FULL_REPO_CONFIGS` variable defined in `sdk/python/tests/integration/feature_repos/repo_configuration.py` which stores different online store classes for testing.
320320
- To overwrite these configurations, you can simply create your own file that contains a `FULL_REPO_CONFIGS` variable, and point Feast to that file by setting the environment variable `FULL_REPO_CONFIGS_MODULE` to point to that file.
321321

322322
A sample `FULL_REPO_CONFIGS_MODULE` looks something like this:

0 commit comments

Comments
 (0)