feat: Feast First-Class LabelView Implementation#6292
Draft
ntkathole wants to merge 1 commit intofeast-dev:masterfrom
Draft
feat: Feast First-Class LabelView Implementation#6292ntkathole wants to merge 1 commit intofeast-dev:masterfrom
ntkathole wants to merge 1 commit intofeast-dev:masterfrom
Conversation
Signed-off-by: ntkathole <nikhilkathole2683@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
Summary
Introduces
LabelView, a new alpha-stage Feast primitive that manages mutable labels and annotations separately from immutable feature data stored in regularFeatureViews. This supports multi-labeler workflows (human reviewers, automated safety scanners, reward models) where different sources independently write labels for the same entity keys.LabelView is fully opt-in — existing workflows are unaffected unless a user explicitly defines one.
What's included
Core implementation (
feast.labelingmodule)LabelViewclass inheriting fromBaseFeatureView, with label-specific attributes:labeler_field,conflict_policy,retain_history,reference_feature_viewConflictPolicyenum (LAST_WRITE_WINS,LABELER_PRIORITY,MAJORITY_VOTE)LabelView.proto) withLabelViewSpec,LabelViewMeta, andConflictResolutionPolicyFull SDK integration
FeatureStore.apply()— registers LabelViews, auto-registers their PushSource, validates name uniqueness across all view typesFeatureStore.push()— routes push data to LabelView when its PushSource matchesFeatureStore.get_historical_features()— works viabatch_source/stream_sourceproperties on LabelViewFeatureStore.teardown()— includes LabelView tablesFeatureStore.list_label_views()/get_label_view()— new public API methodsFeatureServicecomposability — LabelViews can be included alongside regular feature viewsRegistry support (all backends)
label_viewstable,_infer_fv_table/_infer_fv_classessupport, proto() builderlabel_viewarm added toApplyFeatureViewRequestoneof, full client + server wiringLABEL_VIEWStable, correct column-name mapping indelete_feature_viewCLI
feast label-views list— lists all label views with name, entities, conflict policyfeast label-views describe <name>— shows full label view detailsfeast feature-views listunchanged (label views are only in their dedicated command)Permissions
LABEL_VIEW = 11added toPermission.protoType enum_PERMISSION_TYPESmap updated forfrom_proto/to_protoroundtripRegression safety
feast materialize/materialize-incremental(labels come in viapush(), not batch materialization); explicit error if attempted by namefeature-views listoutputproto()builders includelabel_viewsso cached/exported blobs are complete_ensure_feature_view_name_is_uniqueDocumentation
[Alpha]tags and Google-style Args blocks on all public classes/methodsLabelViewandConflictPolicydocs/getting-started/concepts/label-view.md) with usage examples, conflict policies, and alpha limitationsconflict_policystored but not enforced at read time (requires online-store query-path changes);retain_historystored but not enforced at write time (requires online-store write-path changes); batch materialization not supportedTests
Alpha Limitations
conflict_policy— persisted in registry metadata but not enforced duringget_online_features. Online store returns last-written row regardless of policy.retain_history— persisted but not acted on. Online store always overwrites previous value.FeatureStore.push()only.Test Plan
test_label_view.pyunit tests passtest_registry_diff.pytests pass (includingtest_diff_registry_objects_permissions)feast applywith a repo containing a LabelView definitionfeast label-views list/feast label-views describeFeatureStore.push()to a LabelView's PushSourceWhich issue(s) this PR fixes:
#5456