72 Commits
Author SHA1 Message Date
carsten 99957ccd93 Point renderers submodule at dphn/renderers trinity branch
Pulls in the text-level Hermes tool-call parser Trinity needs.
2026-10-14 12:24:08 +00:00
f5946b098e feat: orchestrator owns v1 tasksets, ships task data to env servers (#3043)
* feat: orchestrator owns v1 tasksets, ships task data to env servers

Companion to PrimeIntellect-ai/verifiers#2039. A v1 env's taskset is loaded once,
in the orchestrator: finite tasksets become the train source's shuffled example
table (real tasks, not index ranges); an infinite taskset's generator is pulled
per example — no server-side materialization, no idx-addressed cache, no
requirement that every pool worker regenerate the same sequence. Each dispatched
rollout ships its task's data (task.data.full_dump()) and the env server
pydantic-validates and runs it.

The legacy (v0) bridge keeps its server-side dataset and task_idx addressing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump deps/verifiers to client-side-tasksets tip

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump deps/verifiers to client-side-tasksets tip

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump deps/verifiers to client-side-tasksets tip

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: plain model_dump task payload; bump deps/verifiers (full_dump removed)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* feat: re-land client-side tasksets on the episode wire

Companion to the rebased PrimeIntellect-ai/verifiers#2039. A v1 env's taskset is
loaded once, in the orchestrator: finite tasksets become the train source's
shuffled example table (real tasks, not index ranges); an infinite taskset's
generator is pulled per example. Each dispatched env-rollout ships its task's
data (task.data.model_dump()) and the env server validates and runs it. The
legacy (v0) bridge keeps its server-side dataset, task_idx addressing, and the
run_group route.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump deps/verifiers (non-optional taskset); drop redundant assert

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: actually drop the redundant taskset assert

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump deps/verifiers (content-identity resume)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump deps/verifiers (simplified task_key)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump deps/verifiers

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump deps/verifiers

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump deps/verifiers to main (client-side tasksets merged, vf#2039)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* refactor: one Env.tasks iterator instead of tasks/task_iter

Finite tasksets still materialize at start() (num_tasks needs the count and the
train source shuffles epochs), but the field is a single iterator either way —
consumers pull it uniformly and branch on num_tasks alone. Consumed once, by
TrainSource or EvalEnv.start.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-22 13:45:15 -07:00
208ea64308 chore: bump research-environments submodule to latest main (#3106)
* chore: bump research-environments submodule to latest main

Picks up the registry ref-cleanup wave: platform image naming convention
(openswe/tmax/terminal-lego/openthoughts-tblite/senior-swe-bench switched to
org-less platform refs, multiswe REGISTRY mapping removed) and the tmax Harbor
registry pointer bump.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: relock env versions for research-environments bump

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-22 10:22:17 +02:00
cb74ae2beb feat: bump verifiers to 0.2.2.dev7, adopt the multi-agent episode wire (#3104)
* feat: bump verifiers to 0.2.2.dev7, adopt the multi-agent episode wire

Companion to PrimeIntellect-ai/verifiers#1939 (multi-agent api). Re-pins
deps/verifiers to 192fd8ef0 (= 0.2.2.dev7) and deps/pydantic-config to
v0.4.2 (verifiers now requires prime-pydantic-config>=0.4.2).

- Serve wire: the env-server route run_rollout -> run, answering one
  Episode envelope ({id, env, ok, errors, traces}) per env-rollout.
  Env.run returns list[Rollout]; an episode that failed before minting
  any trace raises (the dispatcher synthesizes its error marker), and a
  not-ok episode marks its clean traces failed so a broken episode's
  partial seats are never trained on.
- The episode is the pipeline currency: the dispatcher emits one episode
  (list[Rollout]) per completed task onto out_q (a legacy run_group
  result emits its traces as single-trace episodes), and both sinks
  count episodes - never loose traces - toward group_size and eval epoch
  sizes. episode_id is stamped into info so saved records keep grouping.
- ok is the success sentinel: has_error now reads it, so the dispatcher's
  empty-trajectory promotion also flips ok, and error markers carry it.
- Only the trainable subset becomes training samples: a trace stamped
  untrainable (a multi-agent env's frozen agent) is never tokenized,
  never enters the group advantage, and never ships; it still lands in
  the trace files and observation window.
- Config shape: everything env lives under the env block, following the
  new vf.EnvServerConfig (env.taskset, env.agent.harness, per-agent caps
  under env.agent.*). All checked-in TOMLs migrated; the spawned env
  server receives the picklable env block via env_config_data.
- run_group survives only for v0/legacy bridge envs (a v1 server refuses
  it and always reports requires_group_scoring=False); vf's @group_reward
  removal doesn't touch prime-rl's own Algorithm.score_group.

Verified: tests/unit green (487 passed; config-loading params covered all
migrated TOMLs), ruff clean, and a 3-step reverse-text RL run on 2 GPUs
trains at 0% errors with every saved trace carrying ok, agent.name,
agent.trainable, and a distinct info.episode_id.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: trim narrative comments to the load-bearing facts

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix: count buffered sink progress in episodes; explicit ok=False on cancel markers

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix: keep untrainable traces out of the effective views and the derived avg@k

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 16:44:20 -07:00
47f97ee1b0 chore: bump verifiers + research-environments to latest main (#3097)
* chore: bump verifiers to latest main

deps/verifiers ab65b6e8d (v0.2.1) -> 1f457da17 (0.2.2.dev6). uv.lock is
unchanged: verifiers is an editable path dep and its dependency set did
not change, so `uv lock` is a no-op.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump research-environments to latest main

deps/research-environments 85b1527b9 -> e40d32690 (one commit:
refactor(swe): import patch capture from verifiers, #682), pairing with
the verifiers capture_patch/resolve_head utils pulled in by the previous
commit. uv.lock: swelego-v1 / swerebench-v2-v1 / swesmith-v1 0.1.1 ->
0.1.2.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 02:27:55 +02:00
4453922943 chore: bump verifiers to 0.2.1, prime-pydantic-config to 0.4.2, renderers to 0.1.8 (#3095)
* chore: bump verifiers to 0.2.1, prime-pydantic-config to 0.4.2, renderers to 0.1.8

- deps/verifiers -> v0.2.1 (ab65b6e8d), pin verifiers[harbor]>=0.2.1
- deps/pydantic-config -> v0.4.2 (4f5ae37), pin prime-pydantic-config>=0.4.2
- prime-rl-configs: verifiers>=0.2.1, renderers>=0.1.8 (drop dev pins)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump research-environments to verifiers 0.2.1 pins

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix: drop use_prime_registry from example configs

research-environments#676 removed the field from the swe/terminal
tasksets (the platform now auto-builds images from any docker ref), so
taskset configs no longer accept it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 14:46:54 -07:00
ed16f19a05 chore: bump prime to 0.6.19, verifiers pin to latest main (#3093)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 11:20:49 -07:00
256809b2ec fix: re-pin verifiers for mcp resilience under high concurrency (#3084)
* fix: re-pin verifiers for MCP transport resilience under high concurrency

Bumps deps/verifiers to include the per-call reconnect + retry fix for the v1
user-sim and tool MCP client paths. Under high rollout concurrency on the
subprocess/docker runtimes (e.g. 512 inflight), transient MCP transport drops
(httpx.ReadError -> anyio.ClosedResourceError) at rollout-start churn previously
failed rollouts (surfaced as "ExceptionGroup: unhandled errors in a TaskGroup"
-> HarnessError). The stateless-HTTP MCP servers are now reconnected per call
and transient drops retried, so the churn is invisible to rollout success.

Verified e2e at 512 concurrency / 1 step on the subprocess runtime:
- alphabet-sort-v1 (user sim): 15.1% -> 0.0% rollout error
- gsm8k-v1 (vanilla): 0.0%
- wiki-search-v1 (tool): 0.0%

See PrimeIntellect-ai/verifiers#2062.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: bump verifiers pin to include retrying() refactor

Follow-up to the MCP transport-resilience re-pin: bumps deps/verifiers to the
revision where the host-side user MCP path reuses the shared retrying() policy
(no functional change vs the prior pin — same per-call reconnect semantics).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: bump verifiers pin (public is_transient)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: bump verifiers pin (drop redundant comment)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: bump verifiers pin (retry any Exception, drop transport whitelist)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: bump verifiers pin (drop MCP constant comments)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: bump verifiers pin (merge main: default harness renamed to bash)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: bump verifiers pin (parse outside MCP retry scope)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix: update example SWE configs for the default->bash harness rename

verifiers#2063 (pulled in by the pin bump) renamed the built-in 'default' harness
to 'bash'. Switch the example configs that set harness id 'default' accordingly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: bump verifiers pin (at-most-once MCP calls, setup-only retries)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: bump verifiers pin (exactly-once user turns via replay cache)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: bump verifiers pin (serialize user respond)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: bump verifiers pin (retried-opening injection fix)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: bump verifiers pin (distinct mid-conversation seq)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: bump verifiers pin (OpenAI SDK timeouts, trimmed user-turn plumbing)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: bump verifiers pin (replay-cache commit ordering + tenacity harness retries)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: re-pin verifiers to merged main (MCP transport resilience)

verifiers#2062 merged as 4a3c1eb4c; pin deps/verifiers at verifiers main.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-18 10:00:57 -07:00
d085605be2 feat: re-pin verifiers for per-call trace records + generation time split (#3082)
* feat: re-pin verifiers for per-call trace records

Companion to PrimeIntellect-ai/verifiers#2061: Trace.calls per-call records,
with finish_reason and usage moved off MessageNode onto ModelCall (trace
schema v2). test_advantage's rollout builder attaches usage via a per-call
record instead of the removed node field.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump verifiers pin to branch head

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump verifiers pin to the merged #2061 commit

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* feat: export generation model/harness time split to wandb

Bumps the verifiers pin to d5320edcb (per-call ModelCall records #2061 +
model/harness generation-time split #2060). TimingMetrics gains
generation/model and generation/harness (from timing.generation.{model,
harness}.duration, stamped server-side by Rollout.split_generation and
carried on the wire), emitted as timing/generation/{model,harness}/*.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 20:05:29 -07:00
18665f7d58 feat: stamp platform trace metadata via verifiers Trace fields (#3061)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* feat: stamp platform trace metadata via verifiers Trace fields

Companion to verifiers#2053 (RES-1078). Rollouts are stamped on arrival
in the orchestrator via vf.Trace.stamp - run_id (from the new
Monitor.run_id: platform id preferred, else wandb), tag, step as
first-class trace fields, env_name/group_id/policy_version into info -
replacing the Rollout.to_record override. Bumps deps/verifiers to the
trace-fields commit and deps/renderers to satisfy its >=0.1.8 floor.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump verifiers to reshaped trace metadata

VersionInfo + AgentInfo (model, sampling, harness id), taskset_id
dropped upstream.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump verifiers - run_id/tag grouped into Trace.run, schema_version renamed to version

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump verifiers - RunInfo discriminated union, stamp(run)

step lives on TrainRunInfo; inline-eval trigger step goes to
info.eval_step to keep eval records placeable.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump verifiers to branch head (gepa stamping reverted)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump verifiers - AgentInfo embeds full HarnessConfig

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump verifiers - eval trigger step moves to EvalRunInfo.step

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump verifiers - verifiers_commit foreign-repo guard

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump verifiers to branch head

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump verifiers past the openenv restructure

openenv is a built-in taskset behind verifiers[openenv] now (vf#2059),
so the deps/verifiers/packages/* workspace glob goes away again.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 10:15:28 -07:00
6b1604380c feat(inference): uint16 routed-experts payload for >256-expert models (#3051)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* feat(inference): uint16 routed-experts payload for >256-expert models

serialize_routed_experts packed expert indices as uint8, which overflows for
models with >256 experts — NemotronH Super/Ultra route top-22 over 512
experts, so every /generate call with routed-experts capture 500'd
(assert array.max() <= iinfo(uint8).max), stalling router-replay training.

Make the payload self-describing: pick uint8 when indices fit, uint16
otherwise, and emit the chosen dtype in the payload. Consumers default to
uint8 when the field is absent, so payloads from <=256-expert models are
byte-identical to before. Decoder half: verifiers feat/routed-experts-dtype
(must land first and be pinned here before a >256-expert model enables
enable_return_routed_experts).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(trainer): dtype-agnostic routed-experts row size

The batch packer sized routed-experts rows via a hardcoded
dtype->itemsize table that lacked uint16 (KeyError on the first >256-expert
batch). Use np.dtype(...).itemsize instead of maintaining the table.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump verifiers to main (dtype-aware routed-experts decode)

PrimeIntellect-ai/verifiers#2043 merged — the decoder half of the
self-describing routed-experts payload. This pin makes the pair complete:
uint16 payloads from this branch's encoder are decoded correctly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: relock for the verifiers bump

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-16 11:47:20 -07:00
c7dc7929a0 chore: bump renderers to v0.1.8 (#3048)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 16:54:16 -07:00
0d2a7f5a12 chore: bump verifiers + research-environments (#3041)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* chore: bump verifiers + research-environments to latest main

verifiers -> 1cfdd39c (incl. docker-runtime entrypoint fix #2015).
research-environments -> dd80d75b (incl. terminal-bench-2 use_prime_registry
fix #668).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* test: carry provider usage in advantage test rollouts

verifiers #2040 made Trace token counts usage-based, so the synthetic
rollouts (which only had token ids) reported 0 output/input tokens and the
length-penalty tests failed. Attach provider usage to the final sampled
turn so num_output_tokens / num_input_tokens reflect the intended lengths.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 16:16:59 -07:00
HubertandGitHub 5af45e4310 feat(sft): require renderer-based tokenization (#2988)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* feat(sft): renderer-only SFT tokenization

SFT tokenization now goes exclusively through the renderers library:
- build_training_sample with a hand-coded renderer replaces the
  incremental apply_chat_template masking path, which corrupted loss
  masks under position-dependent chat templates (e.g. Qwen3 stripping
  past thinking blocks across user turns). DefaultRenderer is rejected
  in setup_renderer; fake data skips renderer construction entirely.
- [renderer] config defaults to auto-resolution from the tokenizer;
  template controls (e.g. enable_thinking) are set run-wide via the
  typed renderer config.
- Non-assistant roles opt into the loss via the renderer's body-only
  path (content_sft_roles).
- _drop_null_fields strips Arrow phantom nulls before tool-call
  deserialization so genuine nulls inside argument strings survive.
- Null-check rather than key-check for messages vs prompt/completion
  resolution (Arrow schema union adds messages: null to prompt/
  completion rows).
- seq_len default 256 (FakeDataConfig keeps 128); loss_impl defaults
  to liger_fused; CI reverse-text configs pin [renderer] name=qwen3.
2026-07-14 15:31:21 -07:00
961c11f4cf feat(orchestrator): support infinite tasksets (#2993)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* feat(orchestrator): support infinite tasksets

An env server may now report num_tasks=None (verifiers#1969: an
infinite, procedurally generated taskset). TrainSource streams a
monotonic task_idx for such an env - the server generates tasks on
demand, so every pull is a fresh task and there are no epochs to
shuffle - while finite envs keep their shuffled index table. An eval
env with an infinite taskset must set num_examples explicitly.

Dormant until the verifiers pin includes #1969: a finite taskset still
reports an int count and takes the existing paths.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump deps/verifiers to main (infinite tasksets) + relock

Activates the orchestrator's infinite-taskset support: verifiers main
now includes #1969, so the procedural v1 tasksets report
num_tasks=None. The color-codeword-v1 configs drop their num_examples
taskset field (the knob no longer exists - the taskset is
unconditionally infinite and the train env streams); CHANGELOG entry
for the removed size knobs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: drop CHANGELOG entry

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-13 19:05:55 -07:00
321c8aa825 chore: bump research-environments to latest main (#2999)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* chore: drop v0 logic-env and math-env deps

These v0 environments are being removed from research-environments in favor of
their v1 tasksets (logic-env -> i3_logic_v1, math-env -> math-env-v1, the latter
already wired here). Remove the v0 editable path deps + relock so the build
doesn't break when deps/research-environments is re-pinned past their deletion.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: migrate standalone math configs off v0 math-env to v1 tasksets

Move the training configs that used the v0 math-env on an explicit dataset to
v1 env sections: gsm8k -> gsm8k-v1 (verifiers), and the Hendrycks/sanity configs
-> math-env-v1 (task-facing math_verify_timeout preserved where set). All use the
`null` harness + subprocess runtime. Drops the v0-only math_verify_max_workers.

qwen30b_math and examples/Intellect-3.1 use the v0 math-env DEFAULT (INTELLECT-3-RL
math), so they migrate to i3_math_v1 instead — deferred to the submodule bump.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: bump research-environments to latest main and fix moved env paths

Bump deps/research-environments 504bd2620 -> 54f30788f, which includes the
v0->v1 migration (#653), the environment grouping reorg (#655), frontierscience
v1 (#656), and swebench deprecation (#651). The reorg moved every env into a
category subdir (math/, knowledge/, search/, tool_use/, long_context/, code/,
reasoning/, science/, if/, terminal/), so update all 44 editable path deps in
[tool.uv.sources] accordingly, and relock.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: re-bump to research-environments with i3_math_v1; migrate qwen30b_math

Re-bump deps/research-environments 54f30788f -> 06232831f (adds i3_math_v1, #660).
Wire i3-math-v1 (INTELLECT-3-RL math) and i3-logic-v1 (INTELLECT-3-RL logic) as
editable path deps, and migrate examples/qwen30b_math (v0 math-env's INTELLECT-3-RL
default) to the i3_math_v1 v1 taskset. Relock.

examples/Intellect-3.1 is left on v0 for a dedicated recipe pass (it mixes 6 v0
envs — mini-swe-agent-plus/deepdive/math-env/logic-env/code-env/aime2025 — several
without a clean 1:1 v1 mapping); it still validates (v0 sections aren't imported).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: migrate remaining config/example env refs to installed v1 envs

Sweep every configs/ + examples/ env reference so all resolve to installed envs
(no Environments-Hub downloads, no removed v0 envs):

- mini-swe-agent-plus -> r2e-gym-v1 (default harness, prime runtime): Intellect-3.1,
  qwen30b_swe, minimax_m2.5_swe, glm5_pd_disag
- Intellect-3.1 recipe fully to v1: deepdive->deepdive-v1 (rlm+search), math-env->
  i3_math_v1, logic-env->i3_logic_v1 (filter max 0.874), code-env->i3_code_v1,
  aime2025->aime25-v1
- aime2025->aime25-v1 (qwen30b_math eval)
- de-Hub primeintellect/*: wordle->wordle, alphabet-sort->alphabet-sort,
  wiki-search->wiki-search, aime2024->aime24-v1 (hendrycks_sanity eval)
- general-agent-solver-rlm -> general-agent-v1 taskset (colocated tools; configs/general_agent/*)

All target envs are already in the `envs` extra (no lock change). All configs parse
under the schema; audit shows 0 unresolved env references.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: SWE eval -> swebench-verified-v1; lowercase Intellect-3.1 dir

- Point the SWE *eval* env at swebench-verified-v1 (train stays r2e-gym-v1) in
  Intellect-3.1, qwen30b_swe, minimax_m2.5_swe, glm5_pd_disag.
- Rename examples/Intellect-3.1 -> examples/intellect-3.1 (lowercase) and update
  the docs/configuration.md link.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: drop "-quick" from SWE eval name (now full swebench-verified-v1)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: runtime labels use the run name, not the env name

Set the prime-runtime sandbox labels to each config's run identifier (its wandb
project) instead of per-env tags like ["deepdive"] / ["mini-swe-agent-plus"].

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: prime-runtime labels = [run name, env name]

Convention: tag prime sandboxes with both the run identifier (wandb project) and
the env name, e.g. ["intellect-3.1", "swe"] / ["intellect-3.1", "deepdive"].

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* ci: slim install parses an SFT [slurm] config (RL configs are now v1)

The slim "parse a real config" step parsed examples/Intellect-3.1/rl.toml, which
(a) was renamed to lowercase and (b) is now a v1 recipe — v1 env sections resolve/
import their taskset at parse (vf.EnvServerConfig), and those env packages aren't
installed in the slim (prime-rl-configs-only) env. Point it at an SFT [slurm]
config (no env sections) so it still verifies slurm/template_path handling.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* ci: slim install also parses the reverse_text RL config (v0 env, [slurm] compose)

Cover both paths on the slim install: the SFT [slurm] config and the reverse_text
RL recipe (rl.toml @ slurm_rl.toml). The RL one parses because reverse-text is a
v0 env id (resolved lazily, not imported at parse), so no env package is needed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 14:10:10 -07:00
Mika SenghaasandGitHub 9e0d242cd0 chore: bump research-environments and verifiers to 0.2.0 (#2995)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
2026-07-10 14:40:53 -07:00
4bbf967a57 feat: adapt to verifiers task-centric Task/TaskData split (#2987)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* feat: adapt to verifiers task-centric Task/TaskData split

Companion to PrimeIntellect-ai/verifiers#1948: Trace is now generic over
TaskData (DataT), the wire task type is WireTaskData, and vf.Task is the
behavior class — placeholder wire tasks construct vf.TaskData. Taskset
knobs that moved onto TaskConfig nest under taskset.task in configs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump deps/verifiers (from_trace is an opt-in hook)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump deps/research-environments to the task-centric port

All v1 envs in research-environments now speak the task-centric API
(PrimeIntellect-ai/research-environments#650); general_agent's tools
placement knob nests under taskset.task like the other moved knobs.
Full unit suite green against the pinned branch.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* feat: adapt to the nested trace.task carrier

Companion to verifiers recording the producing task class on the trace
(trace.task -> {type, data}): dispatcher placeholders wrap their rows in
vf.TraceTask (type="Task" — no behavior class ever ran), readers nest
(.task.idx -> .task.data.idx), and the wandb sample tables keep showing
the row. Bumps both submodule pins.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump deps/verifiers (compact harness nested-task fix)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump deps/verifiers (simplify-API merge + review fixes)

Compat-audited: every surface prime-rl imports is unchanged or already
adapted; unit suite green (544) and 10-step reverse_text/gsm8k debug
runs healthy against the pinned tip.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(configs): glm45air search judges nest under taskset.task

main's new search config predates the task-centric knob move: plugged
judges live at taskset.task.judges and browsecomp's judge endpoint at
taskset.task.judge.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump submodule pins (codex feature-tool disable, sandbox version fix)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump deps/verifiers (replay recomputes from scratch)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump deps/verifiers to main (task-centric tasks merged)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump deps/research-environments (verifiers dev443 floors)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump deps/research-environments (python floor + prerelease test fix)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump deps/research-environments (port changelogs)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump deps/research-environments (swe taskset ports)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump deps/research-environments (stale comment)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump deps/research-environments to main (v1 ports merged) + relock

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-10 12:11:43 -07:00
1caebf8a1b feat: save all rollouts, not just the effective ones (#2983)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* chore(deps): bump verifiers to fab50d51

Picks up feat: record runtime info on the trace (verifiers#1959) — every
trace now carries its runtime's full config plus the provisioned resource
id — and the results.jsonl -> traces.jsonl rename (verifiers#1956).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* feat(orchestrator): save all rollouts, not just the batched ones

Rollout traces move from rollouts/step_N/{train,eval}_rollouts*.jsonl to
traces/{train,eval}/{all,effective}/:

- all/traces.jsonl is a flat run-level stream appended the moment each
  rollout completes — errored, filtered, and never-batched rollouts
  included — so it is durable across crashes and drains.
- effective/step_N/traces.jsonl is written on batch finalize as before,
  but now holds only the clean subset that shipped to the trainer (eval:
  the non-errored epoch cohort; multiple eval envs share the step file).

Rollout.to_record() now includes the orchestration metadata (kind,
env_name, group_id, policy_version, eval_step) so records in the flat
all stream can be placed without relying on the file path. Together with
the verifiers bump, each record also carries the runtime info (config +
sandbox id), so sandbox errors can be correlated from the all stream.

The all streams have no per-step layout, so resume can't rewind them;
they are wiped on fresh runs only. The per-step effective files rewind
past the resume step exactly like the rollout dirs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* refactor(orchestrator): nest trace files under per-step directories

traces/{train,eval}/... -> traces/step_N/{train,eval}/{all,effective}/
traces.jsonl. Train arrivals attribute to the batch window currently
collecting (progress.step), eval arrivals to their eval trigger step, so
the all files stay append-per-rollout. Per-step layout also lets resume
rewind traces past the resume step exactly like rollouts and broadcasts.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* refactor(orchestrator): nest trace files under the rollout dir

traces/step_N/{train,eval}/... -> rollouts/{train,eval}/step_N/
{all,effective}/traces.jsonl. No separate traces/ top-level dir; the
per-kind subtrees coexist with the trainer-bound rollouts/step_N/*.bin
transport files and rewind on resume like the other step directories.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* refactor(orchestrator): order trace files step-first under the rollout dir

rollouts/{train,eval}/step_N/... -> rollouts/step_N/{train,eval}/
{all,effective}/traces.jsonl, next to the step's train_rollouts.bin.
The existing per-step rewind on the rollout dirs covers the traces
again, so clean_future_steps needs no extra entries.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-09 15:40:51 -07:00
2bc136cf85 refactor: share trace_to_sample with verifiers in the prime monitor (#2974)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* refactor: share trace_to_sample with verifiers in the prime monitor

Replace the monitor's hand-rolled v1-trace -> sample conversion in
`_rollouts_to_parquet_bytes` with `verifiers.v1.samples.trace_to_sample`, the same
canonical converter verifiers' eval `uv run eval --push` uses. Both producers now emit
one identically-shaped sample record; the RFT-only parquet columns (run/step/advantage/
problem_id/env_name) are layered on here. Behavior-preserving: the parquet schema and all
column values are unchanged (verified against the existing monitor unit tests).

Bumps the deps/verifiers submodule to the verifiers PR that adds `trace_to_sample`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: bump deps/verifiers (drop trace_to_sample unit test)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump deps/verifiers (run-metrics aggregation + main merge)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump deps/verifiers (inline push run-metrics)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump deps/verifiers (drop URL from push log)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump deps/verifiers (platform sample/metric shape fixes)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump deps/verifiers (compute_metrics docstring)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump deps/verifiers (per-rollout reward columns)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump deps/verifiers (crash-safe --push upload)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump deps/verifiers (drop trajectory reward + reward-name suffixing)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump deps/verifiers (num_examples in push metadata)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore: bump deps/verifiers (trace_to_sample folded into push.py)

samples.py was dropped on the verifiers branch - trace_to_sample now
lives in verifiers.v1.push

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-08 17:10:42 -07:00
6bfbd64aef chore(deps): bump verifiers + research-environments to latest main (#2976)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
Bump both submodules to their current upstream main:
- verifiers:              50883f16 -> a497ee52
- research-environments:  404f0fa8 -> 3e3b5ac3

Reconcile pyproject/uv.lock with upstream changes:
- research-environments moved the SWE tasksets under environments/swe/,
  so repath r2e-gym-v1, scaleswe-v1, swebench-pro-v1, swebench-verified-v1
  and swelego-v1 to environments/swe/<name>.
- research-environments removed the v0 general_agent and rlm_search envs
  (#646), so drop general-agent and rlm-search from the `envs` extra and
  [tool.uv.sources]. general-agent-v1 is unaffected.

verifiers is consumed only via the verifiers.v1 namespace; the removed
verifiers.rl / verifiers-rl code and the RolloutContext->ModelContext
rename do not touch prime-rl. Verified `uv sync --extra envs` resolves,
all 64 env dists install, the moved SWE envs import, and prime-rl's
verifiers.v1 imports (incl. EnvConfig(vf.EnvServerConfig)) still work.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-08 14:39:52 -07:00
samsjaandGitHub 1b028ca1d1 bump depsj (#2967)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
2026-07-07 09:10:48 -07:00
samsjaandGitHub df2acf4874 bump vf (#2956)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
2026-07-03 20:31:12 -07:00
samsjaandGitHub 5ff9abd8b5 bump re (#2955)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
2026-07-03 20:23:40 -07:00
minh hoangandGitHub 8a977ecc9c chore: bump renderers for Laguna-XS-2.1 support (#2950)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
Pulls in renderers#97 (laguna-xs-2.1 renderer variant: XS-2.1's template
drops the baked-in default system message) and renderers#94 (multimodal
payload through build_training_sample). No renderers dependency changes,
so uv.lock is untouched.
2026-07-03 12:48:17 -07:00
50aeb3c7d6 chore(deps): bump research-environments + wire s1-deepresearch-v1/arxivmath-v1 (#2934)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* chore(deps): add s1-deepresearch-v1 + arxivmath-v1 environments to pyproject.toml + uv.lock

Bumps the research-environments pin to pick up the two new
bring-your-own-search v1 tasksets:

- s1-deepresearch-v1: ScienceOne-AI/S1-DeepResearch-15k closed-ended
  deep-research QA (6000 verifiable tasks, en/zh filter), binary semantic
  LLM judge.
- arxivmath-v1: MathArena/arxivmath-training research-level math
  (2605 tasks), in-runtime math-verify scoring of the boxed answer.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore(deps): bump research-environments for trace.last_reply scoring fix

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore(deps): bump research-environments to merge with upstream main

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore(deps): relock for research-environments verifiers pin bumps

The submodule merge brought main's env pyproject updates (verifiers pins
unified to >=0.1.15.dev411), which uv.lock records as requires-dist metadata.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* chore(deps): bump research-environments to merged main (s1-deepresearch/arxivmath #630)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: fares <fares@primeintellect.ai>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 20:24:16 +01:00
halleriteandGitHub 7b7c7efdfa chore(configs): migrate v1 harness ids for the verifiers null/default rename (#2919)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
2026-07-01 06:38:52 +02:00
16efd8afda feat(algo): linear length penalty (completion + context + turns) for GRPO (#2901)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* feat(algo): linear length penalty (completion + context + turns) for GRPO

Port the length-penalty-context-turns branch onto current main's algorithm
abstraction as a new `linear` LengthPenaltyConfig variant. It subtracts a single
pass_rate-scaled penalty from each reward before the GRPO baseline: coef *
completion tokens + context_coef * non-completion (context) tokens over the
group's longest sequence, plus turns_coef * turns over the group's most turns —
each normalized by the group's own max, optionally gated to correct rollouts.

context_coef and turns_coef default to 0.1 (completion coef 0.25).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(algo): make linear the only length penalty (remove tokens/turns)

Per review, the linear penalty replaces the existing efficiency-shaping
length penalties rather than coexisting with them:
- Remove TokensLengthPenaltyConfig / TurnsLengthPenaltyConfig; LengthPenaltyConfig
  is now just LinearLengthPenaltyConfig.
- Simplify GRPOAlgorithm.score_group to None vs linear.
- Remove the now-orphaned efficiency_shaping (delete algo/advantage.py) and its
  references in algo/__init__ and docs.
- Rewrite test_advantage.py: drop the efficiency_shaping / tokens / turns cases,
  add linear-penalty tests (completion / context / turns terms, gating, and the
  equal-length reduce-to-plain-GRPO invariant).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor(algo): drop gate_by_correctness; compute turns term unconditionally

- Remove the gate_by_correctness option from the linear length penalty.
- Always add the turns term (it contributes 0 when turns_coef=0); drops the
  asymmetric guard so all three terms are handled uniformly.
- Remove the gating unit test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor(algo): rename linear length-penalty fields + per-term-max normalization

- Rename GRPOAlgoConfig.length_penalty -> length_pen; lp -> length_pen in grpo.
- Rename coef/context_coef/turns_coef -> completion_pen/input_pen/turns_pen.
- Normalize each term by its own group max: completion / max completion,
  input (= total - completion) / max input, turns / max turns (previously the
  completion and input terms shared the max-total denominator).
- Drop the explanatory comments in score_group; fix stale field/doc text.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor(algo): rename input_tokens -> input for naming consistency

Matches the other bare locals (completion, total, turns).

* docs(changelog): note length_pen rename + tokens/turns removal

* chore: adopt consolidated num_ trace token properties + rename length penalty config (#2905)

* fix(template): orchestrator URLs use canonical model.client path (#2899)

The multinode RL sbatch template launched the orchestrator with
--student.client.{base-url,admin-base-url}, but OrchestratorConfig has no
`student` field — the canonical path is `model.client` (base_url /
admin_base_url on ClientConfig). The orchestrator-config rename left the
template stale, so every multi-node RL launch fails config parsing with
"Unrecognized arguments: <inference URLs>".

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix: correct env log glob to logs/envs/<split>/<env>.log (#2898)

* fix: correct env log glob to logs/envs/<split>/<env>.log

Since the nano-as-v1 migration each env writes a single
logs/envs/{train,eval}/<env>.log file (two levels), but the launch
banner still printed three-level globs (logs/envs/*/*/*.log), which
match nothing. Fix the banner generator and the captured example
outputs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs: drop captured launch-banner output from example READMEs

The "Output of the command" blocks duplicated the live launch banner
(now fixed in pathing.py) and drift out of sync. Remove them; the run
command stays.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat: configurable env vars (#2863)

* feat(env): consolidate component env vars

Add shared env var defaults and per-component env_vars plumbing across RL, SFT, and inference launch paths.

Update launcher filtering, SLURM templates, examples, and docs to match the consolidated env config surface.

* feat: add rl-wide env vars (#2897)

---------

Co-authored-by: Sami Jaghouar <sami.jaghouar@hotmail.fr>
Co-authored-by: samsja <55492238+samsja@users.noreply.github.com>

* Update configs for renderer thinking retention (#2900)

* chore: migrate to consolidated Trace/Branch num_ token properties

Bump deps/verifiers to the property consolidation (verifiers #1894) and
rename every prime-rl access of the renamed Trace/Branch properties:

  completion_len / output_len -> num_output_tokens
  prompt_len                  -> num_input_tokens
  rollout total_tokens        -> num_total_tokens

progress.total_tokens, Usage.total_tokens and RunStats.total_tokens are
unrelated and left unchanged; num_turns is unchanged upstream.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: rename length penalty config to num_*_tokens_weight + num_turns_weight

Align the linear length-penalty config (from #2901) with the consolidated
num_-prefixed trace property names:

  [orchestrator.algo.length_pen]  -> [orchestrator.algo.length_penalty]
  completion_pen                  -> num_output_tokens_weight
  input_pen                       -> num_input_tokens_weight
  turns_pen                       -> num_turns_weight

Updates grpo.score_group, the config class, docs, CHANGELOG, and tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: bump verifiers + research-environments to main (#2904)

* chore: bump verifiers + research-environments to main

- verifiers: aa95826d → 97be43bf
- research-environments: 99ebd2e13 → bae0ffe5a
- lock new v1 envs: lean-v1 (6 per-dataset Lean tasksets), prolog-v1
- bump verifiers floor 0.1.15.dev400 → dev404

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: lock remaining research-environments v1 envs

Lock the 21 previously-unlocked RE v1 env packages into the `envs` extra
+ tool.uv.sources, and alphabetize both the `envs` list and the env source
entries.

tau3-bench-v1 is intentionally excluded: it requires tau2 @ git 58e5e1a,
which conflicts with the tau2 @ 337326e pinned by the already-locked
tau2-bench-v1 (uv cannot resolve two URLs for one package).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: drop rlm-swe to remove the verifiers override

rlm-swe pins verifiers>=0.1.15.dev17,<0.1.15.dev156 — a stale upper bound
that conflicts with the editable verifiers submodule (dev404) and with the
other envs / prime-rl-configs. It was the sole reason verifiers needed a
global override-dependencies entry (without it, resolution is unsatisfiable).

Dropping rlm-swe lets us remove that override: verifiers now resolves to the
editable submodule through tool.uv.sources alone. Also prunes rlm-swe's heavy
transitive deps (modal, swebench, swe-rex, pygithub, …) from the lock.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: migrate rlm_swe config dependents to r2e-gym-v1

Dropping the rlm-swe env orphaned its in-repo config dependents:
- examples/glm5_llmd/rl.toml: migrate the v0 `rlm_swe` env block to the v1
  `r2e-gym-v1` taskset on the rlm harness (prime runtime), mirroring
  configs/debug/v1/r2e_gym.toml
- configs/rlm_swe/qwen35_4b.toml: remove (superseded by configs/debug/v1/r2e_gym.toml)
- skills/training/start-run: point the find_spec example at r2e_gym_v1
- configs/debug/v1/r2e_gym.toml: drop the stale reference to the removed v0 config

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: re-pin deps/verifiers to merged verifiers main (#1894)

The Trace/Branch num_ consolidation landed on verifiers main; point the
submodule at the merge commit instead of the temporary cherry-pick pin.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: require verifiers >=0.1.15.dev405 (Trace/Branch num_ consolidation)

The submodule is pinned at the consolidation commit (0.1.15.dev405); raise
the floor so the renamed Trace/Branch token properties are guaranteed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: samsja <55492238+samsja@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Sami Jaghouar <sami.jaghouar@hotmail.fr>
Co-authored-by: eligotts <78387377+eligotts@users.noreply.github.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: samsja <55492238+samsja@users.noreply.github.com>
Co-authored-by: Sami Jaghouar <sami.jaghouar@hotmail.fr>
Co-authored-by: eligotts <78387377+eligotts@users.noreply.github.com>
2026-06-29 14:41:49 -07:00
2a0007f51d chore: bump verifiers + research-environments to main (#2904)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* chore: bump verifiers + research-environments to main

- verifiers: aa95826d → 97be43bf
- research-environments: 99ebd2e13 → bae0ffe5a
- lock new v1 envs: lean-v1 (6 per-dataset Lean tasksets), prolog-v1
- bump verifiers floor 0.1.15.dev400 → dev404

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: lock remaining research-environments v1 envs

Lock the 21 previously-unlocked RE v1 env packages into the `envs` extra
+ tool.uv.sources, and alphabetize both the `envs` list and the env source
entries.

tau3-bench-v1 is intentionally excluded: it requires tau2 @ git 58e5e1a,
which conflicts with the tau2 @ 337326e pinned by the already-locked
tau2-bench-v1 (uv cannot resolve two URLs for one package).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: drop rlm-swe to remove the verifiers override

rlm-swe pins verifiers>=0.1.15.dev17,<0.1.15.dev156 — a stale upper bound
that conflicts with the editable verifiers submodule (dev404) and with the
other envs / prime-rl-configs. It was the sole reason verifiers needed a
global override-dependencies entry (without it, resolution is unsatisfiable).

Dropping rlm-swe lets us remove that override: verifiers now resolves to the
editable submodule through tool.uv.sources alone. Also prunes rlm-swe's heavy
transitive deps (modal, swebench, swe-rex, pygithub, …) from the lock.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: migrate rlm_swe config dependents to r2e-gym-v1

Dropping the rlm-swe env orphaned its in-repo config dependents:
- examples/glm5_llmd/rl.toml: migrate the v0 `rlm_swe` env block to the v1
  `r2e-gym-v1` taskset on the rlm harness (prime runtime), mirroring
  configs/debug/v1/r2e_gym.toml
- configs/rlm_swe/qwen35_4b.toml: remove (superseded by configs/debug/v1/r2e_gym.toml)
- skills/training/start-run: point the find_spec example at r2e_gym_v1
- configs/debug/v1/r2e_gym.toml: drop the stale reference to the removed v0 config

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 13:56:02 -07:00
eligottsandGitHub 4e7bc94fcd Update configs for renderer thinking retention (#2900)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
2026-06-29 11:51:46 -07:00
d1f366b1bc chore: bump verifiers + research-environments to main (#2887)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* chore: bump verifiers + research-environments to main

Bump deps/verifiers (62dc38a5 -> aa95826d, 0.1.15.dev396 -> dev400; adds the
reusable vf.Judge) and deps/research-environments (0687a15c -> 99ebd2e1) to
their latest main, and follow the env ports / removals they shipped.

research-environments removed six v0 envs prime-rl pinned (ported to v1):
- code-env -> i3-code-v1
- ifeval -> ifeval-v1
- math500 -> math500-v1
- mmlu-pro -> mmlu-pro-v1
- science-env -> i3-science-v1
- simpleqa-verified -> simpleqa-verified-v1

Also drop v0 envs that nothing references anymore: hle, rlm-swe, rlm-search,
tau2-bench (tau2-bench-v1 stays).

Configs:
- Migrate the math500 eval env onto math500-v1 (hendrycks_math, nemotron_4node,
  nemotron_debug).
- Remove the stale env_mix and math_group configs.

Bump the verifiers floor dev396 -> dev400 and relock.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: keep rlm-swe + rlm-search env deps

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 11:29:56 -07:00
halleriteandGitHub eb89285418 fix(orchestrator): eval completion_len is always 0 on the token-less relay (#2880)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
2026-06-25 22:47:59 +02:00
35b452b01c chore: bump verifiers + research-environments to main (#2873)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
Bump deps/verifiers (b055799f -> 20abcd91) and deps/research-environments
(dbc58e14 -> 0687a15c) to their latest main, and follow the env
deprecations/ports they shipped.

research-environments removed several v0 envs and ported others to v1:
- drop dead v0 env deps (removed upstream): color-codeword,
  mini-swe-agent-plus, opencode-{cp,deepdive,math,science,swe}
- migrate ported envs v0 -> v1: deepdive, gpqa, livecodebench
- migrate the two multimodal color-codeword configs onto the
  color-codeword-v1 taskset (default harness, subprocess runtime)

Also bump the verifiers floor 0.1.15.dev388 -> dev394 to match the new pin
and relock.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 21:36:03 -07:00
halleriteandGitHub d3765e289d chore(deps): bump verifiers to 0.1.15.dev388 (#2870)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
2026-06-24 22:52:46 +02:00
a3151e3711 chore: repoint v1 tasksets to research-environments (#2864)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* chore(deps): repoint scaleswe/swebench-verified/terminal-bench-2 v1 tasksets to research-environments

The three container-backed v1 SWE tasksets moved out of verifiers into
research-environments. Repoint their [tool.uv.sources] paths and bump both
submodules to match.

- deps/verifiers: drop the three envs
- deps/research-environments: add the three envs + advance to current main
- uv lock

Taskset ids are unchanged, so run configs that reference them by id need no changes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(deps): bump verifiers + research-environments submodules to current heads

Picks up vf#1851 (swebench-verified ensures uv on PATH before scoring), now ported
into the research-environments copy of swebench_verified_v1.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(deps): repoint 6 more v1 tasksets to research-environments

Following their move out of verifiers, repoint math-env-v1, aime24-v1, r2e-gym-v1,
swelego-v1, wikispeedia-v1, and general-agent-v1 from deps/verifiers to
deps/research-environments, and bump both submodules to the updated heads. The
moved envs now pin verifiers>=0.1.15.dev381 (satisfied by the editable verifiers).

- uv lock

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(deps): bump research-environments (drop moved eval configs + scaleswe fix)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(deps): swap v0 aime for v1 tasksets + reference tau2-bench-v1

Following the aime/wikispeedia v0->v1 replacement in research-environments:
- drop aime2024, aime2025 (v0); reference aime24-v1, aime25-v1, aime26-v1
- add tau2-bench-v1
- bump deps/research-environments + uv lock

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(deps): repin verifiers + research-environments to merged main

verifiers#1853 (remove the moved v1 tasksets) and research-environments#527 (add them)
have merged; repin both submodules to the merged main commits. uv.lock unchanged
(already consistent — `uv lock --check` passes).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(configs): point aime eval envs at the v1 tasksets

The v0 aime2024/aime2025 packages were dropped from the `envs` extra + sources, so
`uv sync --extra envs` no longer registers them and eval sections using the legacy
ids fail at runtime. Switch those eval entries to the v1 tasksets (aime24-v1 /
aime25-v1; default `subprocess` harness), keeping the display names for metric
continuity.

- configs/acereason_math/{stage1,stage2}.toml
- configs/debug/hendrycks_sanity/rl.toml
- configs/math_group/rl.toml

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 20:33:26 -07:00
7089ba1e4d feat: vf v1 <> nano bridge (#2742)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* feat: add vf-nano as submodule

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: bump deps/vf-nano to feat/env-server (EnvServer)

Points the submodule at the vf-nano EnvServer branch so the orchestrator can
build on the env-server abstraction.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat: run orchestrator on a vf-nano env server (reverse-text)

Switch prime-rl's env path to vf-nano: the orchestrator spawns a vf-nano
EnvServer per env (it never loads an environment), dispatches rollouts by task
index, and trains on the returned Trace dicts (branches + renderer tokens).

- pyproject: dep verifiers -> vf-nano; drop v1/research env packages; only the
  vf-nano reverse-text example; override out the transitive v1 verifiers (pulled
  by the prime CLI) so it can't shadow vf-nano's `verifiers` package; add orjson
  /pandas/msgspec (were transitive via verifiers).
- EnvConfig inherits vf-nano's swappable agent/runtime (+ max_turns).
- envs.py: spawn EnvServer child + EnvClient, info() for num_tasks/group-scoring,
  dispatch by task_idx, adapt Trace -> RolloutOutput-shaped dict.
- trajectories.py: trace_to_samples (one sample per Trace branch) + trace_to_output.
- train_source: index sampling; client pool builds vf-nano ClientConfig; lag
  monitor vendored; env-server entrypoint repointed; ~14 files retyped off
  vf.RolloutOutput / vf.ClientConfig.
- configs/debug/vf_nano_reverse_text.toml.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat: consume vf-nano Trace natively (branches→samples, shared renderer config)

- trace_to_samples stitches each Trace branch's tokens into one TrainingSample
  (prompt = branch start, then each turn's new context [masked] + generated
  tokens [trained]); drop the RolloutOutput adapter — read the Trace's native
  fields directly (reward, error{type,message}, timing generation/scoring,
  num_turns, branches).
- envs returns the raw Trace; eval_sink / train_sink / dispatcher / metrics /
  orchestrator read native Trace fields (no token_usage/completion/timing.total).
- client pool forwards the shared renderers.RendererConfig to the env server's
  renderer client (so it uses qwen3, not the tool-less default fallback).
- debug config: tool_call_parser=hermes (vLLM accepts the agent's tools),
  max_steps=20.
- bump deps/vf-nano.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor: pass typed ClientConfig/SamplingConfig to the env client (no timeout)

- Env.run_rollout/run_group pass the vf-nano ClientConfig object and a
  SamplingConfig (built from the env's sampling args) directly — no model_dump,
  no per-rollout timeout forwarded to the server.
- debug config: max_steps=20.
- bump deps/vf-nano (typed env-server RPC).

* refactor: orchestrator holds a typed vf.Trace[EnvTask] (no dicts)

The env server returns a Trace minus its derived fields; the orchestrator resolves
the env's Task subclass (from config.id) and validates the wire dict into a strict
Trace[EnvTask], so the whole orchestrator works with a real, typed vf.Trace —
typed task fields included (e.g. task.answer), nothing subscriptable.

- envs.py: resolve_task_type(env_id); run_rollout/run_group validate -> Trace[EnvTask].
- trajectories/types/dispatcher/train_sink/eval_sink/metrics/filters/advantage/utils
  /orchestrator: attribute access on the typed Trace (reward, error{type,message},
  branches, timing.<span>.duration, num_turns, ...); derived fields recompute on the
  consumer.
- Task/Trace/TimeSpan stay strict (StrictBaseModel) — no extra=ignore anywhere.
- bump deps/vf-nano.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: depend on vf-nano[serve]; bump submodule

The orchestrator spawns the env server, so request the serve extra
(zmq/msgpack) explicitly now that vf-nano keeps them out of core.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: bump vf-nano (client docstring cleanup)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: drop redundant forward-ref quotes in advantage.py

`from __future__ import annotations` already defers all annotations to strings,
so the quotes + `# noqa: F821` on the TYPE_CHECKING-only `vf.Trace` / `TrainRollout`
annotations are unnecessary (no import cycle — verifiers.nano never imports prime_rl).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor: rename FinishedRollout.raw -> trace

The field holds a typed vf.Trace, so `trace` reads truer than `raw` (which
suggested an unparsed dict). Renames the field + every `.raw` access, the
`emit_rollout(trace=...)` param/kwarg, the to_dict field filter, and the
dispatcher cancel-path locals.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor: simplify FinishedRollout, read straight off the typed Trace

- Drop the FinishedRollout proxy properties (error/reward/is_truncated and the
  example_id field); consumers now read r.trace.{reward,is_truncated,task.idx,...}
  directly. The trace is the single source of truth.
- Use vf.Trace.has_error for existence checks instead of `.error is not None`.
- Replace the prime-rl trace_* token-length utils with vf.Trace.{completion_len,
  total_tokens,has_response} (now on the trace); keep trace_to_samples.
- Carry task_idx end-to-end (GroupState.task_idx, env.run_rollout/run_group(task_idx),
  source dict key) instead of the example/example_id dict carrier; identity comes
  off trace.task.idx.
- Mark the local-package env arrangement as a temporary/experimental TODO.
- Move the debug config to configs/debug/nano/reverse_text.toml.
- Bump deps/vf-nano (Trace/Turn accessors).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor: spawn env server on an OS-assigned port, drop the startup poll

- The env server binds tcp://127.0.0.1:0 and reports its concrete address back
  over a queue; the orchestrator connects to that. Removes _get_free_port and its
  TOCTOU race (the OS assigns the port atomically).
- A spawned server has already bound + loaded by the time it reports its address,
  so the untimed info() is enough — only poll wait_for_server_startup for an
  external (config.address) server, which has no spawn handshake.
- Bump deps/vf-nano (port report + Trace/Branch token-length accessors).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor: use vf.task_type instead of a local resolve_task_type

The Task-subclass introspection now lives in vf-nano (vf.task_type); drop the
prime-rl copy and build the typed Trace via vf.Trace[vf.task_type(env_id)]. Bump
deps/vf-nano.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat: restore backfill_rollout_tokens for SFT (typed Trace)

SFT trains on a teacher served over the chat client, which returns no token ids,
so the trace's turns have tokens=None and trace_to_samples yields nothing. Restore
backfill: for each tokenless turn, render its prompt + assistant response with the
student chat template and split on the longest common prefix to fill TurnTokens
(masks/logprobs come from trace_to_samples). train_sink.process_rollout backfills
when any turn lacks tokens, before building samples.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix: pass task_idx when building Cancelled traces on off-policy drop

drop_group's error_rollout_output calls omitted the required task_idx, so an
off-policy cancel (on_new_version) raised TypeError. Use the group's task_idx
(or -1 when the group is already gone), mirroring handle_completed_rollout.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor: consume typed Trace[WireTask]; inline synthetic error traces

- envs.py: EnvClient now returns Trace[WireTask]; upgrade to this env's real Task
  subclass via self.trace_type.model_validate(wire.to_wire()).
- dispatcher.py: drop the error_rollout_output helper — inline the synthetic error
  Trace at each call site using vf.Error's field names (type/message/traceback); the
  task-exception path carries a real traceback, cancels/empty-trajectory carry none.
- Bump deps/vf-nano.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat: env-server file logging; align debug config batch/group to canonical

- Spawned env servers now route their output (logging + subprocess-runtime output)
  to <output_dir>/logs/envs/<name>.log via a _run_env_server wrapper that redirects
  stdout/stderr and sets up logging in the child. Previously the orchestrator-spawned
  server logged nowhere.
- Debug config: batch_size 16->128, group_size 8->16, eval num_examples 8->128
  (interval=1), matching configs/debug/training_modes/rl.toml.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix: don't double the envs/ segment in the env-server log path

The orchestrator already passes a train/eval-split log_dir (.../logs/envs/train,
.../logs/envs/eval), so _spawn must drop the file directly under it
(<log_dir>/<name>.log) rather than re-adding an envs/ subdir — which had buried the
train/eval split under logs/envs/<kind>/envs/<name>.log.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: bump vf-nano (Error.traceback str | None)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: bump vf-nano (to_wire ordering)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat: launch env servers as separate processes from the rl entrypoint

Instead of the orchestrator sidecar-spawning each env server as an mp child, the
rl launcher now spawns one `env-server` process per env (train + eval), each on a
free port, with output to logs/envs/{kind}/{name}.log and a crash monitor — same
model as inference/trainer. It sets env.address in the orchestrator config so the
orchestrator attaches (its existing external path) instead of spawning. Envs that
already set address (user-managed external server) are left alone; the orchestrator's
mp sidecar stays as the fallback for running `orchestrator` directly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor: env servers use fixed configurable ports, not get_free_port

Add RLConfig.env_server_base_port (default 5000); the i-th launcher-managed env binds
base_port + i. Drops the get_free_port dependency in the launcher.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor: separate train/eval env-server port blocks

Train envs bind base_port + i; eval envs bind base_port + ENV_SERVER_KIND_STRIDE + i
(stride 1000), so each kind has headroom for many envs without the blocks colliding
(was a single running index — train and eval sat adjacent).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix: env-server logs + sidecar queue cleanup; train-only debug config

- env_server entrypoint: intercept vf-nano stdlib logging so the server's own logs
  (EnvServer up, request failures) land in logs/envs/<kind>/<name>.log — previously
  only loguru output was captured, swallowing them.
- envs.py: close the address-handoff mp.Queue after use (no resource_tracker
  leaked-semaphore warning on the sidecar path).
- configs/debug/nano/reverse_text.toml: drop the eval block, mirroring
  examples/reverse_text/rl.toml (train-only smoke; eval path validated separately).
- bump deps/vf-nano (serve/types docstring trim).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: bump vf-nano (BaseRequest marker, no request_type field)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: env client uses client= (was client_config=); bump vf-nano

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: bump vf-nano (drop renderers dep comment)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: bump vf-nano (configs/ + cli/ split, serve/ runtime-only)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor: drop FinishedRollout.to_dict; serialize the Trace to disk directly

The I/O boundary (save_rollouts + monitor sample tables) now dumps the typed
vf.Trace itself (r.trace.model_dump(mode="json")) instead of a Trace+metadata
merge — the on-disk rollout is just the trace.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor: track vf-nano agent->harness rename

vf-nano renamed its rollout-driver abstraction Agent -> Harness. Update the
integration: EnvConfig.agent -> harness (HarnessConfig/DefaultHarnessConfig);
env.run_rollout/run_group spawn forwards harness_config; the env-server entrypoint
passes harness_config/harness_timeout; debug config uses `harness = {...}`. Bump
deps/vf-nano to the renamed branch.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: track vf-nano plugin reorg (reverse-text path + bump)

vf-nano reorganized examples into examples/{tasksets,harnesses}/; point the
reverse-text editable source at examples/tasksets/reverse_text and bump deps/vf-nano.
No prime-rl code change — EnvConfig.harness (default) resolves via vf-nano's built-in
harness registry. Verified: 3-step reverse-text smoke trains (0.26 -> 0.42, 0% error).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat: reuse vf.EnvConfig in the orchestrator (typed taskset/harness, drop args)

prime-rl's EnvConfig now subclasses vf.EnvConfig and resolves taskset + harness to their
specific config types by id (taskset_config_type / harness_config_type), so env-specific
fields are validated against the real config — the untyped `args` dict and the top-level
`id` are gone (id/stripped_id/resolved_name are now properties off taskset.id). Timeouts
come from vf.TimeoutConfig (timeout.rollout / timeout.scoring), superseding prime-rl's flat
timeout. The env server is spawned with the typed taskset_config (no env_id/args).

- pyproject: install the vf-nano plugin packages (default/rlm harnesses, gsm8k taskset)
  as path sources; bump deps/vf-nano to the plugin-packages branch.
- configs/debug/nano/reverse_text.toml: taskset = { id = ... }, harness.id (was harness.type).

Verified: custom taskset (gsm8k.split) + harness (rlm.ref) resolve to typed configs; bad
fields are rejected; the migrated TOML loads through RLConfig.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor: inherit vf's shared plugin resolution; trim dead EnvConfig fields

EnvConfig drops its own _resolve_plugins (now inherited from vf.EnvConfig's shared
validator) and the dead v1-forwarding fields: extra_env_kwargs, max_total_completion_tokens,
state_columns (no readers on the vf-nano branch). Also drop stripped_id (no hub installs ->
no @version, so id == it) — callers use .id. Bump deps/vf-nano.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor: require a configured taskset per env (no reverse-text default)

EnvConfig no longer auto-defaults its taskset to reverse-text; an env with no taskset id
errors at validation. Env-list defaults are empty (eval's non-empty check still fires only
when an eval block is configured). Bump deps/vf-nano.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: bump deps/vf-nano (dashboard taskset.id/harness.id fix)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: bump deps/vf-nano (sampling max_tokens fix)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(env-server): require a configured env; build EnvServer from the EnvConfig

EnvServerConfig.env was a bare EnvConfig() default, which now raises (no taskset) and
crashed the env-server at import. Make env required — the orchestrator always passes a
real env config. Build the server straight from config.env (vf-nano EnvServer takes the
EnvConfig). Bump deps/vf-nano (is_truncated computed field).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(nano): reverse-text uses default harness with enable_bash=false

The model answers directly (no bash tool), so the tool_call_parser is no longer needed.
Bump deps/vf-nano (enable_bash flag).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(nano): hendrycks-sanity config on the math-env taskset

Add configs/debug/nano/hendrycks_sanity.toml (vf-nano analog of configs/debug/hendrycks_sanity):
math-env train env on the sanity dataset (R1-distill, default renderer with think parser,
single-turn no-bash), aime24 eval env. Register math-env + aime24 in the envs group + sources.
Bump deps/vf-nano (math/aime tasksets, enable_bash, SerializeAsAny + is_truncated fixes).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: bump deps/vf-nano to merged main (math/aime tasksets, fixes)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: drop deps/verifiers, bump deps/vf-nano to merged main

vf-nano main (#8) adds the subprocess-runtime env passthrough (inherit host env
minus API_KEY, so UV_CACHE_DIR reaches rollout workers and lands the uv cache on
local disk) and the math-verify scoring fix (wrap gold + prediction in \boxed,
matching v1 math-env — fixes matrix/vector answers scoring 0).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(nano): hendrycks-sanity mirrors examples/hendrycks_sanity + slurm overlay

nano config is now a verbatim copy of examples/hendrycks_sanity/rl.toml with only
the env sections swapped to vf-nano taskset/harness syntax (math-env taskset,
default harness, subprocess runtime; aime24 eval). Adds a slurm overlay setting
the output dir, wandb run name, and partition.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(nano): fold wandb + slurm into hendrycks_sanity config

Move the [wandb] and [slurm] sections from the slurm overlay into the base config, so it
submits to slurm by default (run locally with --no-slurm). The overlay now only redirects
output_dir. wandb run name is vf-nano-subprocess.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(nano): fold output_dir into hendrycks_sanity config, drop slurm overlay

Everything (output_dir, wandb, slurm) now lives in the one config; remove the now-empty
slurm overlay. Run locally with --no-slurm.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(vf-v1): run on the unified verifiers package (v0 envs + v1=nano + legacy bridge)

Depend on the single verifiers package (deps/verifiers, nesting vf-nano) instead of standalone
vf-nano. EnvConfig is dual-mode: v0 envs via id+args (legacy bridge), v1 envs via taskset/harness
(native nano). The env-server spawn (standalone + mp) picks LegacyEnvServer for v0 and EnvServer
for v1; both return vf.Trace so the orchestrator is unchanged. Plugin sources repointed under
deps/verifiers; reverse-text is the v0 env, reverse-text-v1 the nano taskset.

Verified: uv run rl @ examples/reverse_text/rl.toml (v0, unchanged) trains via the bridge
(reward 0.14->0.79); vf-eval + vf-eval-v1 reverse-text both reward 1.0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test(v0): wire alphabet-sort (multi-turn) + bump verifiers (State scrub)

Add the v0 alphabet-sort env as an installable source; bump deps/verifiers to the State-scrub
commit. Verified the bridge on a multi-turn v0 env: alphabet-sort runs (Turns 2.0, 128/128
trainable, 0% error) alongside single-turn reverse-text.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test(v0): wire wordle + add configs/wordle/rl.toml (2-GPU)

Wire the v0 wordle TextArena env (multi-turn game) as an installable source; add a 2-GPU
(1 trainer + 1 inference) wordle config. Verified through the legacy bridge: wordle trains
(Turns ~5.3, reward ~0.81, 128/128 trainable, 0% error).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: bump deps/verifiers (v1 hygiene: init.py/tests/docs)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor(v1): track de-vendored verifiers, rename nano -> v1

- Bump deps/verifiers to the de-vendored commit: vf-nano is now vendored as the
  verifiers.v1 subpackage (no nested deps/vf-nano submodule).
- Repoint env-plugin sources from deps/verifiers/deps/vf-nano/... to
  deps/verifiers/{examples,packages}/...
- Rename verifiers.nano -> verifiers.v1 across the orchestrator/utils/configs;
  rename configs/debug/nano -> configs/debug/v1. "v1" is the name now (no "nano").

Verification: v0 reverse-text (legacy bridge) and v1 reverse-text-v1 (native)
both train over a 3-step smoke (reward present, 0% error).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers (eval/serve, v1 deps in base, bundled plugins)

- Bump deps/verifiers: v1 runtime deps moved to base (no `v1` extra), v1 CLIs
  renamed eval/serve, shipped plugins bundled in the tasksets/harnesses umbrella
  packages, verifiers/v1/harness.py (flattened harnesses subpackage).
- Depend on `verifiers` (was verifiers[v1]) and the `harnesses` umbrella package
  (was standalone default/rlm).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers (Task.system_prompt); write full rollout jsonl

- Bump deps/verifiers to the system_prompt commit: Task.system_prompt + harness
  APPENDS_SYSTEM_PROMPT support, reverse_text_v1 byte-identical to the v0 env (separate
  system message), plus this branch's eval/serve, v1-deps-in-base, CI fixes, and the
  retired semgrep policy.
- save_rollouts: drop exclude_keys={"trajectory"} for both train and eval rollouts so the
  jsonl carries the full trajectory.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: drop semgrep from uv.lock (verifiers retired the policy group)

Follow-up to the deps/verifiers bump (00c7b77a removed the `policy` dependency
group); regenerates the lock to match.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix: pin the env-server renderer tokenizer to the base model for LoRA runs

Wire `renderer_model_name` (the base model) into the renderer client config so
the env-server renderer builds its tokenizer from the base model instead of the
per-request LoRA adapter name, which has no published HF tokenizer and 404'd
once LoRA training set the served model name to the adapter. Mirrors the
`renderer_model_name` wiring already in `setup_clients` on main. Bumps
deps/verifiers to the matching fix.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(orchestrator): request vLLM token ids for MITO training (#2745)

On the MITO path (no renderer), set return_token_ids in the train env
sampling args so the openai_chat_completions client gets the prompt and
completion token ids back from vLLM and can carry them for training
instead of re-tokenizing the messages downstream. Scoped to
renderer is None so it never reaches the renderer /inference/v1/generate
endpoint (which forwards sampling params to vLLM verbatim).

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers submodule; restore v0 env catalog + v1 -v1 imports

- bump deps/verifiers to the feat/nano-as-v1 tip (token-parse #1585, bridge meta #1586,
  taskset -v1 rename #1587, native retries #1588, runtime resource cleanup #1590)
- restore the full v0 env catalog in optional-dependencies.envs + [tool.uv.sources]
  (init the research-environments submodule); the taskset -v1 rename freed the v0 names,
  so v0 envs (legacy bridge) and v1 tasksets coexist
- point the v1 taskset sources at their -v1 names / _v1 paths (gsm8k-v1, math-env-v1,
  aime24-v1; reverse-text-v1 already correct)
- update v1 configs to the -v1 taskset ids (hendrycks_sanity) and drop the superseded
  standalone configs/debug/reverse_text_v1.toml
- relock

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers submodule to feat/nano-as-v1 tip (textarena #1592)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers submodule to feat/nano-as-v1 tip

Pulls in runtime resources named after the rollout id (#1596) and the
alphabet-sort-v1 taskset (#1595).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers submodule to feat/nano-as-v1 tip

Brings in env-hub ids (#1597), v0 envs on the eval CLI (#1598), modal runtime (#1594).

* chore(v1): add v1 alphabet-sort debug config (port of examples/alphabet_sort)

* fix: forward extra_env_kwargs to v0 legacy envs; drop dead trajectory tests (#2749)

Restores main's escape hatch for v0 (legacy-bridge) envs: a legacy env's extra_env_kwargs
is auto-populated (timeout_seconds <- timeout.rollout, max_total_completion_tokens <-
max_output_tokens, max_seq_len <- seq_len) and forwarded to LegacyEnvServer at spawn, so v0
rollouts again honor the wall-clock timeout, multi-turn completion budget, and seq-len
truncation (all were silently dropped on this branch).

Also removes tests/unit/orchestrator/test_{trajectories,sft_trajectories}.py, which imported
the deleted interleave_rollout and broke test collection.

* fix: install the bundled `tasksets` package (harbor-v1, textarena-v1)

The `envs` extra wired `harnesses` and the individual `*-v1` example tasksets but
never the bundled `tasksets` package, so the integration tasksets it ships
(`harbor-v1`, `textarena-v1`) couldn't be resolved — `import_taskset("harbor-v1")`
raised ModuleNotFoundError ("tried to import 'harbor_v1'").

Add `tasksets` to the `envs` extra + a path source, and bump the verifiers
submodule to the feat/nano-as-v1 tip (#1600), where the bundled tasksets live
under the `tasksets` namespace package (`tasksets.harbor_v1`) and the loader
resolves the namespaced module.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat: consume the v1 message-graph trace (#2763)

* feat: consume the v1 message-graph trace (graph-walk trace_to_samples)

Walk the new message graph (verifiers feat/trace-message-graph, PR #1606): trace_to_samples
builds one TrainingSample per branch by concatenating each branch path's node token_ids /
sampled_mask / logprobs (graph.branch_token_sequences), splitting prompt|completion at the
first sampled token — identical training tensors to the old per-turn stitching, off a trace
that is now linear (not quadratic) in turns. backfill_rollout_tokens is a no-op (training is
renderer-only; `trajectory` is now a read-only view over the graph). Bumps the verifiers
submodule to the graph-trace branch.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: bump verifiers submodule (MessageNode.mask rename)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: wire alphabet-sort-v1 taskset

Add alphabet-sort-v1 to the `envs` extra + `[tool.uv.sources]` so
configs/debug/v1/alphabet_sort.toml resolves (it referenced an example taskset that was
never wired into prime-rl). Used to verify graph-based training-sample construction on real
RL runs — v0 (legacy bridge) and v1 (native renderer path) both train cleanly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor: consume nodes/branches directly (drop Turn/trajectory readers)

`trace_to_samples` already walks the graph; the remaining readers move off the removed
Turn/trajectory API: the gibberish/repetition filters iterate per-node completions,
advantage/dispatcher use `trace.num_turns`/`trace.completion_len`, `get_model_completion_len`
is dropped (use `trace.completion_len`), and the renderer-only train_sink drops the backfill
path (also removing `backfill_rollout_tokens`). Bumps the verifiers submodule.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: bump verifiers submodule (merge #1605 multiplex interception)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: bump verifiers submodule (dead-code cleanup)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers (readme highlight + ruff format)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat: enforce renderer, SFT backfill, branch-first-class logging

Training is renderer-only now. RL/OPD roll out through the renderer client
(exact sampled token ids + logprobs); SFT rolls out against a chat-completions
teacher that returns no tokens and re-renders the conversation to backfill them
(`backfill_trace`). A renderer is required for every mode (`renderer=None`
rejected) — the oai client never produces correct training tokens for the
message graph. Drops the MITO no-renderer training path.

Logging consumes `trace.branches` as the first-class unit (`branch.token_ids` /
`branch.messages`) instead of the removed `trajectory` field; `trace_to_samples`
builds one sample per branch from the same accessors. Sample loggers take the
rollout objects so env_name/advantage are available.

Add configs/v1/training_mode (rl/opd/sft + lora/external) mirroring the v0
debug configs. Fix the v0 SFT debug configs + rlm_swe to validate under the
renderer requirement.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor: flat TrainingSample (token_ids + mask), required renderer

Drop the prompt/completion split from TrainingSample — it doesn't fit a
multi-turn/agentic branch, where context and model-sampled spans interleave. A
sample now carries the branch's flat `token_ids` plus per-token `mask` (True =
trainable), `logprobs`, and `temperatures` (all aligned). `prepare_sample`
passes them straight into the MicroBatch (already flat), and the packer
validates against `token_ids` length.

Make `orchestrator.renderer` a non-optional type (drop the `enforce_renderer`
validator) — training is renderer-only, so the type carries the requirement.

Bump the verifiers submodule to feat/nano-as-v1 (merged #1606 + Branch.branches
inlined).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor: SFT teacher rolls out through the renderer client (drop backfill)

Training is renderer-only across every mode, so the SFT teacher now rolls out
through the renderer client too — its rollouts carry tokens directly, the same
as RL/OPD. Drops the chat-completions backfill (`backfill_trace` + the SFT path
in TrainSink) and the now-unused TrainSink renderer.

This requires a self-hosted teacher that shares the student's tokenizer (the
student trains on exactly the ids the renderer feeds the teacher); distilling
from an external chat API is no longer supported. Remove the `sft_external`
debug configs.

Validated: SFT on reverse-text-v1 trains cleanly (Trainable 128/128, eval reward
~0.1 -> ~0.82 over 20 steps) with the teacher on the renderer client, no backfill.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: drop configs/v1/training_mode README

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor: consolidate rollout types into Rollout(vf.Trace)

The trace *is* the rollout: replace the FinishedRollout/TrainRollout/EvalRollout
wrappers with a prime-rl Rollout(vf.Trace[TaskT]) subclass that carries the
orchestration metadata (kind, env_name, group_id, policy_version,
off_policy_steps, samples, advantage, is_filtered, filter_results, eval_step) as
exclude=True fields — so dumping a Rollout still yields a plain trace (on-disk
results.jsonl unchanged). envs.py validates the wire trace into Rollout; the
dispatcher stamps the metadata; train vs eval is the `kind` discriminator
(replacing the isinstance check). All consumers read rollout.X directly instead
of rollout.trace.X.

Drop the monitor's SampleRollout duck-type Protocol — the loggers take the real
Rollout (TYPE_CHECKING import) and read branch.token_ids / branch.messages. Also
drop the prime monitor's _split_branch_messages and _json helpers: the
conversation is the unit (no prompt/completion split — meaningless multi-turn).

Fix a latent dispatcher bug surfaced along the way: synthetic error traces used
`error=` / `r.error = ` (a read-only computed field) — now `errors=[...]` /
`r.errors.append(...)`.

Rewrite the (long-stale, dict/`raw`-based) advantage + filters unit tests to
build real Rollouts — they now exercise the current trace-based code (previously
all failing on import/construction).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* ci: allow verifiers + datasets in the slim-config dep check

The v1 config types (EnvConfig, Task, ...) extend `verifiers.v1`, which is a
declared, pure-pydantic dependency of prime-rl-configs (it pulls `datasets` for
the taskset/Task types but no GPU/ML deps). Drop `verifiers` and `datasets` from
the slim-install forbidden list — keep the real heavy training deps (torch,
vllm, transformers, ...).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers submodule to feat/nano-as-v1 tip

Picks up the v1 end-to-end eval test suite (#1609) and the v0 legacy
env-server group-scoring fix (#1612).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers submodule to feat/nano-as-v1 tip

Picks up the v0 legacy-bridge fixes: guard against non-renderer training
clients (#1613) and serve the eval split for eval-only v0 envs (#1614).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): fix stale sft.toml teacher comments

The SFT teacher rolls out through the renderer client (token-in/out) and
must share the student's tokenizer; drop the leftover oai-client / token
backfill description removed in the renderer-only refactor.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers (v0 eval chat-completions client)

Picks up verifiers#1615: the legacy bridge builds a chat-completions client
for v0 eval rollouts (renderer for training), instead of raising on the
non-renderer eval client.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(v1): scaleswe configs + taskset registration (#2765)

- register the scaleswe-v1 taskset (pyproject envs list + uv source)
- point the existing rlm-swe config (configs/rlm_swe/qwen35_4b.toml) at the
  scaleswe taskset (task_type="scaleswe", train + eval)
- add configs/debug/v1/scaleswe.toml — a per-env v1 port of that config using
  the scaleswe-v1 taskset via the rlm harness on the prime runtime

Companion to verifiers feat/scaleswe-v1 (scaleswe-v1 taskset + setup/workdir hooks).
Needs the deps/verifiers submodule bumped to that branch once it lands.

* feat(v1): multimodal training through the message graph + color-codeword-v1

Consume the v1 trace's multimodal sidecar. `trace_to_samples` builds, per branch,
`mm_kwargs` (the branch's per-image renderer items concatenated on dim 0 and
EncodedTensor-encoded) and `mm_token_type_ids` (the renderer's
`mm_token_type_id_map` applied to the branch tokens); `TrainSink` threads the
mapping through. The wandb sample logger now renders the task as a Table-safe JSON
string with image data elided — an image-bearing instruction crashed wandb's
Table type inference on the nested content list.

Adds `configs/v1/multimodal_color_codeword.toml` (Qwen3-VL-4B on color-codeword-v1,
2-GPU) and registers the `color-codeword-v1` taskset; bumps the verifiers submodule
for the multimodal message-graph support.

Verified end-to-end: the VLM trains through the mm path (eval 0.69 -> 0.78,
Trainable 256/256 — mm_kwargs reach the Qwen3-VL forward); v0 `color-codeword`
eval 0.625 ~= v1 `color-codeword-v1` eval 0.69 (faithful port).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Revert "feat(v1): multimodal training through the message graph + color-codeword-v1"

This reverts commit 85b27cfc0be12b84f9b36456675b10387d01dc8a.

* feat: multimodal training through the v1 message graph + color-codeword-v1 (#2766)

* feat(v1): multimodal training through the message graph + color-codeword-v1

Consume the v1 trace's multimodal sidecar. `trace_to_samples` builds, per branch,
`mm_kwargs` (the branch's per-image renderer items concatenated on dim 0 and
EncodedTensor-encoded) and `mm_token_type_ids` (the renderer's
`mm_token_type_id_map` applied to the branch tokens); `TrainSink` threads the
mapping through. The wandb sample logger now renders the task as a Table-safe JSON
string with image data elided — an image-bearing instruction crashed wandb's
Table type inference on the nested content list.

Adds `configs/v1/multimodal_color_codeword.toml` (Qwen3-VL-4B on color-codeword-v1,
2-GPU) and registers the `color-codeword-v1` taskset; bumps the verifiers submodule
for the multimodal message-graph support.

Verified end-to-end: the VLM trains through the mm path (eval 0.69 -> 0.78,
Trainable 256/256 — mm_kwargs reach the Qwen3-VL forward); v0 `color-codeword`
eval 0.625 ~= v1 `color-codeword-v1` eval 0.69 (faithful port).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin — multimodal review-pass cleanups

Picks up the verifiers feat/v1-multimodal head: the multimodal review-pass
(capability-flag docstrings, trimmed mm comments, color-codeword-v1 config
validator + module constants) and the merged malloc_trim worker-RSS fix (#1621).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin (content-part mm attribution) + config/test sync

- Bump deps/verifiers to the content-part multimodal attribution (drops the unused
  placeholder offset machinery).
- Drop max_turns/seed from the color-codeword-v1 taskset args in the config — the
  taskset hard-codes them as module constants now, and passing them is rejected.
- Update the mm egress unit test to assert mm_items order (the new attribution),
  not placeholder offsets.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(trainer): slice mm_kwargs on truncation so tokens match embeddings

When a sample exceeds seq_len, prepare_sample truncated input_ids and
mm_token_type_ids but passed mm_kwargs through whole — leaving more image
embeddings than surviving image placeholders. Now truncation cuts to a
whole-image boundary (never splitting an image's placeholder block) and slices
mm_kwargs (pixel_values + image_grid_thw) to the images that fully survive, so
image-placeholder count == image-embedding count.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin to ruff-formatted graph.py

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): remove test_trajectories_mm.py

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat: thread num_workers to the env-server worker pool (#2768)

* feat(v1): thread num_workers to the env-server worker pool

Wire the verifiers env-server worker pool into prime-rl: the orchestrator's
spawned env server (envs.py) and the `env-server` CLI now serve via
verifiers' serve_env with num_workers, so requests fan out across N worker
processes instead of one event loop. num_workers was already a config field but
dropped on the floor; it's now passed through and defaults to 4.

Companion to verifiers feat/v1-env-workers; needs deps/verifiers bumped to it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(v1): default num_workers to 4

Make the worker pool the default: num_workers defaults to 4 (was "auto"->1)
across the per-env, train, and eval configs, so training/eval env servers fan
rollouts across 4 worker processes out of the box. "auto" stays a valid value
(scales per concurrency); set num_workers=1 for the old single-process server.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(v1): keep num_workers="auto" default on the orchestrator

Revert the orchestrator's per-env / train / eval num_workers defaults back to
"auto" (was 4) so they keep scaling 1 worker per 256 concurrent rollouts out of
the box. The standalone env server can't scale (no concurrency context — it's
driven by external clients), so its resolver collapses "auto" to a fixed 4.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers to be76cbc3 (env-server worker pool)

Align the pin with #1623 (env-server worker pool: router + N workers),
which the just-merged #2768 (thread num_workers to the pool) requires;
the pin had lagged at the pre-#1623 multimodal tip.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(v1): register r2e-gym-v1 taskset

Add r2e-gym-v1 to the base v1 taskset deps + uv sources (editable from
deps/verifiers/examples/tasksets/r2e_gym_v1) so the id resolves through
the v1 loader, matching the other -v1 tasksets.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(swe): use r2e-gym for rlm_swe configs (v0 + v1)

- v0 configs/rlm_swe/qwen35_4b.toml: restore the train env to r2e and the
  eval env to swebench-verified-quick (as on main), reverting the scaleswe switch
- v1: rename configs/debug/v1/scaleswe.toml -> r2e_gym.toml, point the train env
  at the r2e-gym-v1 taskset, and drop the eval block

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(swe): point rlm_swe configs at r2e-gym (content)

Apply the edits the prior rename commit missed:
- v0 rlm_swe/qwen35_4b.toml: train -> r2e, eval -> swebench-verified-quick (as on main)
- v1 debug/v1/r2e_gym.toml: taskset -> r2e-gym-v1, eval block removed

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(v1): restore env-server worker logs to the env log file (#2770)

Env servers spawn their worker pool as fresh `spawn` processes with no logging
handlers (verifiers#1626), so per-rollout logs (rollout start/done, context-exceed
warnings) were silently dropped. Pass `setup_env_server_logging` to verifiers'
`serve_env` as `log_setup`; it runs in the broker and in every worker. A worker
inherits the broker's redirected stdout/stderr, so its logs land in the same
`envs/{train,eval}/<name>.log` as before — no new files or paths.

Bumps deps/verifiers to the worker-logging fix.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers to 955b6cdf (dashboard token usage fallback)

Realign the pin onto origin/feat/nano-as-v1 and pick up #1627: the --rich
dashboard's token counts fall back to provider usage when the endpoint returns
no token ids (no more 0/0). The prior pin 3df34ba5 was a pre-rebase #1626
variant; 955b6cdf already contains the equivalent #1626 (env-server worker
logging) plus #1627.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers to 8e4ad735 (clean env-server teardown)

Picks up the serve_env SIGTERM-teardown fix: pool/in-process env servers no
longer print a spurious KeyboardInterrupt traceback into the env logs on
shutdown.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(deps): bump verifiers (renderers floor 0.1.8.dev40)

Picks up the verifiers floor bump so the renderers offset-tokenizer fix (dev40,
PRs #72/#75) can't be undercut by a pre-fix PyPI resolution. Re-locks uv.lock to
the dev40 specifier.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers to db82b38a (reap subprocess tree on cancel)

Picks up #1628 (reap the whole subprocess tree when a runtime run is cancelled).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat: elastic env-server pool (inherit static/elastic pool config) (#2774)

* feat(v1): elastic env-server pool (inherit pool config from verifiers)

Companion to verifiers#1629. prime-rl's EnvConfig now extends vf.EnvServerConfig, so
each env inherits the `pool` discriminated union (static{num_workers=4} |
elastic{max_workers=None, multiplex=128}, default elastic) and the orchestrator's env
servers scale workers on demand instead of pre-spawning a fixed `auto` count.

- Drop the per-env / train-group / eval-group `num_workers` fields + the auto-resolution
  (ceil(max_inflight/256)); the elastic pool self-sizes from load.
- envs.py / env_server.py pass `vf.pool_serve_kwargs(env.pool)` to serve_env.
- Bump deps/verifiers to the elastic-pool branch.

Breaking: `num_workers` is replaced by `pool`. Configs set `pool = { type = "elastic",
multiplex = N }` or `{ type = "static", num_workers = N }`; the rlm_swe + r2e debug
configs are migrated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(v1): back-compat shim mapping legacy num_workers -> pool

EnvConfig forbids extra fields, so configs still setting the removed `num_workers`
would hard-fail. Add a `model_validator(mode="before")` that maps it onto `pool`:
an int -> a fixed `static` pool, `"auto"` -> the default `elastic` pool; an explicit
`pool` always wins. Keeps existing (incl. out-of-tree) configs parsing without edits.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): drop num_workers from rlm_swe + r2e configs (use default elastic pool)

The default `pool` is already elastic (multiplex 128), so an explicit `pool` here was
redundant — just remove the legacy `num_workers` and inherit the default.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers to f404e97f (elastic env-server pool)

Realign the pin onto origin/feat/nano-as-v1: the prior pin d0c5bc98 was the
unsquashed #1629 feature branch, now squash-merged as f404e97f
(content-identical). Picks up #1629 (static/elastic env-server pool config).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers to 88e9bedd

Picks up #1631 (per-rollout setup timing as a distinct phase) and #1632
(per-call model + runtime retries).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers to 40a2e89f (fix trace.timing.*.duration to_wire validation)

Fixes RunRolloutResponse ValidationError 'trace.timing.setup.duration: Extra
inputs are not permitted' that crashed every rollout (#1636 drops computed
durations from to_wire).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers to 5dc084f5

Picks up #1638 (add --resume for evals: re-run a previous run's
missing/errored rollouts).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers to 472622ba

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: stop importing env modules in the orchestrator (always Rollout[WireTask]) (#2781)

* chore(v1): stop importing env modules in the orchestrator

The orchestrator built its per-env trace_type as Rollout[vf.task_type(env_id)] for v1 envs, and
vf.task_type imports the env package just to read its Task subclass for typing the wire trace.
Nothing reads typed env task fields - only task.idx and a full task.model_dump - and WireTask
(extra="allow") preserves those fields (incl. on disk). Always use Rollout[vf.WireTask], so the
orchestrator never imports an env package: the env's type and runtime both live only in the
server process.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): hoist the constant Rollout[WireTask] to a module-level ROLLOUT_TYPE

It no longer varies per env, so it doesn't belong as a per-instance attribute set in
Env.__init__ - lift it to a module constant used directly in run_rollout/run_group.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers to 7270e69b

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers to 66c87d5b

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers to ef45f720

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin (alphabet-sort host user sim, #1645)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin (modal creates_per_sec 5 -> 40, #1646)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix: cap v1 hendrycks-sanity scoring at 10s (#2790)

* fix(v1): cap hendrycks-sanity scoring at 10s

Without a scoring timeout (the default is no limit), a wedged math verify holds its
rollout's permit forever — sympy can spin past the in-script alarm — and at 512
concurrency that starves the pool and stalls long runs. Set timeout.scoring = 10 on the
train and eval envs so the framework cancels and the subprocess runtime kills a runaway
verify, freeing the permit.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: drop inline comment on the scoring timeout

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers (eval/train client rename) + adopt config imports (#2792)

Bump deps/verifiers to feat/nano-as-v1 HEAD (8873a740), which includes verifiers#1654 — the v1
interception rework: role-named clients (EvalClient/TrainClient), route-detected wire dialects
(chat/responses/anthropic), 1:1 relay + streaming, reasoning preserved.

Adopt the renamed client config classes in prime_rl/utils/client.py:
OpenAIClientConfig -> EvalClientConfig, RendererClientConfig -> TrainClientConfig.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin (subprocess cached-interpreter uv-scripts, #1660)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin (codex built-in harness, #1661)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: track terminal-bench-2-v1 as a taskset dependency

It was only a manual editable install, so `uv sync` pruned it. Add it to the env dependency
group + [tool.uv.sources] (mirroring r2e-gym-v1) so it persists across syncs and is available
out of the box.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(v1): keep multimodal tensors out of rollout dumps (#2794)

verifiers#1653 (carry mm tensors across the env-server wire) is merged and pinned, so
`MessageNode.multi_modal_data` is no longer `exclude=True` — `model_dump(mode="json")` now
serializes the base64 pixel tensors into `train_rollouts.jsonl` and the wandb sample tables,
bloating every line. They're the training `mm_kwargs` carrier, not part of the rollout
record, so exclude them at the dump boundary (train + eval paths).

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): install all v1 example tasksets in prime-rl

Declare the remaining 7 verifiers v1 example tasksets (code-golf, deepwiki,
glossary, swelego, wiki-search, wikispeedia, wordle) as editable deps so uv sync
installs every example, matching the verifiers examples set. chromadb/textarena
were already present via the v0 wiki-search/wordle envs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): install the compact example harness in prime-rl

The example harness (examples/harnesses/compact) was missing from prime-rl deps,
so the documented --harness.id compact branching example failed to resolve
(ModuleNotFoundError: harness compact not found). Declare it like the example
tasksets so uv sync installs it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin (v1 docs #1662 + Trace.info #1664)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(v1): encode router-replay routed_experts into transport (#2808)

* feat(v1): encode router-replay routed_experts into transport

Pack Branch.routed_experts ([tokens, layers, top_k]) into the transport
RoutedExperts the trainer replays, realigning the token axis to len(token_ids)
as a backstop. Bumps the verifiers pin to the companion router-replay commit.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin (raw-bytes wire) + exclude routed_experts from disk dumps

Bumps deps/verifiers to the raw-bytes router-replay codec (RoutedExperts rename +
msgpack bin wire). routed_experts now rides the env-server wire as raw bytes, so it
can't round-trip the json disk dump — add it to ROLLOUT_DUMP_EXCLUDE alongside
multi_modal_data (both are training inputs, not part of the rollout record).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(v1): guard router-replay vs prefix caching + bump verifiers/renderers pins

- Add disable_prefix_caching_for_router_replay validator: prefix-cache hits skip
  recomputing the cached prefix, so the engine returns no routed-expert decisions for
  those tokens. Router replay needs routing for every token, so force
  enable_prefix_caching=False (mirrors the existing kv_cache_offload guard).
- Bump deps/verifiers: tail-pad routed_experts so the final node aligns (the engine
  omits the last position's routing).
- Bump deps/renderers: _get_offset_tokenizer immune to the global fastokens patch race.

Together these make v1 MoE router replay work end-to-end (Qwen3-30B-A3B): verified
mismatch_kl drops vs no-replay (0.0005/0.0002/0.0002 vs 0.0015/0.0015/0.0005 @ steps 0/1/2).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: bump deps/renderers pin (ruff format fix)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: bump deps/verifiers pin (ruff format)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: bump deps/verifiers pin to merged feat/nano-as-v1 (router-replay #1672)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Remove disable_prefix_caching_for_router_replay validator

Drops the guard that force-disabled inference.enable_prefix_caching under router replay.
Validating whether prefix caching is actually compatible with router replay (cache hits
may carry no routed-expert decisions); re-add if the A/B shows it drops routing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(orchestrator): keep top-level advantage wiring after merge

The merge auto-resolved train_sink.py and the orchestrator's TrainSink
construction to main's per-env advantage design (#2721), but envs.py and the
configs were kept on the branch's top-level design — so TrainSink read
`train_envs.get(env_name).advantage_fn`, which TrainEnv no longer defines
(AttributeError at rollout time).

Restore the branch's top-level advantage: TrainSink takes `advantage_config`
and builds its own `self.advantage_fn` once. Verified end-to-end with a
reverse-text-v1 RL smoke (reward climbs 0.16 -> 0.40 over 6 steps).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin to merged main (1b7736a8)

deps/verifiers feat/nano-as-v1 now includes origin/main merged in
(composable tasksets + sandbox/save utils). Pin moves 7a98b566 -> 1b7736a8.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: bump pydantic-config submodule to main (single-dash short flags)

deps/pydantic-config 896ade4 -> 99f47c6 (origin/main). Picks up #16
(single-dash short flags for single-character aliases, e.g. `eval -n -m`)
and upstreams the dict[str,str] preservation fix (#14). No uv.lock change
(editable path source).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin to feat/nano-as-v1 tip (5fc0b295)

Picks up the py3.11 TypedDict CI fix and #1676 (prime-sandbox programs run for
the sandbox lifetime instead of the 15-min background-job default, + retry-log
wording). Pin moves 1b7736a8 -> 5fc0b295.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin to 3af08c9b

Includes verifiers#1677 - scaleswe-v1 resolves task images via Prime's
Artifact Registry instead of the incomplete public Docker Hub mirror.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(orchestrator): trim glibc heap back to the OS each step (#2821)

Factor the existing end-of-run malloc_trim into a `trim_process_memory()`
helper and also call it at the end of `finalize_train_batch`. Each step frees a
step's worth of rollouts / traces / transport buffers, but glibc keeps those
pages in per-arena free lists, so orchestrator RSS climbs over a long run
without ever shrinking. Trimming per step returns them to the OS.

Mirrors the per-step trim in prime-rl #2807 — the trim only; that PR's
`.raw`-based retention helpers don't apply to this branch's typed Rollout/Trace.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin to 7862985b

Includes verifiers#1678 - scaleswe-v1 Prime Artifact Registry is now opt-in
(`use_prime_registry`, default off), so the default Docker Hub image path works
on local docker runtimes again.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat: route consistent_hash on X-Session-ID for cross-turn prefix reuse (#2822)

The vllm-router `consistent_hash` policy keys on request-id headers (default
x-request-id / x-correlation-id / x-trace-id / request-id). The v1 inference
clients send none of those per rollout, so a multi-turn rollout's turns hashed
to random DP shards and re-prefilled the growing prompt cold each turn (~40%
prefix cache hit rate on an agentic SWE run, where it should approach the
eviction-limited ceiling).

Launch the router with `--request-id-headers x-session-id` so it keys on the
per-rollout `X-Session-ID` header the v1 clients now emit (companion verifiers
change). Every turn of a rollout pins to one engine, keeping its cross-turn
prefix warm. Harmless for the random / round_robin policies, which ignore
request-id headers.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin to 211faecb (session-affinity routing)

Picks up verifiers #1680 (session-affinity routing header for cross-turn
prefix reuse) — the counterpart to prime-rl #2822. Pin 7862985b -> 211faecb.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin to 3f45f73b (scaleswe-v1 image filter)

Picks up verifiers #1679 (filter unavailable scaleswe-v1 images at load).
Pin 211faecb -> 3f45f73b.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin to 44da378c (r2e-gym-v1 registry opt-in)

Picks up verifiers #1681 (r2e-gym-v1 Prime Artifact Registry opt-in, default
off). Pin 3f45f73b -> 44da378c.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin to a723977c (scaleswe-v1 image_url filter)

Picks up verifiers #1683 (filter on Docker Hub image_url, not the resolved
image). Pin 44da378c -> a723977c.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin to 0c8d0aa1 (rootless harness install)

Picks up verifiers #1685 (harnesses install/run without root, pinned
/tmp/vf-{harness}) and #1684 (remove Claude Code harness). Pin a723977c -> 0c8d0aa1.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin to d4b054e3 (skip region-limited e2e test)

Picks up verifiers #1686 (skip test_multi_turn on prime — colocated user-sim
port exposure is region-limited). Pin 0c8d0aa1 -> d4b054e3.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: point verifiers env paths at the flattened environments/ dir (#2824)

* chore: point verifiers env paths at the flattened environments/ dir

Companion to verifiers #1695 (flatten examples/ into a single environments/).
Update the deps/verifiers editable source paths in pyproject.toml + uv.lock:
examples/tasksets/<x> -> environments/<x> and
examples/harnesses/compact -> environments/compact. Bump the verifiers pin to
the flatten branch (7ddc78b2) so the relocated paths resolve.

Re-pin to the merged commit once verifiers #1695 lands.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(deps): bump verifiers to 22b02e4b (flatten examples/ into environments/, #1695 merged)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): advance verifiers pin to feat/nano-as-v1 tip (Trace.state + DNS fix)

#2824 retargeted the env paths but pinned deps/verifiers at 22b02e4b (#1695,
just after the examples/->environments/ flatten), which predates the later
merges. Advance the submodule to the actual feat/nano-as-v1 tip bf30ae5f
(verifiers 0.1.15.dev298): adds Trace.state (#1711), the unconditional MCP
DNS-rebinding relax (#1715, fixes the in-prime tool 421 CI failures), and the
init scaffold (#1713).

bf30ae5f also dropped verifiers' self-referential `packages` extra, so drop
`[packages]` from the verifiers override-dependency (and refresh the stale
sources comment).

Smoke: `eval reverse-text-v1 -n 1` (subprocess, temp=0) runs clean — no errors,
not truncated, reward ~1.0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin to feat/nano-as-v1 tip (#1717 + #1719)

Advance deps/verifiers bf30ae5f -> f7fa7482:
- #1717 train-client prefix bridging + token-based message-graph branching
- #1719 default the harness runtime to subprocess

No prime-rl-side changes needed: every prime-rl v1 config already sets
harness.runtime.type explicitly (#1719's default flip is a no-op here), and the
consumed verifiers surface (serve EnvClient/serve_env/pool_serve_kwargs,
clients.config Eval/TrainClientConfig, task.TaskT, the Trace branch/token API) is
untouched by #1717. Imports resolve; reverse-text-v1 eval smoke clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin to feat/nano-as-v1 tip (f7fa7482 -> bbfd5646)

New since the last pin: #1718/#1721 (CI + tests), #1723 (per-harness tool
disabling), #1666 (client consolidation + chat-completion header forwarding),
#1722 (warn on non-default subprocess harnesses). No prime-rl-side changes
needed: clients.config (the consumed surface) is untouched by #1666's client
refactor, #1722 only warns and exempts the default harness (what prime-rl's
subprocess configs use), and the rest is additive/CI-only. Imports resolve;
reverse-text-v1 eval smoke clean (reward 1.0).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: verifiers #1732 companion (model_dump traces, Task.prompt rename) (#2831)

* chore(v1): add prime CLI as deps/prime submodule (feat/nano-as-v1)

Tracks the companion PrimeIntellect-ai/prime#751 branch that adds verifiers v1
eval support to the prime CLI (run/view consume the v1 entrypoint + Trace format).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin to feat/nano-as-v1 tip (bbfd5646 -> 220f21d4)

New: #1727 (per-rollout isolation for shared writable tool servers) and #1702
(trim verifiers runtime deps — modal/notebook/quest/pdf moved to extras). No
prime-rl-side changes needed: the only dropped transitive dep is pymupdf, used
solely by verifiers' experimental quest PDF tool via a lazy import behind the
quest extra (prime-rl never touches it). Imports resolve on dev307;
reverse-text-v1 eval smoke clean (reward 1.0).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: validate env-server traces via model_dump (companion to verifiers to_wire removal)

verifiers drops Trace.to_wire/from_wire and the derived computed fields (reward,
is_truncated, error, duration are plain properties now). Swap wire.to_wire() ->
wire.model_dump() when re-typing a returned Trace into ROLLOUT_TYPE; the .reward /
.is_truncated the metrics/eval code reads are the Trace properties, so they still work.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: rename vf.Task(instruction=) -> prompt= (verifiers #1732 companion)

verifiers #1732 renames Task.instruction -> Task.prompt; update the dispatcher's
error-rollout Task construction to match. Pin bump to the merged commit comes when #1732
lands.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin to chore/v1-general-cleanup tip (220f21d4 -> d78d7474)

Pin #1732 (general v1 cleanup) so this companion's model_dump trace handling and the
Task.prompt rename round-trip against a verifiers that actually has them. Re-pin to the
feat/nano-as-v1 tip once #1732 merges.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin to feat/nano-as-v1 tip (d78d7474 -> caaf0ff3)

#1732 (general v1 cleanup) merged into feat/nano-as-v1; re-pin off the chore branch onto the
integration tip. This companion's model_dump trace handling + Task.prompt rename now run
against merged verifiers.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: error-rollout placeholder task uses prompt=None

An error rollout has no prompt; None is the honest value (Task.prompt is str | Messages |
None) rather than an empty string.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(v1): drop removed enable_bash from harness configs (verifiers #1723) (#2833)

verifiers #1723 (in the current pin) removed the default harness's enable_bash
field — the default harness now exposes only the taskset's MCP tools (use an
agentic harness like mini-swe-agent for a shell). All v1 configs still set
`enable_bash = false`, which now fails config validation (Extra inputs are not
permitted). Drop it (no-bash is the default, so behavior is unchanged); no src/
code referenced it.

Verified: `uv run rl @ configs/debug/v1/reverse_text.toml` (Qwen3-0.6B, 2 steps)
runs end-to-end — orchestrator rollouts Error 0.0% (reward 0.117 -> 0.177),
trainer steps + checkpoint, 'Training finished!'.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin to feat/nano-as-v1 tip (caaf0ff3 -> cc4afd52)

New: #1733 (robust env-server teardown, no leaked tunnels/sandboxes), #1734
(general-agent solver v1 taskset, additive/opt-in), #1735 (reject unsupported
task system_prompt). No prime-rl-side changes needed: consumed serve/clients
surface unchanged, default harness supports system_prompt, new taskset not
registered. Imports resolve; reverse-text-v1 eval clean (reward ~1.0, no errors).

Note: #1733's worker teardown throws KeyboardInterrupt on SIGTERM but run_server
doesn't swallow it, so a benign KeyboardInterrupt traceback prints at env-server
shutdown (cosmetic; verifiers follow-up).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(v1): add debug general-agent-v1 RL config + register the taskset

Add configs/debug/v1/general_agent.toml — the v1 general-agent-v1 taskset
(GeneralAgentSolverTaskset) on the default harness, with the agent and its tool
server colocated in a modal sandbox. Adapted from configs/general_agent/
rl_qwen3_4b.toml (Qwen3-4B, batch 256). Register general-agent-v1 in
[tool.uv.sources] + the envs extra so the id resolves.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(v1): add scaleswe-v1 RL config (Qwen3.6-35B-A3B, 65k ctx)

configs/debug/v1/scaleswe.toml — the v1 scaleswe-v1 SWE taskset on the rlm
harness + modal runtime (each row injects its own Docker image into the sandbox;
no MCP toolset). Qwen3.6-35B-A3B, batch 256, 65k context, qwen3.6 renderer with
thinking. Deployment/parallelism (cp=2, infer dp=2 tp=4, 1 train + 1 infer node)
seeded from the 30B-A3B reference — tune on the cluster for the 35B / 65k
footprint. Multi-node slurm; scaleswe-v1 was already registered.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin (cc4afd52 -> 3c5f6586) + register swebench-verified-v1

New: #1738 (swebench-verified harbor taskset, prime prebuilt images), #1739
(don't retry program exec - fixes forked duplicate trace branches), #1736/#1737
(quest pdf sanitization, dashboard rotation). Register the new swebench-verified-v1
env (source + envs extra); no other prime-rl changes needed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(v1): add SWE-Bench-Verified online eval to the scaleswe run (prime runtime)

Mirror the v0 rlm_swe SWE-bench eval on the v1 scaleswe config: [orchestrator.eval]
interval=20, an eval env on the swebench-verified-v1 taskset via the rlm harness on
the prime runtime (use_prime_registry=true -> prime's prebuilt instance images),
rollout timeout 3600s. Train stays on modal; eval runs on prime.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(v1): use public images for the scaleswe SWE-Bench-Verified eval

A debug eval showed use_prime_registry=true fails with IMAGE_PULL_FAILED on the prime
runtime: the SWE-bench Verified sweb.eval.* instance images aren't mirrored into prime's
prod-sandbox Artifact Registry. The same prime sandbox pulls r2e-gym-v1's prime-registry
image and the public swebench/sweb.eval.* image fine, so it's a missing-mirror issue, not
credentials. Drop use_prime_registry (default false -> public Docker Hub images) so the
online eval works on the prime runtime now; flip it back on once the images are mirrored.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin + re-enable use_prime_registry for the scaleswe SWE eval

Bump deps/verifiers 3c5f6586 -> 952b2a7d, which lands the swebench-verified-v1 prime-image
path fix (PrimeIntellect-ai/verifiers#1740): the mirror keeps the swebench/ org, so
use_prime_registry=true now resolves to prod-sandbox/swebench/sweb.eval.* and pulls. Flip the
scaleswe SWE-Bench-Verified eval back to use_prime_registry=true (verified to pull on a prime
sandbox), for the fast cached mirror instead of public Docker Hub.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): cap hendrycks-sanity at 256 in-flight rollouts + 30s scoring timeout

Set orchestrator max_inflight_rollouts=256 (below the 512 batch) and bump the per-env
scoring timeout 10s -> 30s on both the train and eval envs. Guards against the subprocess
env-server stall where unbounded concurrency + a hanging math-verify hold permits until the
run wedges.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin (general-agent-v1 colocated toolset fix)

Bump deps/verifiers 952b2a7d -> 56a720ca: PrimeIntellect-ai/verifiers#1741 makes the
general-agent-v1 toolset work when colocated in a sandbox (ships the task's tools.py + db.json
over /task). Env-package only - no framework/config surface, no prime-rl changes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump hendrycks-sanity scoring timeout to 5min

Raise the per-env scoring timeout 30s -> 300s on both the train and eval envs - 30s was too
tight for the math-verify scoring under load.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(orch): show avg branches next to turns in step + eval log lines

Add 'Branches {mean:.1f}' alongside 'Turns' in the per-step train head, the per-env
breakdown, and the eval line - the average trace branch count per rollout (1 = linear, >1 =
compaction/subagents).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): update tmux + monitor-run skill for flattened env log paths

Env logs are now one file per env (envs/{train,eval}/{env_name}.log)
instead of nested env_server/env_worker_* files.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin (retry backoff + relay retries)

Bump deps/verifiers 56a720ca -> 6647fe0a: PrimeIntellect-ai/verifiers#1744 adds exponential
backoff + jitter to the per-call client/runtime retries (so concurrent rollouts don't
re-thunder a shared endpoint) and lets harness clients retry the relay. Internal/additive -
no config schema or API change, no prime-rl edits.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Fix routed SLURM inference DP rank client config (#2830)

Co-authored-by: Codex <codex@primeintellect.ai>
(cherry picked from commit 8dfe8734e3)

* chore(v1): scaleswe Qwen3.6 fixes — ulysses CP + qwen3_coder tool parser

Qwen3.6-35B-A3B is a hybrid/linear-attention MoE: ring CP is unsupported
(use ulysses), and the model id isn't matched by the auto tool-parser
resolver so set tool_call_parser=qwen3_coder explicitly (enables vLLM auto
tool choice for the SWE agent). Complements the cherry-picked #2830 DP-rank
client fix.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin (usage tracking + Terminus 2 harness)

Bump deps/verifiers 6647fe0a -> a630d3b0:
- PrimeIntellect-ai/verifiers#1704: track cached/reasoning/cost usage in v1 (new Usage type +
  Trace/Branch .usage properties; internal node prompt_tokens -> input_tokens rename).
- PrimeIntellect-ai/verifiers#1747: add the Harbor Terminus 2 harness (additive).

Additive for prime-rl - it consumes only stable Trace properties (completion_len, total_tokens,
num_turns, num_branches) + its own batch metrics, not the raw Usage. Verified: reverse-text RL
smoke (2 steps) trains clean (Error 0.0%, Trainable 128/128, Training finished).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): scaleswe — drop eval, prime train runtime, dist_timeout 3600, lm-head chunking

The multi-node trainer kept dying on an NCCL _ALLGATHER_BASE watchdog timeout while
it waited through the slow step-0 swebench eval (eval hogged all rollout slots →
trainer starved on the collective → timeout → SIGABRT). Fixes:
- drop the swebench eval (train-only) — this is what actually cleared the hang
- dist_timeout_seconds 600 -> 3600
- train harness runtime modal -> prime (matches eval; unique label per run)
- fused_lm_head_token_chunk_size = 1024 (activation-memory saver at 65k seq)
cp stays 2 (max for Qwen3.6's 2 KV heads under ulysses; cp=4 fails the divisibility assert).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin (reuse pool tunnel for colocated state channel)

Bump deps/verifiers a630d3b0 -> 7bb546c2: PrimeIntellect-ai/verifiers#1752 makes colocated
tool/user servers reuse the harness's existing pool tunnel for the state channel instead of
opening a second per-rollout host tunnel (which swamps the tunnel service at high concurrency).
Backward-compatible (new state_base param defaults to None; own-runtime servers still bridge
themselves) - internal rollout/MCP path, no prime-rl edits.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin (eval progress-bar reward/metric means)

Bump deps/verifiers 7bb546c2 -> b8fad841: PrimeIntellect-ai/verifiers#1753 shows per-reward/
metric running means under the eval progress bar. Eval CLI dashboard + format helper only -
no training/wire surface, no prime-rl edits.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin (rollout error taxonomy + interception debug logs)

Bump deps/verifiers b8fad841 -> cd205eee:
- PrimeIntellect-ai/verifiers#1751: type v1 rollout errors by boundary (RolloutError +
  Provider/Harness/Toolset/User/Sandbox/Taskset/Interception types, classified via boundary()).
  The trace Error record (type/message/traceback) and stop_condition values are unchanged, so
  prime-rl's consumed surface (vf.Error, errors/stop_condition, 'Cancelled'/'prompt_too_long')
  is intact.
- PrimeIntellect-ai/verifiers#1754: INFO interception up/down + debug-log intercepted routes.

Verified: reverse-text RL smoke (2 steps) trains clean (Error 0.0%, Training finished).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* refactor(orch): record caught rollout exceptions via Trace.capture_error

Use the canonical v1 Trace.capture_error(exc) for the dispatcher's caught-exception path
instead of hand-building a vf.Error record + stop_condition - same result (type=exc class
name, message, traceback, stop_condition='error') but routed through the framework's recorder,
so it picks up the #1751 RolloutError boundary types when one escapes. The synthetic Cancelled/
EmptyTrajectory markers stay explicit vf.Error records (not exceptions; the sink/metrics branch
on those exact type strings).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin (SDK-owned retries; merged worker-SIGTERM fix)

Bump deps/verifiers fedfa570 -> 2474b054, moving off the pre-merge fix/worker-sigterm-teardown
branch commit onto the feat/nano-as-v1 tip:
- PrimeIntellect-ai/verifiers#1755 (merged): swallow SIGTERM KeyboardInterrupt in spawned
  env-server workers.
- PrimeIntellect-ai/verifiers#1756: SDKs own retries; drop framework per-call model/runtime
  retries (removes RetryingClient/RetryingRuntime/CallRetryConfig). RetryConfig + the rollout
  retry (RolloutRetryConfig) are kept.

prime-rl imports none of the removed retry names and never references RetryConfig/.model/.runtime,
so no edits. Verified: config validates + reverse-text RL smoke (2 steps) trains clean
(Error 0.0%, Training finished).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin (interception env isolation + in-sandbox channel retries)

Bump deps/verifiers 2474b054 -> e002e80d:
- PrimeIntellect-ai/verifiers#1758: keep the interception endpoint out of agent-inheritable env.
- PrimeIntellect-ai/verifiers#1759: retry in-sandbox /state + /task channel fetches; name us in
  the prime expose error.

Internal to harnesses/runtimes/mcp - no prime-rl serve/client/trace surface, no edits. Verified:
reverse-text RL smoke (2 steps, default harness + subprocess runtime) trains clean (Error 0.0%,
Training finished).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin (ModalRuntime read path fix)

Bump deps/verifiers e002e80d -> 8c9f284b: PrimeIntellect-ai/verifiers#1761 makes
ModalRuntime.read resolve relative paths and stops retrying the tail tool logs. Modal-runtime
internal only - no prime-rl surface, no edits.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump renderers pin to clean tag renderers-v0.1.8.dev49

057f0087 (renderers-v0.1.8.dev40-2) fails a fresh hatch-vcs editable build
("0.1.8.dev40 can't be bumped"), so only grandfathered venvs built. dev49 is an
exact tag → builds cleanly, unblocking fresh venvs (e.g. running from /shared).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): set partition=all + scaleswe prime-sandbox pre_run_command

The SlurmConfig default partition "cluster" doesn't exist on this cluster (only
"all"), so generated sbatches failed to schedule. Set partition=all in the
scaleswe + hendrycks-sanity sources. Add scaleswe's prime-sandbox cleanup as a
pre_run_command (runs on the head node before launch) instead of editing the
sbatch template.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(v1): scaleswe deployment 2+2 nodes

Source had num_train_nodes=1/num_infer_nodes=1 (the unconfirmed 30B-A3B starting
point); the run that reached step 36 used 2+2. A single train node OOMs the
35B-A3B trainer. Restore 2 train + 2 infer nodes (32 GPUs).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): hendrycks-sanity on modal runtime, 200 steps

Switch the hendrycks-sanity train + eval envs from subprocess to modal (offloads
scoring to modal sandboxes), cap max_steps at 200 (was 5000), rename job to
hendrycks-modal.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin to 94b7df1 (swebench /testbed workdir, malformed-json tool-args, container-test fix)

Brings in feat/nano-as-v1 #1762 (mark swebench_verified_v1 container-only),
#1763 (feed malformed tool-call JSON back to the model instead of crashing the
rollout), #1765 (pin swebench_verified_v1 task workdir to /testbed).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): scaleswe on mini-swe-agent + SWE-Bench-Verified eval (100 tasks)

Switch the scaleswe train harness rlm -> mini-swe-agent (prime sandbox), and re-add a
SWE-Bench-Verified online eval: mini-swe-agent on the prime runtime, use_prime_registry=true,
first 100 tasks (num_examples=100, group_size=1), interval 20, rollout timeout 3600s.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(rl): mkdir parent for namespaced env-server config path

A namespaced env id (e.g. "primeintellect/wiki-search") makes the env-server
config filename a nested path; setup_env_servers opened it for writing without
creating the parent dir → FileNotFoundError at launch (slash-free ids were fine).
mkdir(parents=True, exist_ok=True) before the write.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin (sandbox lifetimes, reasoning state, tau2, harbor CLI)

Bump deps/verifiers 94b7df16 -> 6ac5a3b5:
- PrimeIntellect-ai/verifiers#1749: separate v1 sandbox lifetimes from rollout timeouts (caps
  harness timeouts at the 24h sandbox max). TimeoutConfig fields (setup/rollout/finalize/scoring)
  unchanged.
- PrimeIntellect-ai/verifiers#1748: preserve provider reasoning state across turns (dialects).
- PrimeIntellect-ai/verifiers#1692: migrate the Tau2 benchmark to v1 (new env, additive).
- PrimeIntellect-ai/verifiers#1745: install the pinned Harbor CLI on demand.

prime-rl consumed surface intact (TimeoutConfig, dialects via clients); no edits. Verified:
reverse-text RL smoke (2 steps) trains clean (Error 0.0%, Training finished).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): lock the tau2-bench-v1 editable env from the verifiers bump

uv sync picked up the new tau2_bench_v1 workspace member (verifiers#1692, in the last pin bump)
as an editable lock entry. Lockfile-only follow-up.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers (final touches #1770, v1 e2e CI green #1771)

#1771 greens the v1 e2e suite and runs it in CI (host+docker only; prime+modal local-only): per-axis matrix marks, assert reward not is_truncated, terminus refuses the host runtime, eval in-process by default. #1770 is the guide/config final touches (0.2.0).

* chore(v1): bump verifiers (ruff-format test_envs)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers (drop feat/nano-as-v1 CI trigger)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers (test triggers → main only)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers (code-golf-v1/aime24-v1 verifiers dep)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): add gsm8k v1 config (train + test eval) under configs/debug/v1; drop old configs/v1

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers to latest feat/nano-as-v1 (276ed743)

30 commits — v1 performance optimizations (zero-copy ZMQ relay, off-event-loop trace persistence, lazy bridged prompts, reduced trace/completion copies) and stateless-JSON MCP servers (#1822). No dependency changes (uv.lock unchanged).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): point verifiers submodule to main (post feat/nano-as-v1 merge)

verifiers feat/nano-as-v1 was squash-merged to main; retarget the submodule (8d52bc8e) and .gitmodules branch to main. main's #1826 moved the built-in tasksets/harnesses into the verifiers package, so drop prime-rl's now-defunct standalone harnesses/tasksets deps + editable sources (provided by verifiers.v1 now); compact and the -v1 env pins are unchanged. uv.lock re-resolved (425 pkgs).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(tests): migrate unit tests to the bumped verifiers v1 API

The verifiers bump (8d52bc8e) changed several public APIs; these nano unit
tests still used the old surface and failed. Test-only changes:

- OpenAIClientConfig -> EvalClientConfig (test_teacher_logprobs)
- vf.Task(instruction=...) -> prompt=... (test_filters)
- client-config shape: client_type/api_base_url/extra_headers ->
  EvalClientConfig/TrainClientConfig type/base_url/headers/renderer
  (test_client, test_elastic)
- rebuild rollouts as v1 Trace objects with branches, asserting against
  production's actual parquet columns (test_prime_monitor)

(test_advantage's equivalent fix landed in the merge commit.)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(trainer): restore main's bin_cost FLOP-balanced packing

The main->nano merge had over-reverted the trainer pipeline to its pre-bin_cost
version. Restore main's packing/distribution so the trainer tracks main; the
only nano-side trainer delta is now the token_ids TrainingSample interface plus
multimodal.

- batch.py: main's bins-based packing (_MicroBatchBin, _materialize_bin,
  _expand_bins_by_splitting, bin_cost-weighted balanced_partition within each
  modality group); keep nano's token_ids prepare_sample + _truncate_mm /
  _slice_encoded image-block-aware truncation.
- transport/types.py: MicroBatch.sequence_lengths (the bin_cost weight input).
- packer.py: thread bin_cost through setup_packer -> prepare_batch; keep nano's
  token_ids sample validation.
- data.py / train.py / token_export.py / utils.py: now identical to main -
  build_bin_cost(model.config) wiring + the precomputed sequence_lengths logprob
  split, dropping nano's redundant get_response_lengths path.
- tests: test_batch / test_packer pass bin_cost=build_bin_cost(None); the
  balance test classifies real vs dummy micro-batches by content (the FLOP
  balanced_partition interleaves dummies rather than appending them).

Verified: 484 unit tests pass (only the 4 GPU-toolkit tilelang model tests fail,
environmental); reverse-text-v1 RL smoke runs 3 clean steps end-to-end.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test(trainer): carry over main's bin_cost packing tests

The bin_cost restore brought the packing code but the fork had patched nano's
test_batch instead of adopting main's, so main's bin_cost-specific tests were
left behind. Port them, token_ids-adapted: randomized packing invariants,
FLOP-aware balancing, FLOP-aware heavy-bin split-to-align, token-cost fallback
distribution, split-to-align avoids dummy micro-batches, and pad_micro_batch
preserves explicit sequence_lengths. 18 test_batch tests pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: drop deps/prime submodule, revert .gitmodules to main

deps/prime was only referenced from .gitmodules (not pyproject/uv.lock/code);
removing it and resetting .gitmodules to main's version so the PR carries no
submodule-metadata churn. deps/verifiers stays pinned at 8d52bc8e.

* chore: pin verifiers floor to dev357, drop compact env + narrating comments

- verifiers floor -> >=0.1.15.dev357 (latest dev on PyPI = current submodule pin):
  root dependency + override-dependencies, plus prime-rl-configs dependency
- drop the `compact` example env (envs extra + its [tool.uv.sources] entry)
- remove edit-narrating comments (transitive-deps note, envs-list description)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: keep renderers/prime-pydantic-config sources below verifiers (match main order)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* revert: drop merged gc.collect() in orchestrator trim_process_memory (nano uses malloc_trim only)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: unquote forward-ref type annotations + small cleanups

- replace string-literal type annotations with real types via
  `from __future__ import annotations` (+ existing TYPE_CHECKING imports):
  Rollout in orchestrator/filters.py and utils/monitor/{base,multi,prime,wandb}.py,
  EventLoopLagStats in utils/async_utils.py; drop the now-unneeded F821 noqa
- prime monitor: rollout.task/timing.model_dump_json() instead of
  json.dumps(...model_dump(mode="json")) (single Rust-backed serialization)
- drop redundant comments (TrainingSample field comments, renderer passthrough)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: drop EnvConfig docstring + redundant id/args fields

id and args are already on vf.EnvServerConfig; prime-rl's bare redefinition of id was shadowing the base's _validate_env_id AfterValidator. Removing both restores inheritance (incl. id validation).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(advantage): adopt main's per-env Linear advantage (adapted to vf.Trace)

This PR is only about vf-v1 integration; the RL advantage should match main, not
nano's Tokens/Turns efficiency shaping.

- config: LinearLengthPenaltyConfig (coef, gate_by_correctness) +
  DefaultAdvantageConfig(length_penalty, length_weighted_baseline); per-env
  TrainEnvConfig.advantage + top-level OrchestratorConfig.advantage default
- advantage.py: main's default_advantage_fn / setup_advantage_fn(config, max_seq_len),
  adapted to vf.Trace (r.reward / r.completion_len instead of dict access; Traces
  passed through assign_advantages, advantage written back onto each Trace)
- per-env wiring: TrainEnv.advantage_fn = setup_advantage_fn(config.advantage,
  max_seq_len); TrainEnvs(max_seq_len); train_sink does per-env
  assign_advantages(survivors, env.advantage_fn)
- tests: main's Linear / length-weighted / per-env / max_seq_len-threading
  advantage tests, adapted to nano's vf.Trace _make_rollout
- drop the now-unused get_tool_response_len (only served nano's Tokens advantage)

Verified: 486 unit tests pass; reverse-text-v1 RL smoke 3 clean steps end-to-end
through the per-env advantage path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): relock flash-linear-attention to current HEAD

flash-linear-attention is an unpinned git source (tracks HEAD, as on
main); its HEAD moved e8e791f -> bd67d11, leaving the locked commit stale
so CI's `uv sync --all-extras --locked` re-resolves it and fails. Relock
to the current HEAD.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(rl): address e2e review findings

- env-server: forward legacy extra_env_kwargs (rollout timeout / completion
  token budget / max_seq_len) for v0 envs on the rl.py path. The standalone
  env-server CLI dropped them, so legacy envs ran uncapped; the orchestrator
  _spawn path already passed them.
- envs: re-type the wire vf.Trace into Rollout via model_construct instead of
  a model_dump -> model_validate round-trip, avoiding a per-rollout copy of the
  node pixel_values / routed_experts tensors (the server already model_constructs).
- train_sink: keep a running token total for token-batched runs instead of
  re-summing the uncached Trace.total_tokens over the whole pending batch on
  every arrival.
- config: drop dead ClientConfig.timeout / connect_timeout (not wired into the
  v1 rollout clients).
- restore gc.collect() before malloc_trim in trim_process_memory; emit
  Trace.info in the prime-monitor parquet (both match main).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers submodule to main (b841e53a)

The v1 work merged into verifiers main; the prior pin 8d52bc8e is an ancestor
of main, so this is a clean fast-forward. verifiers is an editable path dep
with unchanged declared deps, so uv.lock is unchanged. Verified with the
reverse_text v1 debug run (reward 0.11 -> 0.77 over 20 steps, no errors).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(rl): correct gibberish/repetition filter logprob alignment

GibberishFilter paired masked completion token_ids with logprobs from the
start of node.logprobs (misaligned on nodes mixing context + sampled tokens);
RepetitionFilter streaked over all logprobs including context. Both now zip
token_ids/logprobs/mask together and process only sampled (mask=True) tokens.

Also document the v1 integration's breaking config changes (env taskset/
harness shape, empty train.env default, num_workers->pool, required renderer,
client timeout removal) in CHANGELOG.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(rl): require at least one training env at config time

TrainConfig.env defaulted to an empty list with no check (only eval envs were
validated non-empty), so a config with no [[orchestrator.train.env]] parsed
and only failed later in TrainSource during setup. Add a non-empty-env
validator (mirroring EvalConfig) and make OrchestratorConfig.train a required
field (no default), so the failure surfaces at parse / --dry-run.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(v1): scaleswe -> rlm harness + router replay

Switch the scaleswe debug config to the rlm harness on prime sandboxes for
both train (scaleswe-v1) and eval (swebench-verified) envs, and enable router
replay (trainer.enable_router_replay + inference.enable_return_routed_experts,
mirroring configs/debug/r3.toml) to cut trainer/inference MoE routing mismatch
on the A3B model. Rename run/job to the -rlm variant and sync the prime
sandbox cleanup labels. Header comment corrected (prime, not modal).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): revert config-time train-env-required check (too broad)

The train-required validation (60e824247) broke ~18 config-propagation tests
in test_configs.py that construct OrchestratorConfig/RLConfig without a train
env, plus two checked-in configs that omit one (configs/debug/orch.toml,
examples/glm5_pd_disag/rl.toml). A config-level validator is the wrong place —
the codebase widely constructs train-less OrchestratorConfigs. Reverting to
green CI; a non-empty-train guard belongs at orchestrator setup (fail fast
before TrainSource) instead.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers to latest main + drop stale prime-env TODO

- Bump deps/verifiers b841e53a -> 7169d02d (latest verifiers main, clean
  fast-forward, ...#1838). Editable path dep with unchanged declared deps, so
  uv.lock is unchanged. Verified with reverse_text v1 (reward 0.13 -> 0.75 over
  10 steps, no errors).
- Remove the stale "no prime-env hub install" TODO from the orchestrator — it
  never loads environments (the env server imports them in its child process),
  so the note no longer applies.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): remove dead prime-env-install path

Namespaced legacy env auto-install was removed (the v1 env server loads envs
directly via serve_env), leaving dead code with no callers/readers: the
`env_install_prerelease` flags (OrchestratorConfig + EnvServerConfig), the
`install_env` helper, and `get_env_ids_to_install`. Drop them and the now-
orphaned `subprocess` / `EnvConfig`,`EvalEnvConfig` imports.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): drop in-process env-server spawn, require address

The orchestrator no longer spawns env servers in-process (the mp.Process +
os.dup2 fd-redirect path). It only attaches to a server at EnvConfig.address,
now mandatory at orchestrator runtime - Env.start errors if it's unset. The rl
launcher already spawns one env-server subprocess per env and assigns address,
so launcher-driven runs are unaffected; standalone `uv run orchestrator` must
now be paired with separately-launched env-server(s) and an explicit address
per env.

Removes _run_env_server, Env._spawn, Env/Envs.shutdown, _env_server_process,
and the now-dead mp/os/queue/sys/atexit imports + ENV_SERVER_SPAWN_TIMEOUT.
Updates the standalone-orchestrator docs (training.md, scaling.md --bench) and
the CHANGELOG.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin (dashboard per-rollout timer includes setup)

51701f4c (#1846).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Revert "chore(v1): drop in-process env-server spawn, require address"

This reverts commit d77546155.

Restore the in-process env-server spawn (orchestrator sidecar-spawns when
address is unset) to mirror main for now. The address-required / attach-only
cleanup is deferred - revisit later.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): orchestrator always spawns env servers in-process (mirror main)

Drop the launcher's env-server management: setup_env_servers (which
pre-assigned each env an address + spawned an env-server subprocess), the
per-env subprocess spawn loop in rl_local, the ENV_SERVER_KIND_STRIDE constant,
and the env_server_base_port config field. With no address pre-assigned, the
orchestrator spawns its own v1 EnvServer in-process per env (Env._spawn),
exactly as on main. The env-server CLI and EnvConfig.address are kept for the
optional user-managed external-server path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(trainer): contiguous routed_experts slice for glm4_moe under compile (#2860)

Router replay passes routed_experts[:, :, layer_idx, :] (a strided view of
[tokens, layers, topk], dim-1 stride = layers*topk) into the MoE forward. Under
torch.compile the inductor kernel asserts a contiguous input, so it crashed with
`assert_size_stride ... stride 8==368` on GLM-4.5-Air. Make the slice contiguous.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore(v1): bump verifiers pin (robust _ENSURE_UV for old base images)

7c347f61 (#1848).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: S1ro1 <matej.sirovatka@gmail.com>
Co-authored-by: Matej Sirovatka <54212263+S1ro1@users.noreply.github.com>
Co-authored-by: rasdani <73563550+rasdani@users.noreply.github.com>
Co-authored-by: Codex <codex@primeintellect.ai>
2026-06-23 18:04:57 -07:00
minh hoangandGitHub 570463cca2 chore(renderers): bump to submodule to renderers-v0.1.8.dev49 (#2852)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
2026-06-22 12:28:27 -07:00
JannikStandGitHub 146fcd0136 fix(inference): restore usage block on /inference/v1/generate (#2784)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* fix(inference): restore usage block on /inference/v1/generate response

* fix(inference): apply ruff formatting

* fix(inference): drive _FinalOutputCapture through async-for, not __anext__

* fix(inference): always emit cached_tokens, drop enable_prompt_tokens_details gate

* chore: bump verifiers to fix/hatch-vcs-fallback-version

Pin to the fallback-version fix (PrimeIntellect-ai/verifiers#1650) so the
prime-rl Docker build resolves a version without VCS metadata. Temporary
pin to the PR branch; should move to verifiers main once #1650 lands.

* fix(inference): annotate _FinalOutputCapture source as AsyncIterable
2026-06-12 19:07:09 +02:00
samsjaandGitHub b0612a0e1f add rlm search (#2783)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* add rlm search

* bump dep
2026-06-11 21:25:18 -07:00
samsjaandGitHub 04d067145f update deps (#2736)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* update deps

* update deps

* update deps
2026-06-09 19:31:19 -07:00
minh hoangandGitHub c2a5fa466c chore(renderers): bump to submodule to renderers-v0.1.8.dev41 (#2732)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
2026-06-08 15:16:58 -07:00
halleriteandGitHub b67fd12fe6 chore(renderers): bump submodule to renderers-v0.1.8.dev40 (#2718)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
2026-06-04 22:13:50 +02:00
halleriteandGitHub 8d88f5e302 chore: bump verifiers submodule to main (v1 seq_len fix) (#2692)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
2026-06-03 00:20:45 +02:00
samsjaandGitHub f3ad435508 move verifieres from workspace to editable install (#2684)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* move verifieres from workspace to editable install

* move every submodule deps as editable instead of workspace
2026-06-01 15:29:19 -07:00
26cdf2ee1d chore(deps): bump renderers (offset-tokenizer config-build fallback for Laguna) (#2663)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
Bumps the deps/renderers submodule 89ab3f0 (v0.1.8.dev35) -> 35c2407
(v0.1.8.dev37), pulling in PrimeIntellect-ai/renderers#75: apply the
config-build fallback to ``_get_offset_tokenizer`` too.

#72 only wired the fallback into ``load_tokenizer``;
``_get_offset_tokenizer`` still called ``AutoTokenizer.from_pretrained``
directly to avoid the fastokens shim and so kept hitting HF's RoPE
validator on Laguna-family models. Every rollout through a hand-coded
renderer (LagunaXS2, Qwen35, ...) crashed with the same KeyError #72
was supposed to fix.

Verified end-to-end against poolside/Laguna-XS.2 with reverse-text:
two RL steps complete cleanly (reward 0.36 / 0.31, ~100 tok/sample);
the run then hits an unrelated single-GPU FSDP OOM on the 256-expert
trainer, which is a config-sizing issue, not the renderers bug.

Also pulls in renderers#74 (``message_tool_names`` field for per-message
tool attribution).

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 13:05:51 -07:00
Matej SirovatkaandGitHub ae748fd69d Support delta-only routed experts replay (#2632)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* Support delta-only routed experts replay

* Pin routed experts replay dependencies

* fix(orchestrator): match longest active prefix in interleave_rollout
2026-05-28 03:00:20 +02:00
d3727060cb chore(deps): bump renderers (tokenizer config-build fallback for Laguna) (#2657)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
Bumps the deps/renderers submodule 2ec28a8 (v0.1.8.dev28) -> 89ab3f0
(v0.1.8.dev35), pulling in PrimeIntellect-ai/renderers#72: when
AutoTokenizer.from_pretrained fails while building the model config
(e.g. HF RoPE validation rejecting nested rope_parameters for
poolside/Laguna-XS.2), fall back to loading the repo's self-contained
tokenizer.json directly. Fixes the tokenizer load crash for the Laguna
model series; loads under the fastokens fast path.

Re-locks uv.lock: renderers now floors openai-harmony at >=0.0.4 (renderers#69).

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 00:44:47 +02:00
6d17559422 Consume the typed RendererConfig surface (#2635)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* Consume the typed RendererConfig surface

Reshapes the orchestrator / SFT renderer plumbing around
``renderers.RendererConfig`` (the typed discriminated union) instead of
flat strings + booleans.

- ``configs.shared.RendererConfig`` now composes ``renderers.RendererConfig``
  as a single ``settings`` field; ``pool_size`` stays as a separate
  prime-rl-side concern. The flat ``name`` / ``tool_parser`` /
  ``reasoning_parser`` / ``preserve_*`` fields are gone.
- ``setup_inference_pool`` / ``setup_clients`` / ``StaticInferencePool``
  / ``ElasticInferencePool`` collapse their six-arg renderer surface to
  a single ``renderer_config: RendererConfig | None`` plus the orthogonal
  ``renderer_model_name`` / ``renderer_pool_size`` fields.
- Orchestrator + SFT trainer call sites pass the typed config straight
  through to ``create_renderer(tokenizer, config.renderer.settings)``.
- Cross-env / unmapped-model validators rewritten to inspect
  ``renderer.settings`` (discriminated-union shape) instead of the flat
  field names.
- Tests updated to construct typed configs (``Qwen3VLRendererConfig()``,
  etc.) and assert against the new call shapes.

Pins ``deps/renderers`` and the ``prime-rl-configs`` ``renderers`` dep to
the renderers PR's tip
(``4c9099debbc9bc4fcc3eb6a118bbfa5c364ec395``) until it merges and a dev
release ships.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Bump renderers pin to the merged v0.1.8.dev27

The typed-config refactor landed on renderers main as ``c86c50b``
(tag ``renderers-v0.1.8.dev27``). Switching:

- ``deps/renderers`` submodule pointer → ``c86c50b``
- ``prime-rl-configs`` git URL pin → ``@renderers-v0.1.8.dev27``

Same commit, more readable, and stable to anyone reading the diff
after the feature branch is deleted. PyPI dev release for the same
version is pending a publisher-config fix; once it lands the git URL
pin can collapse to a plain ``renderers>=0.1.8.dev27`` PyPI pin.

* Migrate in-repo TOMLs to the typed renderer schema

The new RendererConfig accepts only `settings` (typed
`renderers.RendererConfig` discriminated union) and `pool_size`, so
flat `name`/`reasoning_parser`/`preserve_*` keys under
`[orchestrator.renderer]` now fail pydantic validation. Move those
keys under `[orchestrator.renderer.settings]`. `pool_size` stays in
the outer block. Two configs that only set `preserve_all_thinking`
gain an explicit `name = "auto"` since the discriminator is required.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Use renderers.RendererConfig directly; None means MITO

Per Mika's review: drop prime-rl's RendererConfig wrapper that nested
the renderers' discriminated union under a ``.settings`` field. The
wrapper bought a parallel ``pool_size`` attribute but cost a clunky
two-level TOML layout and made every call site dereference ``.settings``.

Use ``renderers.RendererConfig`` (the typed discriminated union) as
the field type directly. Pool size moves up one level to
``orchestrator.renderer_pool_size``. ``use_renderer: bool`` is gone —
``renderer: RendererConfig | None`` with ``None`` for MITO replaces it
(consistent with how SFT, optimizer, and other optional sub-configs
express absence). TOML callers spell MITO with ``renderer = "None"``,
which ``prime_pydantic_config.BaseConfig._none_str_to_none`` coerces
back to Python None.

Net effect on TOMLs is a wash with the previous commit: 26 in-repo
configs lose the ``.settings`` indirection they gained yesterday, and
one (multimodal) splits ``pool_size`` out of the renderer block.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Pin renderers via PyPI now that 0.1.8.dev27 is published

The slim ``prime-rl-configs`` wheel (installed standalone, outside the
workspace) now resolves ``renderers`` from PyPI instead of the git tag
URL it used while the dev release was waiting on PyPI trusted-publisher
config. The full ``prime-rl`` workspace still pulls renderers from the
``deps/renderers`` submodule, so this only affects downstream slim
consumers.

Re-locks to refresh the lockfile against the same workspace state.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Lazy-import renderers in the typed config schema

The slim ``prime-rl-configs`` install path (configs only, no GPU
deps) asserts that importing the config classes doesn't pull in
``transformers``. ``from renderers import RendererConfig`` at the top
of ``orchestrator.py`` / ``sft.py`` broke that: ``renderers/__init__``
eagerly imports every concrete renderer module (DefaultRenderer,
Qwen3Renderer, …), each of which imports
``transformers.tokenization_utils.PreTrainedTokenizer``.

Defer the renderers import via:
  - ``TYPE_CHECKING``-guarded ``from renderers import RendererConfig``
    so static type checkers still see the typed discriminated union.
  - ``renderer: Any`` field annotation at runtime, so no resolution
    happens at class definition.
  - ``model_validator(mode="before") _resolve_renderer`` that
    lazy-imports ``renderers``, fills the orchestrator default
    (``AutoRendererConfig()``), and coerces dict input through the
    typed union via ``TypeAdapter``. SFT's default stays ``None``.

End-user semantics unchanged; class import is now transformers-free.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Restore typed renderer field; pin renderers to dev28

dev28 lazy-loads concrete renderer classes via PEP 562
``__getattr__`` (renderers#64), so ``from renderers import
RendererConfig`` no longer drags ``transformers`` into ``sys.modules``.
The slim-install CI gate is satisfied without the prior workaround.

Drop the ``Any`` annotation and the ``_resolve_renderer``
model-validator that lazy-resolved the discriminated union from
``OrchestratorConfig`` and ``SFTConfig``. The fields are typed
``RendererConfig | None`` again, and pydantic does the full
discriminator validation at class definition.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Bump deps/renderers (dev28) and deps/verifiers (typed ClientConfig)

- deps/renderers c86c50b -> 2ec28a8 — picks up the PEP 562
  ``__getattr__`` so the workspace install path also lazy-loads
  concrete renderer classes.
- deps/verifiers 04651be -> d107442 — adds the typed
  ``ClientConfig.renderer_config`` field that ``setup_clients``
  forwards. Fixes the unit-test
  ``test_setup_clients_assigns_renderer_and_dp_rank_headers``
  AttributeError on ``renderer_config``.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Preserve MITO across orch.toml round-trip; drop RendererConfig alias

Two cleanups on the typed renderer surface:

1. Per Samsja: drop the ``RendererConfig as RendererSettings`` alias
   in ``client.py`` / ``elastic.py``. The alias was a workaround for the
   former local ``RendererConfig`` wrapper class; with that gone, we
   just import ``RendererConfig`` from renderers directly.

2. Per Cursor bugbot: ``OrchestratorConfig.renderer = None`` (MITO) was
   silently dropped by ``model_dump(exclude_none=True)``, so any saved
   ``control/orch.toml`` would reload as the default
   ``AutoRendererConfig()`` (TITO). Add a wrapping ``model_serializer``
   that re-injects ``renderer = "None"`` (string) when the field is
   ``None``, matching what ``BaseConfig._none_str_to_none`` accepts on
   reload. MITO and TITO now round-trip through TOML.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Address mika review on #2635: rename pool_size, drop factory, trim docstring

- renderer field uses direct AutoRendererConfig() default (frozen, no
  factory needed)
- renderer_pool_size -> pool_size on OrchestratorConfig; cascade through
  client.py, elastic.py, orchestrator.py call sites and the test;
  vf.ClientConfig kwarg name (verifiers-side) stays renderer_pool_size
- shorter docstring on the renderer field

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Bump deps/verifiers to f9c68eb2 (both renderer PRs merged to main)

Picks up verifiers main with PR #1463 (surface every parsed tool_call,
drop status filter) and PR #1468 (pipe chat_template_kwargs into typed
RendererConfig) now that both are merged. verifiers 0.1.15.dev11.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Eli Gottlieb <eli@primeintellect.ai>
2026-05-26 12:43:26 -07:00
0057f3bb91 exp: general-agent (#2525)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
* exp: general-agent

* docs: update PR description guidance

* Revert "docs: update PR description guidance"

This reverts commit b8c33de68b7a2b924b43d8cbb508afef8571091c.

* feat(general-agent): add RLM behavior learning configs

* feat(general-agent): tune behavior reward shaping

* feat(general-agent): log behavior judge state for audits

* feat(general-agent): document split behavior rewards

* feat(general-agent): document pruned behavior metrics

* docs(general-agent): record behavior judge calibration runs

* feat(general-agent): define behavior learning ablations

* chore(general-agent): move behavior learning configs

* exp(behavior-learning): add labels, prime monitor, remove cp from ablation configs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* exp(behavior-learning): source ~/.env before run to fix auth

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(slurm): source ~/.env before uv run in single-node RL template

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* exp(behavior-learning): rename prefix, pin rlm_ref, prime sandbox kill in pre-run

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* revert(slurm): drop source ~/.env from single-node RL template

Source ~/.env directly in the shell before uv run rl instead; env vars
propagate to sbatch via --export=ALL.

Reverts 3703dc05f.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore(deps): bump verifiers submodule to main (dd89b5e9)

Picks up #1395 which fixes the ParsedToolCall subscription bug in
renderer_client.from_native_response — previously raised
'ParsedToolCall' object is not subscriptable on every rollout.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* exp(behavior-learning): switch model to Qwen3-4B-Thinking-2507

4B-Instruct hallucinated tool names and gave up after a few errors
(reward ~0.4% at step 2). Try the thinking variant which is better
at structured tool-use.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* exp(behavior-learning): log behavior metrics in baseline without affecting reward

Set behavior_judge_model + behavior_reward_alpha=0.0 so the judge runs
and behavior_<key> metrics get logged, but final_reward stays equal to
task_reward.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* exp(behavior-learning): log behavior metrics in prompt run without affecting reward

Same change as baseline: enable judge for metrics but alpha=0.0.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* exp(behavior-learning): cap ablations at 200 steps, log behavior metrics in prompt run

- prompt run: enable judge with alpha=0.0 so behavior_<key> metrics
  get logged but final_reward stays equal to task_reward (same setup
  as baseline)
- all four configs: max_steps 1000 → 200 to keep ablations bounded

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore(deps): bump research-environments to include behavior-judge team-id fix

Picks up PrimeIntellect-ai/research-environments@769298b1 which forwards
PRIME_TEAM_ID as X-Prime-Team-ID on behavior judge requests, so the judge
bills the team balance instead of the user's personal balance.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore(deps): bump research-environments to include final_reward fix

Picks up eaaabf3c which makes final_reward use state.get() so judge
failures don't zero out task_reward.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* exp(behavior-learning): bump context to 65K with cp=2 on all configs

Previous runs (cp=1, 32K) saw 6-9% truncation rate and output_tokens
hitting the 32K cap on long trajectories. Double the seq_len and
max_model_len; cp=2 keeps per-rank activation memory flat under the
2x context.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore(deps): bump research-environments to log un-gated behavior_reward

Picks up fdca6d76 which logs behavior_reward as the raw judge mean
(independent of task_reward) and moves the solution gate into
final_reward.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* exp(behavior-learning): extend max_steps to 400 for phase-3 continuation

All 4 phase-2 runs completed step 200 with promising trajectories.
Extend max_steps to 400 to continue training from the step_200
checkpoints.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* exp: move general-agent and behavior-learning configs into private submodule

The general-agent + behavior-learning configs are not meant for the public
prime-rl repo. Move them into the research-configs submodule mounted at
configs/private/ so they share access controls with the rest of our
internal experiment configs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore(deps): bump configs/private to include phase-3 behavior-learning RESULTS.md

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* exp(general-agent): bump research-envs, add public RLM configs, rename eval-config helper

- Bump deps/research-environments to origin/main HEAD (general-agent 0.1.4)
- Add configs/general_agent/{rl_qwen3_0p6b_debug,rl_qwen3_4b,rl_qwen3_30b_a3b}.toml
  using the general-agent-solver-rlm env
- Rename is_vf_eval_config -> is_eval_config in tests/unit/test_configs.py

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* exp(general-agent): rename 0p6b config, point all configs at general-agent-debug wandb project

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore(deps): bump configs/private to expand behavior-learning RESULTS

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore(deps): bump configs/private for tightened behavior-learning RESULTS

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* exp(general-agent): drop num_workers/max_retries/tool_call_parser, set step counts

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25 13:43:16 -07:00
84f072bc99 chore(deps): bump pydantic-config for dict[str, str] coercion fix (#2618)
Docker Push / Push CUDA image to Docker (push) Canceled after 0s
Pulls in PrimeIntellect-ai/pydantic-config#14, which stops
`BaseConfig._coerce_dict_str_values` from rewriting string values in
`dict[str, str]` fields. Configs like
`configs/private/rlm5/glm5-swe.toml` that set
`prefill_env_overrides = {"VLLM_ENABLE_MOE_DP_CHUNK"="0"}` previously
failed validation because "0" was coerced to int(0); they now load.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 19:58:54 -07:00