File tree Expand file tree Collapse file tree 3 files changed +28
-0
lines changed
Expand file tree Collapse file tree 3 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -210,6 +210,17 @@ test-python-universal-spark: ## Run Python Spark integration tests
210210 not test_snowflake" \
211211 sdk/python/tests
212212
213+ test-python-historical-retrieval :
214+ # # Run Python historical retrieval integration tests
215+ PYTHONPATH=' .' \
216+ FULL_REPO_CONFIGS_MODULE=sdk.python.feast.infra.offline_stores.contrib.spark_repo_configuration \
217+ PYTEST_PLUGINS=feast.infra.offline_stores.contrib.spark_offline_store.tests \
218+ python -m pytest -n 8 --integration \
219+ -k "test_historical_retrieval_with_validation or \
220+ test_historical_features_persisting or \
221+ test_historical_retrieval_fails_on_validation" \
222+ sdk/python/tests
223+
213224test-python-universal-trino : # # Run Python Trino integration tests
214225 PYTHONPATH=' .' \
215226 FULL_REPO_CONFIGS_MODULE=sdk.python.feast.infra.offline_stores.contrib.trino_repo_configuration \
Original file line number Diff line number Diff line change @@ -264,3 +264,8 @@ exclude = [
264264 " .pyi" ,
265265 " protos" ,
266266 " sdk/python/feast/embedded_go/lib" ]
267+
268+ [dependency-groups ]
269+ dev = [
270+ " pytest-xdist>=3.8.0" ,
271+ ]
Original file line number Diff line number Diff line change 1212# See the License for the specific language governing permissions and
1313# limitations under the License.
1414import asyncio
15+ import copy
1516import itertools
1617import os
1718import warnings
@@ -1233,6 +1234,17 @@ def get_historical_features(
12331234 # TODO(achal): _group_feature_refs returns the on demand feature views, but it's not passed into the provider.
12341235 # This is a weird interface quirk - we should revisit the `get_historical_features` to
12351236 # pass in the on demand feature views as well.
1237+
1238+ # Deliberately disable writing to online store for ODFVs during historical retrieval
1239+ # since it's not applicable in this context.
1240+ # This does not change the output, since it forces to recompute ODFVs on historical retrieval
1241+ # but that is fine, since ODFVs precompute does not to work for historical retrieval (as per docs), only for online retrieval
1242+ # Copy to avoid side effects outside of this method
1243+ all_on_demand_feature_views = copy .deepcopy (all_on_demand_feature_views )
1244+
1245+ for odfv in all_on_demand_feature_views :
1246+ odfv .write_to_online_store = False
1247+
12361248 fvs , odfvs = utils ._group_feature_refs (
12371249 _feature_refs ,
12381250 all_feature_views ,
You can’t perform that action at this time.
0 commit comments