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

feat: Optional nameless pre-computed vectors with a schema fingerprint - #7077

Open
chandlerok wants to merge 3 commits into
feast-dev:masterfrom
chandlerok:feat/precompute-nameless-vectors
Open

chandlerok wants to merge 3 commits into
feast-dev:masterfrom
chandlerok:feat/precompute-nameless-vectors

Conversation

@chandlerok

@chandlerok chandlerok commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

Adds an opt-in precompute_omit_names on FeatureService. Vectors written for such a service carry values, per-view timestamps, and a fingerprint of the service's ordered <fv>__<feature> names instead of the repeated name list. The fast path validates a nameless vector by fingerprint and takes its names from the service. Vectors with names keep working as before, and a vector whose fingerprint does not match the service falls through to the existing mismatch handling.

Measured on a 90-feature service, Feast 0.67.0, Redis store:

bytes per entity bytes read for 500 entities
pre-computed vector, with names (today) 4773 B, 3774 B of it names 2.4 MB
pre-computed vector, precompute_omit_names=True 834 B 414 KB
per-view HMGET of the same 90 features (what the vector replaces) n/a 550 KB

The names are identical for every entity, so today the single-read path moves 4x the bytes of the per-view path it replaces.

Proto changes: FeatureServiceSpec.precompute_omit_names and PrecomputedFeatureVector.schema_fingerprint, both additive. Generated code is from grpcio-tools 1.62.3 (protobuf 4.25) and mypy-protobuf 3.3.0 so the diff against the checked-in files is only the new fields.

Stacked on #7076; the first two commits are that PR.

Which issue(s) this PR fixes:

Fixes #7075

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: nameless vector matches and reorders by fingerprint, stale fingerprint falls back, nameless vector without a service falls back, flag round-trips through proto, fingerprint follows feature order. test_precomputed_feature_vectors.py and local_feast_tests/test_feature_service.py pass locally.

Misc

@ntkathole

🤖 Generated with Claude Code

chandlerok and others added 3 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>
A pre-computed vector stores the full repeated feature name list next to its
values. For a wide service that is most of the blob: 90 features came to
4.8 KB per entity, 3.8 KB of it names that are identical for every entity.

FeatureService gains precompute_omit_names. Vectors written for such a
service carry only values, per-view timestamps, and a fingerprint of the
service's ordered names. The fast path validates a nameless vector by
fingerprint and takes its names from the service. Vectors with names keep
working as before. With the flag on the same blob is 834 bytes, and a
500-entity read moves 414 KB instead of 2.4 MB.

Generated code is from grpcio-tools 1.62.3 (protobuf 4.25) and mypy-protobuf
3.3.0 to match the checked-in files.

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

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 58.20896% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.01%. Comparing base (1e5e90c) to head (d39d949).

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    #7077      +/-   ##
==========================================
+ Coverage   50.97%   51.01%   +0.03%     
==========================================
  Files         455      455              
  Lines       56994    57030      +36     
  Branches     8321     8327       +6     
==========================================
+ Hits        29055    29095      +40     
+ Misses      25954    25950       -4     
  Partials     1985     1985              
Flag Coverage Δ *Carryforward flag
go-feature-server 30.58% <ø> (+0.20%) ⬆️ Carriedforward from 5262d64
python-unit 52.48% <58.20%> (+0.02%) ⬆️

*This pull request uses carry forward flags. Click here to find out more.

Files with missing lines Coverage Δ
sdk/python/feast/feature_service.py 84.05% <100.00%> (+0.55%) ⬆️
...k/python/feast/infra/online_stores/online_store.py 85.14% <100.00%> (+0.66%) ⬆️
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...d39d949. 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.

@chandlerok

Copy link
Copy Markdown
Contributor Author

The one red check is unit-test-python (3.12, macos-14): test_start_script_can_fail_before_docker_when_repo_missing died with SIGTRAP under the gRPC fork handlers, nothing this PR touches. The same job is green on #7076 and the 3.11 macOS job is green here. Could a maintainer rerun it?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

precompute_online: feature names are about 80% of every vector blob

2 participants