[PTDT-5210] Add Tool.Type.MARKER for marker ontologies#2067
Open
gramos-lb wants to merge 2 commits into
Open
Conversation
Ontologies containing the new video marker tool currently make
Tool.from_dict raise ValueError('marker' is not a valid Tool.Type),
breaking any SDK code that fetches such an ontology. Adds
Tool.Type.MARKER = 'marker' (matching the platform's normalized ontology
kind); construction, from_dict/asdict round-trips, and ontology creation
work through the base Tool class with no dispatch changes.
Bumps the SDK to 7.10.0; the changelog notes that marker ontologies
require 7.10.0 or later.
gramos-lb
requested review from
KahvehS,
Tim-Kerr,
cyrusj89,
dsinha244,
john-labelbox,
labelbox-engineering and
lb-mwetter
July 21, 2026 17:20
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.
PTDT-5210: Add
Tool.Type.MARKERso marker ontologies stop raisingWhat was broken
The platform is shipping a new video marker ontology tool (normalized kind
marker). Any SDK code that fetches an ontology containing one currently dies inTool.from_dict:— which breaks
project.ontology(), ontology listing, and anything downstream, for the whole ontology.What changed
Tool.Type.MARKER = "marker"inschema/ontology.py. Construction,from_dict/asdictround trips, and ontology creation all work through the baseToolclass — no dispatch changes needed, and the unrelated tool-building enum is untouched.How to test
from_dict→asdictround trip; the existing all-enum-members parametrization covers construction). mypy (175 files) and Ruff clean.project.ontology().tools()on a marker project returns the marker tools typed asTool.Type.MARKERinstead of raising, andproject.export()on that project works end-to-end.Note
Low Risk
Single enum value plus tests; behavior is additive and unblocks ontology fetch/export for marker projects without changing other tool types.
Overview
Adds
Tool.Type.MARKER("marker") so ontologies that include the platform’s video marker tool deserialize via existingTool.from_dict/asdictinstead of raisingValueError: 'marker' is not a valid Tool.Type.No separate tool class or dispatch changes—marker tools use the base
Toollike other simple tool kinds. A unit test asserts markerfrom_dict→asdictround-trip with schema IDs and metadata.Reviewed by Cursor Bugbot for commit 9ddadfc. Bugbot is set up for automated code reviews on this repo. Configure here.