Skip to content

fix: Use the LabelView labeler field in majority vote resolution - #7213

Open
ShivamSharma43 wants to merge 1 commit into
feast-dev:masterfrom
ShivamSharma43:fix/majority-vote-labeler-field
Open

ShivamSharma43 wants to merge 1 commit into
feast-dev:masterfrom
ShivamSharma43:fix/majority-vote-labeler-field

Conversation

@ShivamSharma43

@ShivamSharma43 ShivamSharma43 commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

MAJORITY_VOTE resolution of LabelView labels hardcodes the "labeler" column instead of using the view's labeler_field. resolve_conflicts receives labeler_field but only passes it on for LABELER_PRIORITY.

With the default labeler_field="labeler", the resolved row gets labeler = "majority_vote". With labeler_field="annotator":

  • annotator is resolved like a label, so the row is attributed to whoever wrote the most rows. In the new test, that is alice, who wrote one of the two winning labels and the losing one.
  • If the caller doesn't list it in feature_name_columns, the annotator column is missing from the result.
  • An ordinary label that happens to be called labeler is overwritten with "majority_vote".

This affects the UI server's /list-labels and /label-quality endpoints, which pass the view's labeler_field. The resolver now marks that column instead. Views with the default field behave as before.

Which issue(s) this PR fixes:

No issue filed; found while reading the labeling code.

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 sdk/python/tests/unit/test_label_conflict_resolver.py: on master 3 of its 5 cases fail, with the fix all pass. The other two cover the default labeler field and pass both ways.

  • test_label_view.py passes. The UI server endpoints were not run.

  • ruff check, ruff format and mypy feast/labeling/ are clean.

Misc

This change was prepared with AI assistance (Claude Code), which also ran the tests listed above.

🤖 Generated with Claude Code


Devin Review

_resolve_majority_vote hardcoded the labeler column. With another
labeler_field, the resolved row named one of the labelers or lost the
column, and a label called labeler was overwritten.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Shivam Sharma <192242476+ShivamSharma43@users.noreply.github.com>
@ShivamSharma43
ShivamSharma43 requested a review from a team as a code owner November 22, 2026 17:42
Copilot AI balanced review requested due to automatic review settings November 22, 2026 17:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Devin Review: 2 flags

Not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)

Devin Review

@codecov-commenter

codecov-commenter commented Nov 22, 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 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 53.97%. Comparing base (3ece12f) to head (3d01d05).

Files with missing lines Patch % Lines
sdk/python/feast/labeling/conflict_resolver.py 50.00% 0 Missing and 1 partial ⚠️
❗ 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    #7213      +/-   ##
==========================================
+ Coverage   53.94%   53.97%   +0.03%     
==========================================
  Files         466      466              
  Lines       58822    58822              
  Branches     8665     8665              
==========================================
+ Hits        31729    31747      +18     
+ Misses      24954    24927      -27     
- Partials     2139     2148       +9     
Flag Coverage Δ
go-feature-server 30.96% <ø> (ø)
python-unit 55.56% <50.00%> (+0.03%) ⬆️
Files with missing lines Coverage Δ
sdk/python/feast/labeling/conflict_resolver.py 40.67% <50.00%> (+28.81%) ⬆️

... 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 3ece12f...3d01d05. 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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants