Skip to content

chore: Delete unused code in entity - #3008

Merged
feast-ci-bot merged 9 commits into
feast-dev:masterfrom
felixwang9817:fix_entity
Aug 4, 2022
Merged

chore: Delete unused code in entity#3008
feast-ci-bot merged 9 commits into
feast-dev:masterfrom
felixwang9817:fix_entity

Conversation

@felixwang9817

Copy link
Copy Markdown
Collaborator

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Signed-off-by: Felix Wang <wangfelix98@gmail.com>
Signed-off-by: Felix Wang <wangfelix98@gmail.com>
Signed-off-by: Felix Wang <wangfelix98@gmail.com>
Signed-off-by: Felix Wang <wangfelix98@gmail.com>
@codecov-commenter

codecov-commenter commented Aug 3, 2022

Copy link
Copy Markdown

Codecov Report

Merging #3008 (1e028b0) into master (16957ac) will increase coverage by 0.17%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #3008      +/-   ##
==========================================
+ Coverage   77.83%   78.01%   +0.17%     
==========================================
  Files         194      193       -1     
  Lines       16567    16442     -125     
==========================================
- Hits        12895    12827      -68     
+ Misses       3672     3615      -57     
Flag Coverage Δ
integrationtests 67.61% <50.00%> (+0.11%) ⬆️
unittests 59.87% <100.00%> (+0.03%) ⬆️

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

Impacted Files Coverage Δ
...n/tests/integration/materialization/test_lambda.py 100.00% <ø> (ø)
...thon/tests/unit/infra/test_inference_unit_tests.py 100.00% <ø> (ø)
sdk/python/feast/entity.py 91.42% <100.00%> (+1.18%) ⬆️
sdk/python/tests/unit/infra/test_provider.py 100.00% <100.00%> (ø)
sdk/python/tests/unit/test_entity.py 100.00% <100.00%> (ø)
sdk/python/feast/infra/online_stores/datastore.py 87.96% <0.00%> (-1.39%) ⬇️
sdk/python/feast/inference.py 87.20% <0.00%> (-1.17%) ⬇️
sdk/python/feast/infra/aws.py 39.90% <0.00%> (-0.10%) ⬇️
sdk/python/feast/flags.py
sdk/python/feast/errors.py 70.00% <0.00%> (+0.05%) ⬆️
... and 5 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Signed-off-by: Felix Wang <wangfelix98@gmail.com>
Signed-off-by: Felix Wang <wangfelix98@gmail.com>
Signed-off-by: Felix Wang <wangfelix98@gmail.com>
schema=[
Field(name="temperature", dtype=Int32)
Field(name="temperature", dtype=Int32),
Field(name="location", dtype=Int64),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

shouldn't this be location_id?

Attributes:
name: The unique name of the entity.
value_type (deprecated): The type of the entity, such as string or float.
value_type: The type of the entity, such as string or float.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

value type should be gone right?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

value_type is still an attribute of an entity; it's just not set during initialization, but instead inferred during type inference

join_keys: A list of properties that uniquely identifies different entities within the
collection. This currently only supports a list of size one, but is intended to
eventually support multiple join keys.
join_key: A property that uniquely identifies different entities within the

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

remove join_key?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

we haven't removed the usage of join_key throughout the codebase, so we still want to be able to do entity.join_key, which is why join_key is left as an attribute

I clarified the TODO below

dob_ssn = Entity(
name="dob_ssn",
value_type=ValueType.STRING,
description="Date of birth and last four digits of social security number",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

can you update the rest of the FCOs? the FVs that depend on this weren't updated

Comment thread Makefile Outdated

test-python:
FEAST_USAGE=False IS_TEST=True python -m pytest -n 8 sdk/python/tests
FEAST_USAGE=False IS_TEST=True python -m pytest -n 8 sdk/python/tests -k "not test_sql_registry"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why did you exclude this test? Can you add a comment?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

added comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

actually, just marked the test_sql_registry tests as integration tests since they require external services

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

actually after talking with Achal, we decided to make it a unit test; will do in a separate PR

Signed-off-by: Felix Wang <wangfelix98@gmail.com>

@achals achals left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lg other than a nit

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

These should be able to run as unit tests - any reason they can't?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

after discussing, we agreed to make these unit tests; will do in separate PR

Signed-off-by: Felix Wang <wangfelix98@gmail.com>

@achals achals left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: achals, felixwang9817

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

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [achals,felixwang9817]

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

@feast-ci-bot
feast-ci-bot merged commit 66c4338 into feast-dev:master Aug 4, 2022
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.

5 participants