feat: add canonical Benchmark* types (Task/Observation/Action/Agent)#5
Merged
Conversation
Move the Benchmark* vocabulary into the canonical schema package so both openadapt-ml and openadapt-evals can import it without depending on each other, breaking the historical ml<->evals import cycle. Definitions are dependency-free (dataclasses + abc) and faithfully match the previous openadapt-evals definitions. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CKrVJJy5jWVCkXAqgUqtqZ
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.
Summary
Phase 1 of the openadapt evals→ml refactor (Fork A). Adds the
Benchmark*vocabulary to the canonical schema package so that bothopenadapt-mlandopenadapt-evalsimport these types fromopenadapt-typesinstead of from each other — breaking the historicalml ↔ evalsmodule-level import cycle.What's added
openadapt_types/benchmark.py—BenchmarkTask,BenchmarkObservation,BenchmarkAction(dataclasses) andBenchmarkAgent(ABC). Faithful move of the definitions previously inopenadapt_evals/adapters/base.pyandopenadapt_evals/agents/base.py.openadapt_types.__init__.tests/test_benchmark.py— 8 tests. Full suite: 117 passed.Definitions are dependency-free (plain
dataclasses+abc.ABC), so importing them never pulls in heavy optional deps.openadapt-typesis a published PyPI package. This PR must merge AND release first. Then the dependent PRs bump theiropenadapt-typesversion pin:openadapt-typesrelease (minor bump; newfeat).openadapt-mlPR (addsopenadapt-typesdep, importsBenchmark*from here) bumps the pin.openadapt-evalsPR (re-exportsBenchmark*from here) bumps the pin.Do not publish/release from this PR automatically without review.
Backward compatibility
openadapt-evalswill re-export these names from their old locations, so existingfrom openadapt_evals import BenchmarkActioncall sites keep working.🤖 Generated with Claude Code
https://claude.ai/code/session_01CKrVJJy5jWVCkXAqgUqtqZ