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

Add public docs for entity aliasing #1951

Merged
merged 2 commits into from
Nov 4, 2021

Conversation

codyjlin
Copy link
Contributor

Signed-off-by: Cody Lin codyl@twitter.com

What this PR does / why we need it:
This adds public documentation for entity aliasing functionality to the concepts/feature-view page. (Also, this is my first time contributing the public docs - not sure what the process is / if it's ok to do it through a PR like this.)

Which issue(s) this PR fixes:

Fixes #1762

Does this PR introduce a user-facing change?:

NONE

Signed-off-by: Cody Lin <codyl@twitter.com>
@feast-ci-bot
Copy link
Collaborator

Hi @codyjlin. Thanks for your PR.

I'm waiting for a feast-dev member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@codecov-commenter
Copy link

codecov-commenter commented Oct 15, 2021

Codecov Report

Merging #1951 (389b8b0) into master (704c247) will decrease coverage by 22.45%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #1951       +/-   ##
===========================================
- Coverage   81.97%   59.51%   -22.46%     
===========================================
  Files          99       99               
  Lines        7922     7922               
===========================================
- Hits         6494     4715     -1779     
- Misses       1428     3207     +1779     
Flag Coverage Δ
integrationtests ?
unittests 59.51% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../integration/online_store/test_universal_online.py 14.17% <0.00%> (-85.08%) ⬇️
.../integration/online_store/test_online_retrieval.py 17.39% <0.00%> (-82.61%) ⬇️
sdk/python/tests/utils/online_read_write_test.py 18.18% <0.00%> (-81.82%) ⬇️
...fline_store/test_universal_historical_retrieval.py 19.41% <0.00%> (-80.00%) ⬇️
...gration/registration/test_feature_service_apply.py 31.25% <0.00%> (-68.75%) ⬇️
sdk/python/tests/data/data_creator.py 34.78% <0.00%> (-65.22%) ⬇️
...s/integration/registration/test_universal_types.py 36.73% <0.00%> (-63.27%) ⬇️
sdk/python/feast/infra/online_stores/datastore.py 30.32% <0.00%> (-63.12%) ⬇️
sdk/python/feast/infra/online_stores/redis.py 30.35% <0.00%> (-62.50%) ⬇️
sdk/python/feast/infra/online_stores/dynamodb.py 30.37% <0.00%> (-60.76%) ⬇️
... and 47 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 704c247...389b8b0. Read the comment docs.

@@ -53,6 +53,50 @@ global_stats_fv = FeatureView(
{% endtab %}
{% endtabs %}

## Entity aliasing

"Entity aliases" can be specified to join `entity_df` columns that do not match the column names in the feature data table. Another use case involves entities that are a subclass of a more general entity. For example, "spammer" and "reporter" could be aliases of a "user" entity, and "origin" and "destination" could be aliases of a "location" entity as shown below. It is suggested that you dynamically specify the new FeatureView name using `.with_name` and `join_key_map` override using `.with_join_key_map` instead of register each new copy.
Copy link
Member

Choose a reason for hiding this comment

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

This intro is a bit cryptic

  • What is "the feature data table"?
  • What is "entity_df"? What about "entity dataframe"?
  • We seem to be mixing what entity aliasing is, what it is used for, and how to use it, all in a single paragraph.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it, let me know if the updated version is better.

Signed-off-by: Cody Lin <codyl@twitter.com>
@codyjlin codyjlin requested a review from woop October 19, 2021 22:24
Copy link
Collaborator

@adchia adchia left a comment

Choose a reason for hiding this comment

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

/lgtm

@feast-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adchia, codyjlin

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@adchia adchia merged commit 38cf9cb into feast-dev:master Nov 4, 2021
@codyjlin codyjlin deleted the entity-aliasing-docs branch November 4, 2021 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shadow entities mapped properly to real entity with entity aliasing
5 participants