Skip to content

Commit

Permalink
[Feature Store] Throw error if trying to read from online service wit…
Browse files Browse the repository at this point in the history
…hout an online target (#1175)
  • Loading branch information
dinal committed Aug 2, 2021
1 parent 22a0af7 commit 427ee44
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mlrun/datastore/store_resources.py
Expand Up @@ -92,7 +92,7 @@ def get_table(self, uri):
target = get_online_target(resource)
if not target:
raise mlrun.errors.MLRunInvalidArgumentError(
f"resource {uri} does not have an online data source"
f"resource {uri} does not have an online data target"
)
self._tabels[uri] = target.get_table_object()
return self._tabels[uri]
Expand Down
4 changes: 4 additions & 0 deletions mlrun/feature_store/retrieval/online.py
Expand Up @@ -70,6 +70,10 @@ def init_feature_vector_graph(vector):
index_columns = []
for featureset in feature_set_objects.values():
driver = get_online_target(featureset)
if not driver:
raise mlrun.errors.MLRunInvalidArgumentError(
f"resource {featureset.uri} does not have an online data target"
)
cache.cache_table(featureset.uri, driver.get_table_object())
for key in featureset.spec.entities.keys():
if not vector.spec.with_indexes and key not in index_columns:
Expand Down

0 comments on commit 427ee44

Please sign in to comment.