-
Notifications
You must be signed in to change notification settings - Fork 44
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
[FSTORE-1185] Real-time retrieval of feature vector via RonDB REST API #1228
Conversation
entry=entry, | ||
passed_features=passed_features, | ||
return_type=self._rondb_engine.RETURN_TYPE_FEATURE_VECTOR, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a note for future improvement: since the result returned from rest API is a vector, it can be used directly if _apply_transformation
use the feature index instead of feature name for transformation. So it does not need to convert from list to dict and then back to list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point, I will add it to the list of possible future improvements in the design log
… client in get_feature_vector(s)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should discuss with others about if we should support both client in a single fv.
@@ -295,6 +295,9 @@ def replace_public_host(self, url): | |||
"""no need to replace as we are already in external client""" | |||
return url | |||
|
|||
def _is_external(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why set private is it is used by other class?
else: | ||
warn( | ||
"Online Store Rest Client is already initialised. To reset connection or/and override configuration, " | ||
+ "use reset_online_store_rest_client or get_instance methods with optional configuration" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get_instance
below do not take any arguments
python/hsfs/feature_view.py
Outdated
@@ -78,7 +78,7 @@ def __init__( | |||
self._query = query | |||
self._featurestore_id = featurestore_id | |||
self._feature_store_id = featurestore_id # for consistency with feature group | |||
self._feature_store_name = featurestore_name | |||
self._feature_store_name = util.strip_feature_store_suffix(featurestore_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can be a breaking change. maybe create another variable instead?
@@ -211,9 +215,19 @@ def init_serving( | |||
training_dataset_version: Optional[int] = None, | |||
external: Optional[bool] = None, | |||
options: Optional[dict] = None, | |||
init_online_store_sql_client: Optional[bool] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the use case of supporting both client in a single feature view instance? It seems that the motivation of using rest client is that sql client is not available. Alternatively, users can create 2 fv instance and init_serving
with different clients.
options: Additional options as key/value pairs for configuring online serving engine. | ||
* key: kwargs of SqlAlchemy engine creation (See: https://docs.sqlalchemy.org/en/20/core/engines.html#sqlalchemy.create_engine). | ||
For example: `{"pool_size": 10}` | ||
* key: "config_online_store_rest_client" - dict, optional. Optional configuration options to override defaults for the Online Store REST Client. | ||
* key: "reset_online_store_rest_client" - bool, optional. If set to True, the Online Store REST Client will be reset. Provide |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand what's the purpose of this reset_online_store_rest_client
flag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Force overwriting the connection with new config details
options: Additional options as key/value pairs for configuring online serving engine. | ||
* key: kwargs of SqlAlchemy engine creation (See: https://docs.sqlalchemy.org/en/20/core/engines.html#sqlalchemy.create_engine). | ||
For example: `{"pool_size": 10}` | ||
* key: "config_online_store_rest_client" - dict, optional. Optional configuration options to override defaults for the Online Store REST Client. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm missing which options users can provide in this dictionary.
@@ -0,0 +1 @@ | |||
{"type": "service_account", "project_id": "test"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is generated by some storage connector test. We should put it in the gitignore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
This PR adds/fixes/changes...
JIRA Issue: -
Priority for Review: -
Related PRs: -
How Has This Been Tested?
Checklist For The Assigned Reviewer: