GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||
GeezerVison is showing github.com — fix: Merge shared ODFV source projections in feature resolution by sanskar-singh-2403 · Pull Request #6622 · feast-dev/feast Conversation
Contributor
What this does When several on demand feature views share a source feature view but select different input columns, _get_feature_views_to_use appended the shared source view once per ODFV, each copy carrying only that ODFV's projection. The membership guard if source_fv not in fvs_to_use never matched, because BaseFeatureView.eq compares projections and the freshly-fetched full-projection view never equals an already-stored narrowed copy. Downstream, _group_feature_refs keys its view index by projection.name_to_use(), so the duplicate entries collide and the last one wins, the other ODFVs' source projections are silently dropped. During get_historical_features this means the losing ODFV's input columns are never fetched, so transforms receive missing inputs (NaN in pandas mode). The offline retrieval path is masked on 0.62+ by the ref-injection loop from #6140, but the resolution helper still returns duplicate entries with conflicting projections to its other callers (_get_online_request_context, retrieve_online_documents, retrieve_online_documents_v2). The fix The merge helper reassigns projection.features to a fresh list rather than mutating in place, because the projections in play are shallow copies (copy.copy) that share their features list with the registry object. Tests
Both fail on master (assert 2 == 1 the duplicate entries) and pass with this change. ruff check and ruff format are clean.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
sanskar-singh-2403
force-pushed
the
fix/odfv-shared-source-projection-merge
branch
from
072cf48 to
621c1b1
Compare
Contributor
Author
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@ ## master #6622 +/- ## ========================================== + Coverage 46.35% 46.37% +0.01% ========================================== Files 414 414 Lines 50052 50069 +17 Branches 7151 7153 +2 ========================================== + Hits 23201 23217 +16 - Misses 25229 25230 +1 Partials 1622 1622
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
hey @oavdeev @ankurs @ches just a friendly reminder to review this PR, thanks! cc: @addenergyx |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks! lgtm
Sorry, something went wrong.
There was an error while loading. Please reload this page.
d93d559 to
ea94468
Compare
|
@franciscojavierarceo @ntkathole requesting your reviews in this, Thanks! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
ea94468 to
b4feda7
Compare
When several on demand feature views share a source feature view but select different input columns, _get_feature_views_to_use appended the shared source view once per ODFV, each copy carrying only that ODFV's projection. The membership check 'if source_fv not in fvs_to_use' never matched because BaseFeatureView.__eq__ compares projections and the freshly fetched full-projection view never equals a stored narrowed copy. Downstream, _group_feature_refs keys its view index by projection.name_to_use(), so the last duplicate won and the other ODFVs' source projections were silently dropped, producing missing inputs (NaN in pandas mode) during retrieval. Index accumulated source views by projection.name_to_use() and merge projections (union of features, deduped by name) instead of appending a duplicate, so a shared source view resolves to a single entry carrying the union of the required input columns. The merge helper reassigns projection.features to a fresh list rather than mutating in place, because the projections in play are shallow copies (copy.copy) that share their features list with the registry object. Adds TestGetFeatureViewsToUseSharedSource in tests/unit/test_utils.py covering the merged-projection result and order independence. Fixes feast-dev#6621 Signed-off-by: Sanskar Singh <[email protected]>
b4feda7 to
da47014
Compare
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
when calling for several ODFVs at once, only fetches one ODFV's column-list per shared source view (last request wins),
There was an error while loading. Please reload this page.