Skip to content

Prep for annotator logprobs#1449

Merged
bkorycki merged 5 commits into
mainfrom
annotator-logprobs
Jan 13, 2026
Merged

Prep for annotator logprobs#1449
bkorycki merged 5 commits into
mainfrom
annotator-logprobs

Conversation

@bkorycki
Copy link
Copy Markdown
Contributor

@bkorycki bkorycki commented Jan 13, 2026

Currently there is no ability to specifically request logprobs from annotators. You can request logprobs from SUTs by using the top_logprobs SUTOption. My plan is to use the same mechanism for annotators. This pull request doesn't actually implement annotator logprobs, just does some prep work.

The commit history is a good summary of everything that was done in this PR:)

@bkorycki bkorycki requested review from superdosh and wpietri January 13, 2026 19:08
@bkorycki bkorycki requested a review from a team as a code owner January 13, 2026 19:08
@bkorycki bkorycki temporarily deployed to Scheduled Testing January 13, 2026 19:08 — with GitHub Actions Inactive
@github-actions
Copy link
Copy Markdown

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

from pydantic import BaseModel, model_validator


class ModelOptions(BaseModel):
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Everything in this file was moved from sut.py

Not all SUTs and annotators respect all options.
"""

max_tokens: Optional[int] = None
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This no longer defaults to 100. The CLI sets the default instead.

class PromptRunner(PipelineRunner):
def __init__(self, suts, **kwargs):
def __init__(self, suts, sut_options=ModelOptions(), **kwargs):
self.sut_options = sut_options
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I moved this out of the PipelineRunner base class because it doesn't make sense for the annotator-only runner to have sut_options.

Copy link
Copy Markdown
Contributor

@wpietri wpietri left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks for breaking the commits down by purpose; that made this easier to follow.

@bkorycki bkorycki merged commit 7d54982 into main Jan 13, 2026
2 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jan 13, 2026
@bkorycki bkorycki deleted the annotator-logprobs branch January 13, 2026 23:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants