Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added init prepared statement call and updated parameters to td.get_serving_vector #720

Merged
merged 1 commit into from
Jul 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions python/hsfs/training_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,9 @@ def get_serving_vector(
`list` List of feature values related to provided primary keys, ordered according to positions of this
features in training dataset query.
"""
return self._vector_server.get_feature_vector(entry, external)
if self._vector_server.prepared_statements is None:
self.init_prepared_statement(None, external)
return self._vector_server.get_feature_vector(entry)

def get_serving_vectors(
self, entry: Dict[str, List[Any]], external: Optional[bool] = None
Expand All @@ -792,7 +794,9 @@ def get_serving_vectors(
`List[list]` List of lists of feature values related to provided primary keys, ordered according to
positions of this features in training dataset query.
"""
return self._vector_server.get_feature_vectors(entry, external)
if self._vector_server.prepared_statements is None:
self.init_prepared_statement(None, external)
return self._vector_server.get_feature_vectors(entry)

@property
def label(self):
Expand Down