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

[FSTORE-1269] Extend get_feature_vector in user guide #353

Merged
merged 3 commits into from
Apr 5, 2024

Conversation

kennethmhc
Copy link
Contributor

No description provided.

@@ -4,7 +4,7 @@ Once you have trained a model, it is time to deploy it. You can get back all the
If you want to understand more about the concept of feature vectors, you can refer to [here](../../../concepts/fs/feature_view/online_api.md).

## Retrieval
You can get back feature vectors from either python or java client by providing the primary key value(s) for the feature view. Note that filters defined in feature view and training data will not be applied when feature vectors are returned.
You can get back feature vectors from either python or java client by providing the primary key value(s) for the feature view. Note that filters defined in feature view and training data will not be applied when feature vectors are returned. If you need to retrieve a complete value of feature vectors without missing values, the required `entry` are [feature_view.primary_keys](https://docs.hopsworks.ai/feature-store-api/3.7/generated/api/feature_view_api/#primary_keys). Alternative, you can provide the primary key of the feature groups as the key of the entry. It is also possible to provide a subset of the entry, which will be discussed [below](#partial-feature-retrieval).

=== "Python"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks broken when I look at the preview on Github

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

### Required entry
Starting from python client v3.4, you can specify different values for the primary key of the same name which exists in multiple feature groups but is not used as the join key. The table below summarises the value of `primary_keys` in different settings. Considering that you are joining 2 feature groups, namely, `left_fg` and `right_fg`, the feature groups have different primary keys, and features (`feature_*`) in each setting. Also, the 2 feature groups are [joint](https://docs.hopsworks.ai/feature-store-api/3.7/generated/api/query_api/#join) on different *join conditions* and *prefix* as `left_fg.join(right_fg, <join conditions>, prefix=<prefix>)`.

For java client, and python client before v3.4, the `primary_keys` are the set of primary key of all the feature groups in the query. These key are also compatible to python client starting from v3.4.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"These key are also compatible to python client starting from v3.4."
What do you mean?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I rewrite it.


For java client, and python client before v3.4, the `primary_keys` are the set of primary key of all the feature groups in the query. These key are also compatible to python client starting from v3.4.

| Setting | primary key of `left_fg` | primary key of `right_fg` | join conditions | prefix | primary_keys | note |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are all of these cases tested for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kennethmhc kennethmhc requested a review from vatj March 20, 2024 07:59
@kennethmhc kennethmhc merged commit 0923c44 into logicalclocks:main Apr 5, 2024
1 check passed
kennethmhc added a commit to kennethmhc/logicalclocks.github.io that referenced this pull request Apr 8, 2024
)

* enhance feature-vectors.md

* address comment

* make python and java code consistent
vatj pushed a commit that referenced this pull request Apr 8, 2024
* enhance feature-vectors.md

* address comment

* make python and java code consistent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants