Skip to content

Score scales for SelfCritique/LMAsJudge, symbolic auto-build, bump 0.9.014 - #98

Merged
YoanSallami merged 2 commits into
mainfrom
chore/bump-0.9.014
Aug 21, 2026
Merged

Score scales for SelfCritique/LMAsJudge, symbolic auto-build, bump 0.9.014#98
YoanSallami merged 2 commits into
mainfrom
chore/bump-0.9.014

Conversation

@YoanSallami

Copy link
Copy Markdown
Contributor

Summary

  • Configurable score scales for SelfCritique and LMAsJudge via a new score_type argument. Alongside the existing 0.0..1.0 Score, the pydantic metrics backend now ships FineScore (21 float levels), Rating (1..5), Rating10 (1..10) and Rating20 (1..20), plus get_score_type / normalize_score helpers (exported as synalinks.Rating, etc.). The generator's reward property becomes an inline enum of the scale, the default instructions spell out the scale in words, and the emitted reward is always normalized back to 0.0..1.0 so downstream rewards/metrics are unchanged. Round-trips through get_config/from_config.
  • Fix: auto-build no longer hits the LM on eager calls. Module._maybe_build now converts concrete JsonDataModel arguments to SymbolicDataModel before tracing, so modules wrapping a Generator (agents in particular) stop issuing throwaway LM requests just to discover their output schema. Two agent tests were only passing because the build silently consumed their first two scripted mock responses; they now script the real 3-call sequence. Regression test added in module_test.py.
  • Version bump to 0.9.014 + uv.lock refresh.

Test plan

  • uv run pytest synalinks: 2215 passed, 9 skipped (full suite, pre default-instructions change)
  • synalinks/src/modules/ttc, synalinks/src/rewards, backend/pydantic/metrics_test.py, modules/core/generator_test.py: 101 passed after the default-instructions change
  • Regression test test_auto_build_traces_on_symbolic_inputs_for_eager_calls verified to fail on the old _maybe_build
  • ruff + black -l 90 clean on all touched files

🤖 Generated with Claude Code

YoanSallami and others added 2 commits August 21, 2026 14:52
Add discretized score scales to the pydantic metrics backend next to the
existing 0.0..1.0 `Score`: `FineScore` (21 float levels), `Rating` (1..5),
`Rating10` (1..10) and `Rating20` (1..20), plus helpers to resolve a scale
from a class or name (`get_score_type`), serialize it, describe it for the
LM, and `normalize_score` any raw value back to 0.0..1.0.

`SelfCritique` and `LMAsJudge` gain a `score_type` argument: the generator
schema's `reward` property becomes an inline enum of the scale's members so
the model picks a value on that scale, and the emitted reward is normalized
to 0.0..1.0 so downstream rewards/metrics are unchanged. The default
instructions now spell out the grading scale in plain words, since the
output schema is not part of the prompt by default. Round-trips through
`get_config`/`from_config`, exported under `synalinks.{FineScore,Rating,...}`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
`Module._maybe_build` traced `compute_output_spec`/`call` on whatever the
first call received. For an eager call that meant concrete `JsonDataModel`s,
so modules wrapping a `Generator` (agents in particular) ran a real forward
pass, i.e. throwaway LM requests, just to discover their output schema.

Convert the arguments to `SymbolicDataModel` before tracing so auto-build is
purely symbolic, as on the functional-API path. Two agent tests were only
passing because the build silently consumed the first two scripted mock
responses; they now script the real 3-call sequence. Add a regression test
and drop the now-stale "throwaway LM calls" rationale from the subagent
`Program` wrappers in DeepAgent/RLM.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@YoanSallami
YoanSallami merged commit 4d2d36b into main Aug 21, 2026
6 checks passed
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