← 输入框|github.com|刷新
Skip to content

fix: Refresh pre-computed vectors for pushed entities only and match bare feature names - #7076

Open
chandlerok wants to merge 2 commits into
feast-dev:masterfrom
chandlerok:fix/precompute-refresh-pushed-entities
Open

chandlerok wants to merge 2 commits into
feast-dev:masterfrom
chandlerok:fix/precompute-refresh-pushed-entities

Conversation

@chandlerok

@chandlerok chandlerok commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

Two fixes that make precompute_online=True usable on a store that takes pushes.

  • precompute_feature_service takes entity_keys. When given, it rebuilds only those entities and skips the keyspace scan. _precompute_for_push passes the distinct keys from the pushed frame, so the cost scales with the push, not the store.
  • _try_precomputed_fast_path compares names on the caller's naming. Vectors store <fv>__<feature>; with the default full_feature_names=False the request expects bare names, so the fast path reported a schema mismatch on every read and get_online_features raised. The per-view name used for TTL checks is taken from the stored names.

One store.push of 1 row on a Redis store with 200 entities, one precompute service registered, Feast 0.67.0, registry cache off so every row is measured the same way:

Redis commands for the vector refresh wall time
master SCAN over the keyspace, then 5 HMGET + 1 HSET per entity (~1200 commands) 177 ms
this PR 11 HMGET + 3 HSET 58 ms
no precompute service none 51 ms

With the default registry cache the same push on this PR is 3.7 ms; the 51 to 58 ms floor above is the registry proto rebuild that allow_registry_cache=False forces, not the vector write.

Which issue(s) this PR fixes:

Fixes #7074

Checks

  • I've made sure the tests are passing.
  • My commits are signed off (git commit -s)
  • My PR title follows conventional commits format

Testing Strategy

  • Unit tests
  • Integration tests
  • Manual tests
  • Testing is not required for this change

New unit tests: push hook passes de-duplicated entity keys and skips when the frame has no join key columns; fast path matches and reorders bare names with full_feature_names=False (both fail on master). test_precomputed_feature_vectors.py passes locally.

Misc

@ntkathole this is the first of two follow-ups to #6463; the second (#7075) stacks on it.

🤖 Generated with Claude Code

chandlerok and others added 2 commits October 26, 2026 19:16
precompute_feature_service accepts entity_keys and skips the keyspace scan
when they are given. The push hook now passes the distinct entity keys from
the pushed DataFrame instead of rebuilding every entity in the store.

Signed-off-by: Chandler King <chandler.king@findheadway.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Stored vectors carry "<fv>__<feature>" names while the default request
expects bare feature names, so the fast path always reported a schema
mismatch unless full_feature_names=True. Compare on the caller's naming and
derive the per-feature view name from the stored names for TTL checks.

Signed-off-by: Chandler King <chandler.king@findheadway.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@codecov-commenter

codecov-commenter commented Oct 26, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 41.66667% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.00%. Comparing base (1e5e90c) to head (5262d64).

Files with missing lines Patch % Lines
sdk/python/feast/feature_store.py 34.88% 28 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7076      +/-   ##
==========================================
+ Coverage   50.97%   51.00%   +0.02%     
==========================================
  Files         455      455              
  Lines       56994    57012      +18     
  Branches     8321     8324       +3     
==========================================
+ Hits        29055    29077      +22     
+ Misses      25954    25950       -4     
  Partials     1985     1985              
Flag Coverage Δ
go-feature-server 30.58% <ø> (+0.20%) ⬆️
python-unit 52.46% <41.66%> (+<0.01%) ⬆️
Files with missing lines Coverage Δ
...k/python/feast/infra/online_stores/online_store.py 84.58% <100.00%> (+0.10%) ⬆️
sdk/python/feast/feature_store.py 47.13% <34.88%> (+0.25%) ⬆️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Harness.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
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.

precompute_online: one push rebuilds every vector in the store, and the fast path never matches without full_feature_names

3 participants