Repository navigation
feat(core): support task-owned evaluation subjects - #301
Conversation
Add the EvalSubject protocol and explicit model-less task configuration. Integrate external calls with request recording, token profiling, persistence, and strict stage-based resume. Preserve existing Model identities and distinguish helper model facts from the measured subject. Add regression coverage for subject resolution, request snapshots, concurrent call ordering, retry budgets, and consistent resume planning. Refs scitix#299
ethan-scitix
left a comment
There was a problem hiding this comment.
Request changes.
Most of the PR follows RFC #299: the EvalSubject protocol, requires_model = False, subject_call() / call.record(), and the out-of-scope items are all respected. Commit messages and identities are clean, CI is green, and the targeted suites pass locally (1534 passed). The blockers are a change to existing identities (1) and one design addition that goes beyond the RFC (2).
Blocking
-
Bug:
call_key()is no longer byte-identical for everyModel. (sieval/core/models/subject.py:L84-L104,run_meta.py:L519)call_keynow goes throughsubject_call_key, which can only encode mappings.canonical_jsonalso handled sets, bytes and numpy values. Withcall_key({"model": "m", "extra": {"tags": {"x"}}}),mainreturns a key and this PR raisesTypeError. The RFC makes identical identities for existing tasks an acceptance test. Please keepcanonical_json's encoder for this key and add a regression test that compares againstmain. -
Question/design: the helper-
Model+ independent-subject case goes beyond the RFC and makes resume less strict. The RFC only covers model-less tasks. In this PR, a task that binds a helperModeland also overridessubjectdrops that helper's context window, recipe, numerics and parsers from the inference identity (subject_inference_inputs).model_argscomes only fromsubject.request_args(). If the helper is used duringinfer, changing its parameters does not refuse the resume unless the plugin adds them to the identity itself. The guide documents this, but it conflicts with the strict-only reproducibility contract. Please either split this case into its own PR or fold the helper'srequest_args()into the identity automatically.
Non-blocking
- Question: the RFC says the overflow scope stays on
task.model, but the PR applies it only when the subject is aModel(runner.py_infer,_collect_overflow_replays). As a result, a helperModel's context overflows are neither converted nor replayed. This follows from #2, so please settle it with that decision. - Nit: an external subject's
call_key()is folded into the inference digest, so changing the subject refuses the resume atinference. AModelswitch instead goes through theweights/modelcomparison. The choice is reasonable, but please note it under Reproducibility in AGENTS.md. - Nit: the RFC asks to check what
meta.jsonreaders (leaderboard,weightscomparison) do when a subject has noweights. I couldn't find that check in the PR. - Nit:
Model.serving()is never called and repeats the first four fields ofserving_fingerprint. Please have one build on the other.ServingFingerprintalso lost its per-field docs in the move. - Nit: the CONTRIBUTING section on "promoting plugin capabilities into core" is a policy change outside the RFC and would be better as its own PR.
🤖 Generated with Claude Code
385e3d8 to
f3ed078
Compare
f3ed078 to
281ff9f
Compare
|
Thanks for the detailed review. I addressed the comments as follows.
|
A helper Model bound beside an independent EvalSubject only contributed its request arguments, so swapping it for another model or other weights reused the recorded inference. The digest now carries its call key, weights, request arguments, context window, numerics and parsers, on both the runner and the public resume plan. Drop the requests.jsonl scan that chose which recorded overflows to replay for such a task: it read rotated logs whole on the event loop and lost evidence on rotation. Those samples are inferred again instead. Move the canonical JSON encoder to sieval.core.utils.canonical so call keys and digests share one implementation instead of two copies that had to stay byte-identical. Condense the guide, AGENTS.md and CHANGELOG. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Type
Summary
Modelby declaringrequires_model = Falseand providing anEvalSubject.Modeltasks retain their identities and dialect execution paths.subject_call()andRecordingAsyncClient.Related Issues
Refs #299
Test Plan
Automated
ruff check && ruff format --check)ty checkormypy --strict)pdm run pytest)Regression coverage includes model-less CLI execution, subjects resolved during setup, legacy Model identities, mutable request snapshots, nested mappings and JSON nulls, concurrent call ordering, grading-only resume, overflow retry budgets, helper-model identity isolation, and consistent resume planning.
External API verification uses deterministic mocked HTTP transports. Plugins remain responsible for provider protocols, authentication, response validation, and inference-relevant identity arguments.
Checklist
Required (all PRs)
type(scope): description)AI-Generated Code - <model> (<provider>)in module docstringcore/