-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Fix offline store (tz-naive & field_mapping issues) #1466
Conversation
4fd7dd7
to
bbca3c5
Compare
Signed-off-by: Tsotne Tabidze <tsotne@tecton.ai>
bbca3c5
to
913cfc7
Compare
) | ||
|
||
fv = get_feature_view(bigquery_source) | ||
e = Entity( | ||
name="driver_id", | ||
description="id for driver", | ||
join_key="driver_ident", |
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 tests that things still work when the join_key is different from the name of the entity (although it should probably be in its own separate test) so can we keep it in?
).to_dict() | ||
assert abs(response_dict[f"{fv.name}__value"][0] - expected_value) < 1e-6 | ||
|
||
# Check offline store |
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 do have sdk/python/tests/test_historical_retrieval.py - this works but it may be more natural to cover the field mapping cases there?
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.
Agree
Signed-off-by: Tsotne Tabidze <tsotne@tecton.ai>
25ceede
to
8d7d710
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jklegar, tsotnet 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 |
Signed-off-by: Tsotne Tabidze tsotne@tecton.ai
What this PR does / why we need it: Discovered 2 different bugs in get_historical_features. 1) if the entity_df contains tz-naive timestamps, point-in-time merging doesn't work in local mode. 2) field_mapping is not being used in offline mode (it's used in online mode). Meaning that if you define field_mapping, get_historical_features simply fails in both local and gcp modes.
Which issue(s) this PR fixes:
Fixes #
Does this PR introduce a user-facing change?: