Repository navigation
Label by Example in Project.autolabel and the CLI - #595
Merged
iurisilvio merged 3 commits intoDec 3, 2026
Merged
Conversation
Project.autolabel and autolabel_preview take reference_examples, the ids of labeled images of the project the model sees as examples, and the CLI takes --reference-example on start and preview. autolabel models marks the models that take them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
digaobarbosa
approved these changes
Dec 3, 2026
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 does this PR do?
roboflow/roboflow#20350 opens Label by Example on the public Auto Label API:
referenceExamples: [{"imageId": "..."}]on the start and preview routes, andtakesReferenceExamplesin the models list. The server reads each image's boxes of the job's classes from the project.Changes
Project.autolabel(..., reference_examples=[...])andProject.autolabel_preview(..., reference_examples=[...])take the image ids;rfapisends them asreferenceExamples. A single id string is one example, not one per character.roboflow autolabel startandpreviewtake--reference-example <image-id>, repeated for up to 10.roboflow autolabel modelsadds anEXAMPLEScolumn, andWorkspace.autolabel_models()documentstakesReferenceExamples.CLI-COMMANDS.md.roboflow autolabel start -p umbrellas --batch-id batch-1 -m gemini-4-argon-boxes \ --ontology '{"a green umbrella": "umbrella"}' --reference-example image-id-1 --reference-example image-id-2An example must be in the project's dataset (not only in a batch or in review) with a box of the job's classes. Otherwise the API answers
REFERENCE_EXAMPLE_NOT_FOUND(404) orINVALID_REFERENCE_EXAMPLES(400), the same for an image of another project. The SDK passes those errors on as they are.Merge order
referenceExamples.Testing
Projectmethods, the CLI flags and the models table. The Auto Label suites pass (55 tests); ruff and mypy are clean.🤖 Generated with Claude Code