Skip to content

feat(selection): add advance_on_view to LabelingSelection - #943

Draft
RapidPoseidon wants to merge 2 commits into
mainfrom
feat(selection)/advance-on-view
Draft

RapidPoseidon wants to merge 2 commits into
mainfrom
feat(selection)/advance-on-view

Conversation

@RapidPoseidon

Copy link
Copy Markdown
Contributor

Why

A/B experiments measure accuracy by position (1st, 2nd, 3rd session per person). With Shuffled/Sequential, a task an annotator saw but skipped is served to them again, which skews that measurement. The backend now has LabelingSelection.advanceOnView (rapidata-backend#5592, live in prod) to move the annotator past a task once it has been shown. This exposes it in the SDK as LabelingSelection(..., advance_on_view=True).

Depends on #941. This branch is stacked on openapi-generation-main, because the generated ISelectionLabelingSelection.advance_on_view only exists there. Until #941 merges (daily auto-merge, 06:00 UTC), the diff also shows its generated files. I'll rebase onto main once it lands.

Flow

flowchart LR
  user["LabelingSelection(advance_on_view=True)"]:::changed ==>|"_to_model()"| model["ISelectionLabelingSelection.advanceOnView"]
  model ==>|"POST /job (selections)"| order["Order / Campaign service"]
  classDef changed fill:#fff3bf,stroke:#f08c00,color:#000
Loading
API Change Before → After
LabelingSelection.__init__ changed — → advance_on_view: bool = False; ValueError with Random

Decisions

  • Random with advance_on_view=True raises at construction time, so callers get the error up front rather than as a backend 400 on job creation.

Verified

New tests/rapidata_client/selection/test_labeling_selection.py; pyright src/rapidata/rapidata_client reports 0 errors.

Agent skill unchanged: src/rapidata/_skill/ does not document LabelingSelection or retrieval modes.

🔗 Session: node-04de9e35

🤖 Generated with Claude Code

Rudolf the Rabbit and others added 2 commits October 9, 2026 15:52
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: deli@rapidata.ai <deli@rapidata.ai>
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown

⚠ Agent skill not updated

This PR does not modify src/rapidata/_skill/. That directory is the agent skill that ships in every SDK release and that coding agents read through python -m rapidata skill.

Before merging, pick one:

  1. The change affects what an agent needs to know (new or renamed API, changed parameter, default or result field, new gotcha): update src/rapidata/_skill/SKILL.md (or a companion guide next to it) in this PR.
  2. Nothing the skill documents changed: a reviewer applies the skill-unchanged-approved label. New commits remove the label again.

@RapidPoseidon

Copy link
Copy Markdown
Contributor Author

The only red check is Agent Skill, and that's the intended review gate, not a code failure: build, test and type-check are green. src/rapidata/_skill/ (SKILL.md, reference.md, examples.md, flows-for-preference-data.md) never mentions LabelingSelection, retrieval modes or max_iterations, so adding advance_on_view changes nothing the skill documents. A reviewer needs to apply skill-unchanged-approved to clear 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.

1 participant