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

Fix offline store (tz-naive & field_mapping issues) #1466

Merged
merged 2 commits into from
Apr 14, 2021

Conversation

tsotnet
Copy link
Collaborator

@tsotnet tsotnet commented Apr 14, 2021

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?:

Fix tz-naive issue with offline store and apply field_mapping during historical feature retrieval

Signed-off-by: Tsotne Tabidze <tsotne@tecton.ai>
)

fv = get_feature_view(bigquery_source)
e = Entity(
name="driver_id",
description="id for driver",
join_key="driver_ident",
Copy link
Collaborator

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

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?

Copy link
Member

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>
@woop
Copy link
Member

woop commented Apr 14, 2021

/lgtm

@feast-ci-bot
Copy link
Collaborator

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@feast-ci-bot feast-ci-bot merged commit 3d0abf2 into master Apr 14, 2021
@woop woop deleted the fix-offline-store branch May 12, 2021 20:27
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.

4 participants