Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ef42886edc | ||
|
|
ed05a1418d | ||
|
|
1ef8f1a843 | ||
|
|
e229a286f2 |
Vendored
+1
-1
Submodule deps/research-environments updated: 6a2dee6fcd...21a284618f
Vendored
+1
-1
Submodule deps/verifiers updated: f646beb37e...dd2950909b
+1
-1
@@ -217,7 +217,7 @@ Checkpointing is split across processes because the orchestrator and trainer can
|
||||
| Process | What's saved | Where |
|
||||
|---|---|---|
|
||||
| Trainer | FSDP-sharded model (DCP), optimizer, scheduler, progress | `<output_dir>/checkpoints/step_N/trainer/` |
|
||||
| Orchestrator | Step counter, total tokens / samples / problems | `<output_dir>/checkpoints/step_N/orchestrator/` |
|
||||
| Orchestrator | Progress, per-env data state | `<output_dir>/checkpoints/step_N/orchestrator/` |
|
||||
| Inference | _nothing_ — re-pushed from the latest checkpoint on restart | n/a |
|
||||
| Trainer (HF weights) | HF-compatible weight snapshot for serving | `<output_dir>/weights/step_N/` |
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ dependencies = [
|
||||
"renderers>=0.1.9.dev10",
|
||||
"tomli>=2.2.1",
|
||||
"tomli-w>=1.2.0",
|
||||
"verifiers>=0.2.2.dev43",
|
||||
"verifiers>=0.2.2.dev73",
|
||||
]
|
||||
|
||||
[build-system]
|
||||
|
||||
@@ -467,11 +467,6 @@ class OrchestratorConfig(BaseConfig):
|
||||
``tokenizer.name_or_path`` via ``MODEL_RENDERER_MAP``. RL/OPD roll out through the renderer
|
||||
client; SFT uses it to backfill tokens for its chat-completions teacher."""
|
||||
|
||||
pool_size: int | None = Field(None, ge=1)
|
||||
"""Number of renderer slots shared across concurrent rollouts. Bump
|
||||
for long multi-turn prompts where client-side jinja tokenization
|
||||
serializes."""
|
||||
|
||||
optim: OptimizerConfig = OptimizerConfig()
|
||||
"""Per-run optimizer configuration for multi-run training."""
|
||||
|
||||
@@ -619,22 +614,6 @@ class OrchestratorConfig(BaseConfig):
|
||||
"""True when at least one train env samples rollouts from the live policy."""
|
||||
return any(env.algo is not None and env.algo.sampling.source == "policy" for env in self.train.source)
|
||||
|
||||
@model_validator(mode="after")
|
||||
def validate_pool_size(self):
|
||||
"""``pool_size`` sizes the renderer-client pool for policy-sourced
|
||||
sampling. Reject it when that path never runs — no train env samples
|
||||
from the policy — so callers don't silently pass it and wonder why
|
||||
it's ignored."""
|
||||
if self.pool_size is None:
|
||||
return self
|
||||
if not self.any_policy_sourced:
|
||||
raise ValueError(
|
||||
f"orchestrator.pool_size={self.pool_size!r} is set but no train env samples "
|
||||
"from the policy — the renderer-client sampling pool never runs (the renderer "
|
||||
"is still used for client-side tokenization). Remove pool_size."
|
||||
)
|
||||
return self
|
||||
|
||||
@model_validator(mode="after")
|
||||
def validate_renderer_auto_resolves(self):
|
||||
"""Reject the silent DefaultRenderer fallback at config time.
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ dependencies = [
|
||||
"setproctitle>=1.3.0",
|
||||
"uvloop>=0.21.0",
|
||||
"torchtitan",
|
||||
"verifiers[harbor]>=0.2.2.dev43",
|
||||
"verifiers[harbor]>=0.2.2.dev73",
|
||||
"renderers",
|
||||
"dion",
|
||||
"tilelang>=0.1.8",
|
||||
|
||||
@@ -89,17 +89,25 @@ grep -E "WARNING|ERROR" {output_dir}/logs/envs/{train,eval}/*.log
|
||||
|
||||
All metrics print to the console log (and W&B when configured).
|
||||
|
||||
**Progress** — orchestrator log. Rollout metrics are keyed `{scope}/{subset}/<metric>/<stat>`: `scope` is `train/agg` (all train envs) or `train/<env>` (`eval/<env>` for eval); `subset` is `all` (every rollout) or `effective` (post-filter).
|
||||
**Progress** — orchestrator log. Rollout metrics mirror the episode/trace hierarchy, at two levels:
|
||||
|
||||
- `{scope}/{subset}/<metric>/<stat>` — episode-level facts only: the token/turn/branch counts, summed over an episode's traces.
|
||||
- `{scope}/{subset}/<agent>/<metric>/<stat>` — every trace-level metric (reward, truncation, errors, timing, env metrics, filter verdicts, eval scores), keyed by agent name so seats never mix. Flat over that agent's traces: one sample is one trace, so an in-episode fan-out like n solvers contributes n samples.
|
||||
|
||||
`scope` is `train/agg` (all train envs) or `train/<env>` (`eval/<env>` for eval); `subset` is `all` (every rollout) or `effective` (post-filter). Single-agent envs have one agent — usually `agent` — and one trace per episode, so both levels agree; multi-agent envs name each seat (`proposer`, `solver`, `judge`, …).
|
||||
|
||||
| Metric | Description |
|
||||
|--------|-------------|
|
||||
| `train/agg/effective/reward/mean` | mean training reward (per env: `train/<env>/effective/reward/mean`) |
|
||||
| `train/agg/effective/num_total_tokens/mean` | avg tokens per rollout (also `num_input_tokens`, `num_output_tokens`) |
|
||||
| `train/agg/effective/num_turns/mean` | avg turns per rollout (multi-turn only) |
|
||||
| `train/agg/effective/is_truncated/mean` | fraction truncated |
|
||||
| `train/agg/all/has_error/mean` | fraction errored (per-type under `train/agg/all/error/<type>`; also `dispatcher/errored/{train,eval}`) |
|
||||
| `train/<env>/effective/metrics/<name>/mean` | env-specific metrics (e.g. pass rate) |
|
||||
| `eval/<env>/effective/{avg@k,pass@k}` | eval scores when configured |
|
||||
| `train/agg/effective/<agent>/reward/mean` | mean training reward for that agent (per env: `train/<env>/effective/<agent>/reward/mean`) |
|
||||
| `train/agg/effective/num_total_tokens/mean` | avg tokens per episode, summed over its agents (also `num_input_tokens`, `num_output_tokens`) |
|
||||
| `train/agg/effective/num_turns/mean` | avg turns per episode, summed over its agents |
|
||||
| `train/<env>/effective/<agent>/num_turns/mean` | avg turns for that agent alone (also token counts, `num_branches`) |
|
||||
| `train/agg/effective/<agent>/is_truncated/mean` | fraction of that agent's rollouts truncated |
|
||||
| `train/agg/all/<agent>/has_error/mean` | fraction of that agent's rollouts errored (per-type under `train/agg/all/<agent>/error/<type>`; also `dispatcher/errored/{train,eval}`) |
|
||||
| `train/agg/all/<agent>/is_trainable/mean` | fraction carrying a training signal — 0.0 for a frozen seat like a judge (also `is_filtered`, `filters/<name>`) |
|
||||
| `train/<env>/effective/<agent>/metrics/<name>/mean` | env-specific metrics for that agent (e.g. pass rate) |
|
||||
| `train/<env>/effective/<agent>/timing/agent/model/mean` | model vs harness share of that agent's phase |
|
||||
| `eval/<env>/effective/<agent>/{avg@k,pass@k}` | eval scores for that agent, when configured |
|
||||
|
||||
**Stability** — trainer log:
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
"""Checkpoint manager for ``Progress``. Layout:
|
||||
"""Checkpoint manager for the orchestrator state (``Progress`` counters +
|
||||
``TrainSource`` data position). Layout:
|
||||
``<output_dir>/checkpoints/step_N/orchestrator/progress.pt``."""
|
||||
|
||||
from __future__ import annotations
|
||||
@@ -13,6 +14,7 @@ from pathlib import Path
|
||||
import torch
|
||||
|
||||
from prime_rl.configs.orchestrator import CheckpointConfig
|
||||
from prime_rl.orchestrator.train_source import TrainSource
|
||||
from prime_rl.orchestrator.types import Progress
|
||||
from prime_rl.utils.logger import format_time, get_logger
|
||||
from prime_rl.utils.pathing import get_ckpt_dir, get_step_path
|
||||
@@ -26,7 +28,7 @@ class CheckpointManager:
|
||||
def get_ckpt_path(self, step: int) -> Path:
|
||||
return get_step_path(self.ckpt_dir, step) / "orchestrator"
|
||||
|
||||
def save(self, progress: Progress, step: int) -> None:
|
||||
def save(self, progress: Progress, train_source: TrainSource, step: int) -> None:
|
||||
ckpt_path = self.get_ckpt_path(step)
|
||||
ckpt_path.mkdir(parents=True, exist_ok=True)
|
||||
start = time.perf_counter()
|
||||
@@ -35,7 +37,7 @@ class CheckpointManager:
|
||||
fd, tmp_name = tempfile.mkstemp(dir=ckpt_path, prefix="progress.pt.", suffix=".tmp")
|
||||
try:
|
||||
with os.fdopen(fd, "wb") as f:
|
||||
torch.save({"progress": progress}, f)
|
||||
torch.save({"progress": progress, "train_source": train_source.state_dict()}, f)
|
||||
os.replace(tmp_name, ckpt_path / "progress.pt")
|
||||
except BaseException:
|
||||
with contextlib.suppress(OSError):
|
||||
@@ -45,7 +47,7 @@ class CheckpointManager:
|
||||
f"Orchestrator checkpoint saved to {ckpt_path} in {format_time(time.perf_counter() - start)}"
|
||||
)
|
||||
|
||||
def load(self, progress: Progress, step: int) -> None:
|
||||
def load(self, progress: Progress, train_source: TrainSource, step: int) -> None:
|
||||
ckpt_path = self.get_ckpt_path(step)
|
||||
state_file = ckpt_path / "progress.pt"
|
||||
if not state_file.exists():
|
||||
@@ -53,7 +55,7 @@ class CheckpointManager:
|
||||
get_logger().debug(f"Loading checkpoint from {state_file}")
|
||||
start = time.perf_counter()
|
||||
if self.config.skip_progress:
|
||||
get_logger().info("Skipping progress loading from checkpoint")
|
||||
get_logger().info("Skipping progress and data position loading from checkpoint")
|
||||
else:
|
||||
with open(state_file, "rb") as f:
|
||||
state = torch.load(f, weights_only=False)
|
||||
@@ -61,6 +63,16 @@ class CheckpointManager:
|
||||
for key, value in asdict(saved).items():
|
||||
if hasattr(progress, key):
|
||||
setattr(progress, key, value)
|
||||
train_source.load_state_dict(state["train_source"])
|
||||
for name, position in state["train_source"]["envs"].items():
|
||||
if name not in train_source.base_rows:
|
||||
continue
|
||||
rows = train_source.base_rows[name]
|
||||
num_tasks = len(rows) if rows is not None else "infinite"
|
||||
get_logger().info(
|
||||
f"Resumed data position for env {name} - epoch={position['epoch']}, "
|
||||
f"cursor={position['cursor']}/{num_tasks}"
|
||||
)
|
||||
get_logger().debug(f"Orchestrator checkpoint loaded in {format_time(time.perf_counter() - start)}")
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
N rollouts in one call reserves N permits (each bridged v0 rollout is its own
|
||||
single-agent episode).
|
||||
- Optional rate limiting via ``AsyncLimiter(tasks_per_minute, 60)``.
|
||||
- Emit-everything invariant: every dispatched env-rollout eventually reaches
|
||||
``out_q`` exactly once, as one episode (a ``list[Rollout]``). Failures
|
||||
- Emit-everything invariant: every dispatched episode eventually reaches
|
||||
``out_q`` exactly once, as a ``list[Rollout]``. Failures
|
||||
(env error, empty trajectory, task exception, off-policy cancel) carry
|
||||
``trace.last_error`` set; sinks decide drop / partial-train policy.
|
||||
- ``DispatcherMode.PREFER_TRAIN`` / ``PREFER_EVAL`` controls which kind to
|
||||
@@ -495,7 +495,7 @@ class RolloutDispatcher:
|
||||
self.inflight_permits -= n
|
||||
|
||||
async def handle_completed_rollout(self, task: asyncio.Task) -> None:
|
||||
"""Emit every dispatched env-rollout exactly once to ``out_q``: a ``run``
|
||||
"""Emit every dispatched episode exactly once to ``out_q``: a ``run``
|
||||
result as one episode, a legacy ``run_group`` result as ``rollout_count``
|
||||
single-trace episodes. Task exceptions synthesize ``rollout_count``
|
||||
error-marker episodes so the sink's count-to-``group_size`` finalization
|
||||
|
||||
@@ -4,7 +4,7 @@ Each ``Env`` owns a v1 ``EnvServer`` (spawned as a child process, or an
|
||||
external one pinned by ``config.serve.address``) and an ``EnvClient`` to drive it. The
|
||||
orchestrator never *runs* an environment — the agents and their runtimes live only
|
||||
in the server — but it does own the *taskset*: a v1 env's tasks are loaded here,
|
||||
once, and each dispatched env-rollout ships its task's data on the request
|
||||
once, and each dispatched episode ships its task's data on the request
|
||||
(``task_data``); the server pydantic-validates it into the taskset's declared
|
||||
``TaskData`` type and runs it. That keeps the server (and every worker in its
|
||||
pool) stateless about data — no per-worker dataset loads, no idx-addressed task
|
||||
@@ -12,7 +12,7 @@ cache — and gives the orchestrator real tasks to cycle, shuffle, and filter. O
|
||||
the legacy (v0) bridge, whose dataset genuinely lives server-side, is still driven
|
||||
by ``task_idx`` (its count comes from ``info``).
|
||||
|
||||
The server answers one ``Episode`` per env-rollout, whose traces we validate into
|
||||
The server answers one ``Episode`` per run request, whose traces we validate into
|
||||
``Trace[WireTaskData]`` — real ``vf.Trace``\\ s (never loose dicts) whose task
|
||||
keeps the env's task-specific fields as extras (``WireTaskData`` allows them).
|
||||
"""
|
||||
@@ -217,14 +217,14 @@ class Env:
|
||||
sampling=self._sampling(cache_salt),
|
||||
)
|
||||
if not episode.traces:
|
||||
error = episode.error
|
||||
error = episode.last_error
|
||||
detail = f"{error.type}: {error.message}" if error is not None else "no traces and no error recorded"
|
||||
raise RuntimeError(f"env-rollout failed before any trace was minted — {detail}")
|
||||
raise RuntimeError(f"episode failed before any trace was produced — {detail}")
|
||||
rollouts = [ROLLOUT_TYPE.model_construct(**dict(wire)) for wire in episode.traces]
|
||||
for rollout in rollouts:
|
||||
rollout.episode_id = episode.id
|
||||
if not episode.ok and rollout.ok:
|
||||
error = episode.error or vf.Error(
|
||||
error = episode.last_error or vf.Error(
|
||||
type="EpisodeFailed", message="A sibling trace in this episode failed"
|
||||
)
|
||||
rollout.errors = [*rollout.errors, error]
|
||||
|
||||
@@ -6,8 +6,17 @@ A rollout container (``TrainRollouts`` / ``EvalRollouts``) owns the rollout list
|
||||
``rollouts.metrics.num_input_tokens.mean()`` works — and assembles the full
|
||||
``{prefix}/{subset}/<metric>/<stat>`` wandb dict via ``.to_wandb(...)``.
|
||||
|
||||
No I/O, no pandas — plain Python over the ``vf.Trace`` properties each rollout exposes. Aggregation
|
||||
is flat over the rollout list except the solve rates, which group by ``group_id``.
|
||||
The wandb layout mirrors the episode/trace hierarchy, one aggregation per level:
|
||||
|
||||
- ``{prefix}/{subset}/<metric>/<stat>`` — episode level, one value per episode summing its traces
|
||||
(matching ``vf.Episode``'s aggregates). Only the count metrics live here.
|
||||
- ``{prefix}/{subset}/<agent>/<metric>/<stat>`` — agent level, one value per trace, grouped by agent
|
||||
name (``vf.Episode.by_agent``) so agents never mix into one distribution. Everything trace-scoped
|
||||
lives here: reward, rates, timing, custom metrics, the pipeline verdicts, the eval scores.
|
||||
|
||||
A single-agent env has one trace per episode, so the count metrics coincide across levels.
|
||||
|
||||
No I/O, no pandas — plain Python over the ``vf.Trace`` properties each rollout exposes.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
@@ -90,26 +99,26 @@ class TimingMetrics(StatGroup):
|
||||
"""Per-phase rollout durations, nested so ``metrics.timing.setup.mean()`` reads naturally.
|
||||
``total`` is the per-rollout sum across all phases."""
|
||||
|
||||
PHASES = ("setup", "generation", "finalize", "scoring")
|
||||
PHASES = ("setup", "agent", "finalize", "scoring")
|
||||
|
||||
@property
|
||||
def setup(self) -> Stat:
|
||||
return Stat([r.timing.setup.duration for r in self.rollouts])
|
||||
|
||||
@property
|
||||
def generation(self) -> Stat:
|
||||
return Stat([r.timing.generation.duration for r in self.rollouts])
|
||||
def agent(self) -> Stat:
|
||||
return Stat([r.timing.agent.duration for r in self.rollouts])
|
||||
|
||||
@property
|
||||
def generation_model(self) -> Stat:
|
||||
"""The share of the generation phase spent inside model calls (inference)."""
|
||||
return Stat([r.timing.generation.model.duration for r in self.rollouts])
|
||||
def agent_model(self) -> Stat:
|
||||
"""The share of the agent phase spent inside model calls (inference)."""
|
||||
return Stat([r.timing.agent.model.duration for r in self.rollouts])
|
||||
|
||||
@property
|
||||
def generation_harness(self) -> Stat:
|
||||
"""The share of the generation phase spent outside model calls (harness, tools,
|
||||
def agent_harness(self) -> Stat:
|
||||
"""The share of the agent phase spent outside model calls (harness, tools,
|
||||
user simulation)."""
|
||||
return Stat([r.timing.generation.harness.duration for r in self.rollouts])
|
||||
return Stat([r.timing.agent.harness.duration for r in self.rollouts])
|
||||
|
||||
@property
|
||||
def finalize(self) -> Stat:
|
||||
@@ -126,16 +135,19 @@ class TimingMetrics(StatGroup):
|
||||
def stats(self) -> dict[str, Stat]:
|
||||
return {
|
||||
**{phase: getattr(self, phase) for phase in self.PHASES},
|
||||
"generation/model": self.generation_model,
|
||||
"generation/harness": self.generation_harness,
|
||||
"agent/model": self.agent_model,
|
||||
"agent/harness": self.agent_harness,
|
||||
"total": self.total,
|
||||
}
|
||||
|
||||
|
||||
class CustomMetrics(StatGroup):
|
||||
"""Per-key ``Stat``s over a dynamic per-rollout dict attribute (env ``@metric``s or reward
|
||||
components), each averaged over the rollouts that report the key. ``value`` extracts the
|
||||
float from each entry (rewards are ``vf.Reward`` records; metrics are plain floats)."""
|
||||
components), each over the rollouts that carry the key. Scoring seeds every expected key
|
||||
with ``None`` before invoking it, so a ``None`` value means the signal never produced a
|
||||
score and counts as 0.0 — the ``effective`` subset excludes errored rollouts and gives the
|
||||
clean means. ``value`` extracts the float from each scored entry (rewards are ``vf.Reward``
|
||||
records; metrics are plain floats)."""
|
||||
|
||||
def __init__(self, rollouts: list[Rollout], attr: str, value: Callable[[Any], float] = float) -> None:
|
||||
super().__init__(rollouts)
|
||||
@@ -146,40 +158,29 @@ class CustomMetrics(StatGroup):
|
||||
names = sorted({name for r in self.rollouts for name in getattr(r, self.attr)})
|
||||
return {
|
||||
name: Stat(
|
||||
[self.value(getattr(r, self.attr)[name]) for r in self.rollouts if name in getattr(r, self.attr)]
|
||||
[
|
||||
self.value(scores[name]) if scores[name] is not None else 0.0
|
||||
for r in self.rollouts
|
||||
if name in (scores := getattr(r, self.attr))
|
||||
]
|
||||
)
|
||||
for name in names
|
||||
}
|
||||
|
||||
|
||||
class RolloutMetrics:
|
||||
"""Metrics shared by train and eval over a rollout list. Distributional metrics are ``Stat``s
|
||||
(mean/max/min); boolean metrics are ``Stat``s of 0/1 (use ``.mean()`` for the rate). ``to_wandb``
|
||||
assembles the full ``{prefix}/{subset}/...`` dict; ``TrainMetrics`` / ``EvalMetrics`` extend it."""
|
||||
class TraceMetrics(StatGroup):
|
||||
"""Trace-level metrics for one agent, every one of them flat over that agent's traces: one
|
||||
sample is one trace, so a fan-out (n same-agent traces in one episode, e.g. n solvers) simply
|
||||
contributes n samples. Weighing whole episodes against each other is the episode level's job;
|
||||
inside a seat the trace is the unit, which is also what the advantage computation samples."""
|
||||
|
||||
def __init__(self, rollouts: list[Rollout]) -> None:
|
||||
self.rollouts = rollouts
|
||||
DISTRIBUTIONS = ("reward", "num_total_tokens", "num_input_tokens", "num_output_tokens", "num_turns", "num_branches")
|
||||
RATES = ("is_truncated", "is_completed")
|
||||
|
||||
# Distributional metrics
|
||||
@property
|
||||
def num_total_tokens(self) -> Stat:
|
||||
return Stat([float(r.num_total_tokens) for r in self.rollouts])
|
||||
|
||||
@property
|
||||
def num_input_tokens(self) -> Stat:
|
||||
return Stat([float(r.num_input_tokens) for r in self.rollouts])
|
||||
|
||||
@property
|
||||
def num_output_tokens(self) -> Stat:
|
||||
return Stat([float(r.num_output_tokens) for r in self.rollouts])
|
||||
|
||||
@property
|
||||
def num_turns(self) -> Stat:
|
||||
return Stat([float(r.num_turns) for r in self.rollouts])
|
||||
|
||||
@property
|
||||
def num_branches(self) -> Stat:
|
||||
return Stat([float(r.num_branches) for r in self.rollouts])
|
||||
def stats(self) -> dict[str, Stat]:
|
||||
return {
|
||||
name: Stat([float(getattr(r, name)) for r in self.rollouts]) for name in (*self.DISTRIBUTIONS, *self.RATES)
|
||||
}
|
||||
|
||||
@property
|
||||
def timing(self) -> TimingMetrics:
|
||||
@@ -187,7 +188,7 @@ class RolloutMetrics:
|
||||
|
||||
@property
|
||||
def metrics(self) -> CustomMetrics:
|
||||
"""Env custom ``@metric`` outputs, keyed by name (``metrics.metrics["acc"].mean()``)."""
|
||||
"""Env custom ``@metric`` outputs, keyed by name."""
|
||||
return CustomMetrics(self.rollouts, "metrics")
|
||||
|
||||
@property
|
||||
@@ -196,22 +197,13 @@ class RolloutMetrics:
|
||||
summed into the scalar ``reward``)."""
|
||||
return CustomMetrics(self.rollouts, "rewards", value=lambda reward: reward.value)
|
||||
|
||||
# Boolean rate metrics (0/1 distributions — ``.mean()`` is the rate)
|
||||
@property
|
||||
def is_truncated(self) -> Stat:
|
||||
return Stat([float(r.is_truncated) for r in self.rollouts])
|
||||
|
||||
@property
|
||||
def is_completed(self) -> Stat:
|
||||
return Stat([float(r.is_completed) for r in self.rollouts])
|
||||
|
||||
@property
|
||||
def has_error(self) -> Stat:
|
||||
return Stat([float(r.has_error) for r in self.rollouts])
|
||||
|
||||
def stop_conditions(self) -> dict[str, float]:
|
||||
"""``generation_truncated`` over all rollouts, then each recorded ``stop_condition``'s rate
|
||||
over the rollouts that recorded one."""
|
||||
"""``generation_truncated`` over the agent's traces, then each recorded
|
||||
``stop_condition``'s rate over the traces that recorded one."""
|
||||
out = {
|
||||
"generation_truncated": sum(
|
||||
1 for r in self.rollouts if r.is_truncated and r.stop_condition != "prompt_too_long"
|
||||
@@ -224,15 +216,16 @@ class RolloutMetrics:
|
||||
return out
|
||||
|
||||
def error_types(self) -> dict[str, int]:
|
||||
"""Count of errored rollouts by error type (the rollout's last error — e.g. ``Cancelled``,
|
||||
"""Count of errored traces by error type (the trace's last error — e.g. ``Cancelled``,
|
||||
``ProviderError``)."""
|
||||
types = [r.last_error.type for r in self.rollouts if r.has_error and r.last_error is not None]
|
||||
return {t: types.count(t) for t in sorted(set(types))}
|
||||
|
||||
def solve_rates(self) -> dict[str, float]:
|
||||
"""Per-group solve rates, assuming binary 0/1 rewards (unspecified for other reward ranges):
|
||||
``solved_none`` (the group earned no reward), ``solved_all`` (every rollout scored 1.0), and
|
||||
``solved_some`` (the mixed remainder — the GRPO-signal groups)."""
|
||||
"""Per-group solve rates over the agent's traces, assuming binary 0/1 rewards (unspecified
|
||||
for other reward ranges): ``solved_none`` (the group earned no reward), ``solved_all``
|
||||
(every trace scored 1.0), and ``solved_some`` (the mixed remainder — the GRPO-signal
|
||||
groups)."""
|
||||
groups: dict = {}
|
||||
for r in self.rollouts:
|
||||
groups.setdefault(r.group_id, []).append(r)
|
||||
@@ -245,6 +238,84 @@ class RolloutMetrics:
|
||||
"solved_some": 1 - (solved_none + solved_all) / n_groups,
|
||||
}
|
||||
|
||||
def to_dict(self, prefix: str, *, subset: Subset) -> dict[str, float]:
|
||||
"""Full ``<stat>`` fan-out for the distributions; ``/mean`` only for the 0/1 rates.
|
||||
Errors live only on the ``all`` subset (``effective`` drops them by construction)."""
|
||||
stats = self.stats()
|
||||
out: dict[str, float] = {}
|
||||
for name in self.DISTRIBUTIONS:
|
||||
out |= stats[name].to_dict(f"{prefix}/{name}")
|
||||
for name in self.RATES:
|
||||
out[f"{prefix}/{name}/mean"] = stats[name].mean()
|
||||
out |= self.timing.to_dict(f"{prefix}/timing")
|
||||
out |= self.metrics.to_dict(f"{prefix}/metrics")
|
||||
out |= self.rewards.to_dict(f"{prefix}/rewards")
|
||||
if subset == "all":
|
||||
out[f"{prefix}/has_error/mean"] = self.has_error.mean()
|
||||
out |= {f"{prefix}/error/{t}": float(count) for t, count in self.error_types().items()}
|
||||
out |= {f"{prefix}/stop_condition/{k}": v for k, v in self.stop_conditions().items()}
|
||||
out |= {f"{prefix}/{k}": v for k, v in self.solve_rates().items()}
|
||||
return out
|
||||
|
||||
|
||||
class EpisodeMetrics:
|
||||
"""Metrics shared by train and eval over a rollout list. The count metrics (tokens/turns/
|
||||
branches) are episode-level — one value per episode, summing its traces — and are the only
|
||||
per-metric keys ``to_wandb`` emits at the env level; every trace-level metric is emitted per
|
||||
agent via ``by_agent()``. The boolean ``Stat`` properties (0/1 distributions, ``.mean()`` is
|
||||
the rate) serve the console log lines. ``TrainMetrics`` / ``EvalMetrics`` extend ``to_wandb``
|
||||
with the train pipeline rates and the eval scores."""
|
||||
|
||||
def __init__(self, rollouts: list[Rollout]) -> None:
|
||||
self.rollouts = rollouts
|
||||
|
||||
def episodes(self) -> list[list[Rollout]]:
|
||||
"""The subset's rollouts grouped into their episodes. A rollout without an
|
||||
``episode_id`` (legacy envs, synthesized error markers) is its own episode."""
|
||||
grouped: dict[str, list[Rollout]] = {}
|
||||
for r in self.rollouts:
|
||||
grouped.setdefault(r.episode_id or r.id, []).append(r)
|
||||
return list(grouped.values())
|
||||
|
||||
def by_agent(self) -> dict[str, TraceMetrics]:
|
||||
"""Per-agent metric views (``vf.Episode.by_agent`` over the subset's rollouts)."""
|
||||
per_agent: dict[str, list[Rollout]] = {}
|
||||
for r in self.rollouts:
|
||||
per_agent.setdefault(r.agent.name, []).append(r)
|
||||
return {name: TraceMetrics(rollouts) for name, rollouts in sorted(per_agent.items())}
|
||||
|
||||
# Episode-level count metrics: one value per episode, summing its traces — the same
|
||||
# aggregation as ``vf.Episode.num_turns`` / ``num_*_tokens``.
|
||||
@property
|
||||
def num_total_tokens(self) -> Stat:
|
||||
return Stat([float(sum(r.num_total_tokens for r in episode)) for episode in self.episodes()])
|
||||
|
||||
@property
|
||||
def num_input_tokens(self) -> Stat:
|
||||
return Stat([float(sum(r.num_input_tokens for r in episode)) for episode in self.episodes()])
|
||||
|
||||
@property
|
||||
def num_output_tokens(self) -> Stat:
|
||||
return Stat([float(sum(r.num_output_tokens for r in episode)) for episode in self.episodes()])
|
||||
|
||||
@property
|
||||
def num_turns(self) -> Stat:
|
||||
return Stat([float(sum(r.num_turns for r in episode)) for episode in self.episodes()])
|
||||
|
||||
@property
|
||||
def num_branches(self) -> Stat:
|
||||
return Stat([float(sum(r.num_branches for r in episode)) for episode in self.episodes()])
|
||||
|
||||
# Boolean rate metrics for the console log lines (0/1 distributions — ``.mean()`` is the
|
||||
# rate); to_wandb emits their per-agent counterparts instead.
|
||||
@property
|
||||
def is_truncated(self) -> Stat:
|
||||
return Stat([float(r.is_truncated) for r in self.rollouts])
|
||||
|
||||
@property
|
||||
def has_error(self) -> Stat:
|
||||
return Stat([float(r.has_error) for r in self.rollouts])
|
||||
|
||||
def to_wandb(self, *, prefix: str, subset: Subset) -> dict[str, float]:
|
||||
"""The common metric dict for one ``{prefix}/{subset}`` slice. Empty input → ``{}``."""
|
||||
if not self.rollouts:
|
||||
@@ -256,59 +327,55 @@ class RolloutMetrics:
|
||||
out |= self.num_output_tokens.to_dict(f"{p}/num_output_tokens")
|
||||
out |= self.num_turns.to_dict(f"{p}/num_turns")
|
||||
out |= self.num_branches.to_dict(f"{p}/num_branches")
|
||||
out |= self.timing.to_dict(f"{p}/timing")
|
||||
out |= self.metrics.to_dict(f"{p}/metrics")
|
||||
out |= self.rewards.to_dict(f"{p}/rewards")
|
||||
out[f"{p}/is_truncated/mean"] = self.is_truncated.mean()
|
||||
out[f"{p}/is_completed/mean"] = self.is_completed.mean()
|
||||
# errors live only on the `all` subset (effective drops them), so emit the rate + the
|
||||
# per-type counts there only
|
||||
if subset == "all":
|
||||
out[f"{p}/has_error/mean"] = self.has_error.mean()
|
||||
out |= {f"{p}/error/{t}": float(count) for t, count in self.error_types().items()}
|
||||
out |= {f"{p}/stop_condition/{k}": v for k, v in self.stop_conditions().items()}
|
||||
out |= {f"{p}/{k}": v for k, v in self.solve_rates().items()}
|
||||
for agent, agent_metrics in self.by_agent().items():
|
||||
out |= agent_metrics.to_dict(f"{p}/{agent}", subset=subset)
|
||||
return out
|
||||
|
||||
|
||||
class TrainMetrics(RolloutMetrics):
|
||||
"""Common metrics plus the reward distribution and filter-pipeline rates."""
|
||||
class TrainMetrics(EpisodeMetrics):
|
||||
"""Common metrics plus the per-agent filter-pipeline rates. ``reward`` (flat over all traces)
|
||||
serves the console log lines; the wandb reward stats are per-agent."""
|
||||
|
||||
@property
|
||||
def reward(self) -> Stat:
|
||||
return Stat([float(r.reward) for r in self.rollouts])
|
||||
|
||||
@property
|
||||
def is_trainable(self) -> Stat:
|
||||
return Stat([float(r.is_trainable) for r in self.rollouts])
|
||||
|
||||
@property
|
||||
def is_filtered(self) -> Stat:
|
||||
return Stat([float(r.is_filtered) for r in self.rollouts])
|
||||
|
||||
def filter_rates(self) -> dict[str, float]:
|
||||
"""Per-filter detection rate over all rollouts."""
|
||||
names = sorted({name for r in self.rollouts for name in r.filter_results})
|
||||
return {
|
||||
name: sum(1 for r in self.rollouts if r.filter_results.get(name)) / len(self.rollouts) for name in names
|
||||
}
|
||||
|
||||
def to_wandb(self, *, prefix: str, subset: Subset) -> dict[str, float]:
|
||||
out = super().to_wandb(prefix=prefix, subset=subset)
|
||||
if not self.rollouts:
|
||||
return out
|
||||
p = f"{prefix}/{subset}"
|
||||
out |= self.reward.to_dict(f"{p}/reward")
|
||||
out[f"{p}/is_trainable/mean"] = self.is_trainable.mean()
|
||||
out[f"{p}/is_filtered/mean"] = self.is_filtered.mean()
|
||||
out |= {f"{p}/filters/{k}/mean": v for k, v in self.filter_rates().items()}
|
||||
# The pipeline verdicts are per-trace (an untrainable seat is 0.0 throughout, and filters
|
||||
# only ever run on trainable survivors), so they read per agent like the rest.
|
||||
for agent, traces in self.by_agent().items():
|
||||
p = f"{prefix}/{subset}/{agent}"
|
||||
rollouts = traces.rollouts
|
||||
out[f"{p}/is_trainable/mean"] = sum(float(r.is_trainable) for r in rollouts) / len(rollouts)
|
||||
out[f"{p}/is_filtered/mean"] = sum(float(r.is_filtered) for r in rollouts) / len(rollouts)
|
||||
names = sorted({name for r in rollouts for name in r.filter_results})
|
||||
out |= {
|
||||
f"{p}/filters/{name}/mean": sum(1 for r in rollouts if r.filter_results.get(name)) / len(rollouts)
|
||||
for name in names
|
||||
}
|
||||
return out
|
||||
|
||||
|
||||
class EvalMetrics(RolloutMetrics):
|
||||
"""Common metrics plus the ``avg@<group_size>`` score and (on the effective subset, for
|
||||
binary-reward tasks) pass@k / pass^k. ``group_size`` (the ``avg@k`` k) is supplied by the
|
||||
container so the ``all`` and ``effective`` subsets share one stable key."""
|
||||
def pass_at_k(rollouts: list[Rollout]) -> dict[str, float]:
|
||||
"""pass@k / pass^k averaged over examples; ``{}`` for non-binary rewards."""
|
||||
rewards = [r.reward for r in rollouts]
|
||||
if not set(rewards).issubset({0.0, 1.0}):
|
||||
return {}
|
||||
by_example: dict = {}
|
||||
for r in rollouts:
|
||||
by_example.setdefault(r.group_id, []).append(r.reward)
|
||||
per_example = [compute_pass_metrics(rs) for rs in by_example.values()]
|
||||
keys = sorted({k for d in per_example for k in d})
|
||||
return {k: sum(d[k] for d in per_example if k in d) / sum(1 for d in per_example if k in d) for k in keys}
|
||||
|
||||
|
||||
class EvalMetrics(EpisodeMetrics):
|
||||
"""Common metrics plus the per-agent ``avg@<group_size>`` score and (on the effective subset,
|
||||
for binary-reward tasks) pass@k / pass^k. Both score an agent's own traces, so they live in its
|
||||
subtree like every other trace-level metric. ``group_size`` (the ``avg@k`` k, the run's rollouts
|
||||
per example) is supplied by the container so the ``all`` and ``effective`` subsets — and every
|
||||
agent — share one stable key."""
|
||||
|
||||
def __init__(self, rollouts: list[Rollout], group_size: int) -> None:
|
||||
super().__init__(rollouts)
|
||||
@@ -318,26 +385,13 @@ class EvalMetrics(RolloutMetrics):
|
||||
def reward(self) -> Stat:
|
||||
return Stat([float(r.reward) for r in self.rollouts])
|
||||
|
||||
def pass_at_k(self) -> dict[str, float]:
|
||||
"""pass@k / pass^k averaged over examples; ``{}`` for non-binary rewards."""
|
||||
rewards = [r.reward for r in self.rollouts]
|
||||
if not set(rewards).issubset({0.0, 1.0}):
|
||||
return {}
|
||||
by_example: dict = {}
|
||||
for r in self.rollouts:
|
||||
by_example.setdefault(r.group_id, []).append(r.reward)
|
||||
per_example = [compute_pass_metrics(rs) for rs in by_example.values()]
|
||||
keys = sorted({k for d in per_example for k in d})
|
||||
return {k: sum(d[k] for d in per_example if k in d) / sum(1 for d in per_example if k in d) for k in keys}
|
||||
|
||||
def to_wandb(self, *, prefix: str, subset: Subset) -> dict[str, float]:
|
||||
out = super().to_wandb(prefix=prefix, subset=subset)
|
||||
if not self.rollouts:
|
||||
return out
|
||||
p = f"{prefix}/{subset}"
|
||||
out[f"{p}/avg@{self.group_size}"] = self.reward.mean()
|
||||
if subset == "effective":
|
||||
out |= {f"{p}/{k}": v for k, v in self.pass_at_k().items()}
|
||||
for agent, traces in self.by_agent().items():
|
||||
p = f"{prefix}/{subset}/{agent}"
|
||||
out[f"{p}/avg@{self.group_size}"] = traces.stats()["reward"].mean()
|
||||
if subset == "effective":
|
||||
out |= {f"{p}/{k}": v for k, v in pass_at_k(traces.rollouts).items()}
|
||||
return out
|
||||
|
||||
|
||||
|
||||
@@ -343,8 +343,10 @@ class Orchestrator:
|
||||
|
||||
self.lora_name = config.model.lora.name if config.model.lora else None
|
||||
|
||||
self.train_source = TrainSource(self.train_envs)
|
||||
|
||||
if self.resume_step is not None and self.ckpt_manager is not None:
|
||||
self.ckpt_manager.load(self.progress, step=self.resume_step)
|
||||
self.ckpt_manager.load(self.progress, self.train_source, step=self.resume_step)
|
||||
# The checkpoint finished step ``resume_step``; resume at the next step. Derive the step
|
||||
# from ``resume_step`` (not the loaded progress.step) so it stays coordinated with the
|
||||
# trainer even when ``ckpt.skip_progress`` left the counter unrestored.
|
||||
@@ -384,7 +386,6 @@ class Orchestrator:
|
||||
self.policy.model_name = self.lora_name
|
||||
self.policy.version = sync_version
|
||||
|
||||
self.train_source = TrainSource(self.train_envs, seed=42)
|
||||
self.eval_source: EvalSource | None = (
|
||||
EvalSource(
|
||||
self.eval_envs,
|
||||
@@ -500,7 +501,7 @@ class Orchestrator:
|
||||
if self.ckpt_manager is not None and self.progress.step > 1:
|
||||
self.progress.step -= 1
|
||||
get_logger().info("Writing final checkpoint")
|
||||
self.ckpt_manager.save(self.progress, step=self.progress.step)
|
||||
self.ckpt_manager.save(self.progress, self.train_source, step=self.progress.step)
|
||||
await self.stop()
|
||||
if clean_exit:
|
||||
get_logger().success("Orchestrator finished.")
|
||||
@@ -904,7 +905,9 @@ class Orchestrator:
|
||||
return 0.0
|
||||
get_logger().info(f"Saving checkpoint at step {step}")
|
||||
t = time.perf_counter()
|
||||
await asyncio.to_thread(self.ckpt_manager.save, self.progress, step)
|
||||
# Synchronous on purpose: the payload is tiny, and snapshotting on the
|
||||
# event loop keeps the dispatcher from mutating TrainSource mid-save
|
||||
self.ckpt_manager.save(self.progress, self.train_source, step)
|
||||
return time.perf_counter() - t
|
||||
|
||||
def update_dispatch_gate(self) -> None:
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
|
||||
Weights are each env's configured ``ratio`` (default 1, i.e. equal weight
|
||||
per env). A v1 env serves the tasks the orchestrator loaded client-side: a
|
||||
finite one as a shuffled table (reshuffled on cursor exhaustion), an
|
||||
infinite one (``num_tasks is None``) straight off its generator — every
|
||||
pull is a fresh task and there are no epochs to shuffle. A legacy env's
|
||||
dataset lives on its server, so it serves shuffled task *indices*."""
|
||||
finite one as a shuffled table (reshuffled with ``seed=epoch`` on cursor
|
||||
exhaustion), an infinite one (``num_tasks is None``) straight off its
|
||||
generator — every pull is a fresh task and there are no epochs to shuffle.
|
||||
A legacy env's dataset lives on its server, so it serves shuffled task
|
||||
*indices*."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
@@ -22,51 +23,107 @@ class TrainSource:
|
||||
returns its next example (or ``None`` when the env's per-call permit
|
||||
cost doesn't fit — the dispatch loop retries when permits free up).
|
||||
Returned dicts carry ``env_name`` + ``task_idx`` (+ ``task`` for v1 envs,
|
||||
whose data is shipped to the env server at dispatch)."""
|
||||
whose data is shipped to the env server at dispatch).
|
||||
|
||||
def __init__(self, train_envs: TrainEnvs, *, seed: int | None) -> None:
|
||||
self.rng = random.Random(seed)
|
||||
The data position round-trips through a checkpoint via ``state_dict()``
|
||||
/ ``load_state_dict()``: per-env ``{epoch, cursor}`` plus the env-choice
|
||||
RNG state, making the dispatch sequence reproducible across resumes. For
|
||||
a finite env, epochs are 1-indexed and seed that epoch's shuffle; for an
|
||||
infinite env the epoch stays 1 and the cursor counts generator pulls,
|
||||
replayed on restore by fast-forwarding the generator (exact iff it's
|
||||
deterministic). Cursors advance at dispatch time (ahead of shipped
|
||||
batches), so a resume skips the tasks that were in flight at checkpoint
|
||||
time."""
|
||||
|
||||
def __init__(self, train_envs: TrainEnvs) -> None:
|
||||
self.rng = random.Random(42)
|
||||
# The drawn-but-undispatched env. A draw whose permit cost doesn't fit
|
||||
# is held here (head-of-line) rather than redrawn, so the choice stream
|
||||
# advances exactly once per dispatched example and stays reproducible.
|
||||
self.pending_env: str | None = None
|
||||
self.envs = list(train_envs)
|
||||
if not self.envs:
|
||||
raise ValueError("TrainSource needs at least one train env")
|
||||
|
||||
# A finite env's shuffled example table; ``None`` for an infinite env,
|
||||
# whose generator (``self.iters``) is pulled per example.
|
||||
# A finite env's example table in canonical order (each epoch's shuffle
|
||||
# starts from this); ``None`` for an infinite env, whose generator
|
||||
# (``self.iters``) is pulled per example.
|
||||
self.base_rows: dict[str, list[dict] | None] = {}
|
||||
self.examples: dict[str, list[dict] | None] = {}
|
||||
self.iters: dict[str, Iterator[vf.Task]] = {}
|
||||
self.epochs: dict[str, int] = {}
|
||||
self.cursors: dict[str, int] = {}
|
||||
# Group-scoring envs reserve ``group_size`` permits up front;
|
||||
# per-rollout envs need 1
|
||||
self.env_costs: dict[str, int] = {}
|
||||
for env in self.envs:
|
||||
if env.tasks is None: # legacy: sample over the index range from info()
|
||||
rows: list[dict] = [{"task_idx": i, "env_name": env.name} for i in range(env.num_tasks)]
|
||||
self.rng.shuffle(rows)
|
||||
self.examples[env.name] = rows
|
||||
rows: list[dict] | None = [{"task_idx": i, "env_name": env.name} for i in range(env.num_tasks)]
|
||||
elif env.num_tasks is None: # infinite: pull the generator per example
|
||||
self.examples[env.name] = None
|
||||
rows = None
|
||||
self.iters[env.name] = env.tasks
|
||||
else:
|
||||
rows = [{"task_idx": task.data.idx, "task": task, "env_name": env.name} for task in env.tasks]
|
||||
self.rng.shuffle(rows)
|
||||
self.examples[env.name] = rows
|
||||
self.base_rows[env.name] = rows
|
||||
self.epochs[env.name] = 1
|
||||
self.cursors[env.name] = 0
|
||||
self.examples[env.name] = self._shuffle(env.name)
|
||||
self.env_costs[env.name] = env.config.group_size if env.requires_group_scoring else 1
|
||||
|
||||
self.env_names = [e.name for e in self.envs]
|
||||
self.weights: list[float] = [float(e.config.ratio) for e in self.envs]
|
||||
|
||||
def _shuffle(self, env_name: str) -> list[dict] | None:
|
||||
"""The env's example table shuffled for its current epoch — a pure
|
||||
function of (canonical order, epoch), so a restored position replays
|
||||
the exact epoch permutation."""
|
||||
rows = self.base_rows[env_name]
|
||||
if rows is None:
|
||||
return None
|
||||
rows = rows.copy()
|
||||
random.Random(self.epochs[env_name]).shuffle(rows)
|
||||
return rows
|
||||
|
||||
def state_dict(self) -> dict:
|
||||
"""Env-choice RNG state + pending draw + per-env ``{epoch, cursor}``."""
|
||||
return {
|
||||
"rng": self.rng.getstate(),
|
||||
"pending_env": self.pending_env,
|
||||
"envs": {name: {"epoch": self.epochs[name], "cursor": self.cursors[name]} for name in self.epochs},
|
||||
}
|
||||
|
||||
def load_state_dict(self, state_dict: dict) -> None:
|
||||
self.rng.setstate(state_dict["rng"])
|
||||
pending = state_dict["pending_env"]
|
||||
self.pending_env = pending if pending in self.env_costs else None
|
||||
for name, position in state_dict["envs"].items():
|
||||
if name not in self.base_rows:
|
||||
continue
|
||||
self.epochs[name] = position["epoch"]
|
||||
self.cursors[name] = position["cursor"]
|
||||
if self.base_rows[name] is None:
|
||||
for _ in range(position["cursor"]):
|
||||
next(self.iters[name])
|
||||
else:
|
||||
self.examples[name] = self._shuffle(name)
|
||||
|
||||
def next_example(self, available_permits: int) -> dict | None:
|
||||
env_name = self.rng.choices(self.env_names, weights=self.weights, k=1)[0]
|
||||
if self.pending_env is None:
|
||||
self.pending_env = self.rng.choices(self.env_names, weights=self.weights, k=1)[0]
|
||||
env_name = self.pending_env
|
||||
if self.env_costs[env_name] > available_permits:
|
||||
return None
|
||||
self.pending_env = None
|
||||
rows = self.examples[env_name]
|
||||
cursor = self.cursors[env_name]
|
||||
if rows is None: # infinite env: pull the next generated task
|
||||
task = next(self.iters[env_name])
|
||||
self.cursors[env_name] = cursor + 1
|
||||
return {"task_idx": task.data.idx, "task": task, "env_name": env_name}
|
||||
if cursor >= len(rows):
|
||||
self.rng.shuffle(rows)
|
||||
self.epochs[env_name] += 1
|
||||
rows = self._shuffle(env_name)
|
||||
self.examples[env_name] = rows
|
||||
cursor = 0
|
||||
example = rows[cursor]
|
||||
self.cursors[env_name] = cursor + 1
|
||||
|
||||
@@ -45,7 +45,6 @@ async def setup_policy_inference_pool(*, config: OrchestratorConfig, tokenizer):
|
||||
train_client_type="renderer",
|
||||
eval_client_type="openai_chat_completions",
|
||||
renderer_config=config.renderer,
|
||||
pool_size=config.pool_size,
|
||||
)
|
||||
return renderer, inference_pool
|
||||
|
||||
|
||||
@@ -236,7 +236,7 @@ class MultiRunManager:
|
||||
with open(config_path, "rb") as f:
|
||||
config_dict = tomli.load(f)
|
||||
|
||||
from verifiers.v1.loaders import skip_plugin_install
|
||||
from verifiers.v1.utils.loaders import skip_plugin_install
|
||||
|
||||
from prime_rl.configs.orchestrator import OrchestratorConfig
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ from httpx import AsyncClient
|
||||
from openai import AsyncOpenAI
|
||||
from renderers import RendererConfig
|
||||
from tenacity import AsyncRetrying, retry, retry_if_exception, stop_after_attempt, stop_after_delay, wait_exponential
|
||||
from verifiers.v1.clients.config import EvalClientConfig, TrainClientConfig
|
||||
from verifiers.v1.configs.client import EvalClientConfig, TrainClientConfig
|
||||
|
||||
from prime_rl.configs.shared import ClientConfig
|
||||
from prime_rl.utils.logger import get_logger
|
||||
@@ -122,7 +122,6 @@ class StaticInferencePool:
|
||||
train_client_type: str = "openai_chat_completions",
|
||||
eval_client_type: str = "openai_chat_completions",
|
||||
renderer_config: RendererConfig | None = None,
|
||||
pool_size: int | None = None,
|
||||
):
|
||||
renderer_model_name = model_name if train_client_type == "renderer" else None
|
||||
self._train_clients = setup_clients(
|
||||
@@ -130,7 +129,6 @@ class StaticInferencePool:
|
||||
client_type=train_client_type,
|
||||
renderer_config=renderer_config,
|
||||
renderer_model_name=renderer_model_name,
|
||||
pool_size=pool_size,
|
||||
)
|
||||
self._eval_clients = setup_clients(client_config, client_type=eval_client_type)
|
||||
self._admin_clients = setup_admin_clients(client_config)
|
||||
@@ -195,7 +193,6 @@ async def setup_inference_pool(
|
||||
train_client_type: str = "openai_chat_completions",
|
||||
eval_client_type: str = "openai_chat_completions",
|
||||
renderer_config: RendererConfig | None = None,
|
||||
pool_size: int | None = None,
|
||||
) -> InferencePool:
|
||||
"""Create an inference pool from config (static or elastic)."""
|
||||
if client_config.is_elastic:
|
||||
@@ -207,7 +204,6 @@ async def setup_inference_pool(
|
||||
train_client_type=train_client_type,
|
||||
eval_client_type=eval_client_type,
|
||||
renderer_config=renderer_config,
|
||||
pool_size=pool_size,
|
||||
)
|
||||
|
||||
return StaticInferencePool(
|
||||
@@ -216,7 +212,6 @@ async def setup_inference_pool(
|
||||
train_client_type=train_client_type,
|
||||
eval_client_type=eval_client_type,
|
||||
renderer_config=renderer_config,
|
||||
pool_size=pool_size,
|
||||
)
|
||||
|
||||
|
||||
@@ -225,7 +220,6 @@ def setup_clients(
|
||||
client_type: str = "openai_chat_completions",
|
||||
renderer_config: RendererConfig | None = None,
|
||||
renderer_model_name: str | None = None,
|
||||
pool_size: int | None = None,
|
||||
) -> list[vf.ClientConfig]:
|
||||
"""Build one v1 client config per base URL. ``client_type``
|
||||
``renderer`` → token-in/out (``TrainClientConfig``, with the renderer the env
|
||||
@@ -237,7 +231,6 @@ def setup_clients(
|
||||
if is_renderer:
|
||||
renderer_extra = {
|
||||
"renderer": renderer_config,
|
||||
"pool_size": pool_size or 1,
|
||||
"renderer_model_name": renderer_model_name,
|
||||
}
|
||||
env_headers = {
|
||||
|
||||
@@ -116,7 +116,6 @@ class ElasticInferencePool:
|
||||
train_client_type: str = "openai_chat_completions",
|
||||
eval_client_type: str = "openai_chat_completions",
|
||||
renderer_config: RendererConfig | None = None,
|
||||
pool_size: int | None = None,
|
||||
):
|
||||
self.logger = get_logger()
|
||||
self.client_config = client_config
|
||||
@@ -129,7 +128,6 @@ class ElasticInferencePool:
|
||||
self.train_client_type = train_client_type
|
||||
self.eval_client_type = eval_client_type
|
||||
self.renderer_config = renderer_config
|
||||
self.pool_size = pool_size
|
||||
self.router_url = client_config.router_url
|
||||
|
||||
self._servers: dict[str, ServerState] = {}
|
||||
@@ -155,7 +153,6 @@ class ElasticInferencePool:
|
||||
train_client_type: str = "openai_chat_completions",
|
||||
eval_client_type: str = "openai_chat_completions",
|
||||
renderer_config: RendererConfig | None = None,
|
||||
pool_size: int | None = None,
|
||||
) -> ElasticInferencePool:
|
||||
if client_config.elastic is None:
|
||||
raise ValueError("Elastic inference pool requires elastic config")
|
||||
@@ -165,7 +162,6 @@ class ElasticInferencePool:
|
||||
train_client_type=train_client_type,
|
||||
eval_client_type=eval_client_type,
|
||||
renderer_config=renderer_config,
|
||||
pool_size=pool_size,
|
||||
)
|
||||
await pool.start()
|
||||
return pool
|
||||
@@ -211,7 +207,6 @@ class ElasticInferencePool:
|
||||
client_type=self.train_client_type,
|
||||
renderer_config=self.renderer_config,
|
||||
renderer_model_name=self.renderer_model_name,
|
||||
pool_size=self.pool_size,
|
||||
)
|
||||
if urls
|
||||
else []
|
||||
|
||||
@@ -15,7 +15,7 @@ import pyarrow as pa
|
||||
import pyarrow.parquet as pq
|
||||
from prime_cli.core.config import Config as PrimeConfig
|
||||
from transformers.tokenization_utils import PreTrainedTokenizer
|
||||
from verifiers.v1.push import trace_to_sample
|
||||
from verifiers.v1.utils.platform import trace_to_sample
|
||||
|
||||
from prime_rl.configs.orchestrator import OrchestratorConfig
|
||||
from prime_rl.configs.shared import PrimeMonitorConfig
|
||||
@@ -295,7 +295,7 @@ class PrimeMonitor(Monitor):
|
||||
"""Convert rollouts to Parquet bytes for upload. One row per rollout. The conversation
|
||||
is the unit (no prompt/completion split — meaningless mid-branch): `completion` is the
|
||||
last branch's messages and `trajectory` is one message list per branch. Shares
|
||||
`verifiers.v1.push.trace_to_sample` with verifiers' eval `--push`, so a training-run
|
||||
`verifiers.v1.utils.platform.trace_to_sample` with verifiers' eval `--push`, so a training-run
|
||||
sample and an eval sample land on the platform identically; the RFT-only columns
|
||||
(run/step/advantage/problem_id/env_name) are layered on here."""
|
||||
now = datetime.now(timezone.utc)
|
||||
|
||||
@@ -298,18 +298,22 @@ class WandbMonitor(Monitor):
|
||||
|
||||
OVERVIEW_NAME = "overview"
|
||||
|
||||
# Per-rollout metrics (as "<subset>/<metric>" under "<scope>/") shown for BOTH train and eval.
|
||||
# Quality metrics read the effective subset — the all subset includes errored rollouts, whose
|
||||
# zero values skew the distributions. has_error only exists on all (effective drops errors by
|
||||
# construction). Only the reward metrics differ — train uses "reward/mean", eval uses "avg@k",
|
||||
# each shown for the all and effective subsets — and each section builder prepends its own.
|
||||
# Rollout metrics (under "<scope>/") shown for BOTH train and eval. Quality metrics read the
|
||||
# effective subset — the all subset includes errored rollouts, whose zero values skew the
|
||||
# distributions. has_error only exists on all (effective drops errors by construction). The count
|
||||
# metrics are episode-level exact keys; the trace-level metrics (reward, truncation, errors) live
|
||||
# under the per-agent subtree, whose names are data-dependent — matched by regex, one panel per
|
||||
# agent. Only the score metric differs — train scores with "reward/mean", eval with "avg@k" (its k
|
||||
# dynamic, so also a regex) — and each section builder prepends its own.
|
||||
COMMON_METRICS = [
|
||||
"all/has_error/mean",
|
||||
"effective/is_truncated/mean",
|
||||
"effective/num_total_tokens/mean",
|
||||
"effective/num_turns/mean",
|
||||
"effective/num_branches/mean",
|
||||
]
|
||||
COMMON_REGEXES = [
|
||||
"all/[^/]+/has_error/mean",
|
||||
"effective/[^/]+/is_truncated/mean",
|
||||
]
|
||||
|
||||
STABILITY_METRICS = ["optim/grad_norm", "entropy/all/mean", "mismatch_kl/all/mean", "kl_ent_ratio/mean"]
|
||||
|
||||
@@ -350,20 +354,25 @@ def section(name: str, metrics: Sequence[str] = (), regexes: Sequence[str] = ())
|
||||
|
||||
|
||||
def train_section(name: str, scope: str) -> ws.Section:
|
||||
# Env names may carry regex metacharacters (e.g. "+"), so the scope is escaped in the
|
||||
# regex-matched per-agent panels.
|
||||
pattern = re.escape(scope)
|
||||
return section(
|
||||
name,
|
||||
metrics=[f"{scope}/all/reward/mean", f"{scope}/effective/reward/mean"]
|
||||
+ [f"{scope}/{m}" for m in COMMON_METRICS],
|
||||
metrics=[f"{scope}/{m}" for m in COMMON_METRICS],
|
||||
regexes=[f"{pattern}/all/[^/]+/reward/mean", f"{pattern}/effective/[^/]+/reward/mean"]
|
||||
+ [f"{pattern}/{r}" for r in COMMON_REGEXES],
|
||||
)
|
||||
|
||||
|
||||
def eval_section(name: str, env_pattern: str) -> ws.Section:
|
||||
# Same metrics as train, but eval's reward is "avg@k" (dynamic k → regex). Everything is a regex so
|
||||
# one section can also serve any env (env_pattern=".*").
|
||||
# Same metrics as train, but eval's reward is the per-agent "avg@k" (dynamic k → regex).
|
||||
# Everything is a regex so one section can also serve any env (env_pattern=".*").
|
||||
return section(
|
||||
name,
|
||||
regexes=[f"eval/{env_pattern}/all/avg@.*", f"eval/{env_pattern}/effective/avg@.*"]
|
||||
+ [f"eval/{env_pattern}/{m}" for m in COMMON_METRICS],
|
||||
regexes=[f"eval/{env_pattern}/all/[^/]+/avg@.*", f"eval/{env_pattern}/effective/[^/]+/avg@.*"]
|
||||
+ [f"eval/{env_pattern}/{m}" for m in COMMON_METRICS]
|
||||
+ [f"eval/{env_pattern}/{r}" for r in COMMON_REGEXES],
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import math
|
||||
from itertools import count
|
||||
from types import SimpleNamespace
|
||||
|
||||
import pytest
|
||||
@@ -7,10 +8,14 @@ import verifiers.v1 as vf
|
||||
from prime_rl.orchestrator.metrics import EvalRollouts, Stat, TrainRollouts
|
||||
from prime_rl.orchestrator.utils import compute_pass_metrics
|
||||
|
||||
_ids = count()
|
||||
|
||||
|
||||
def mk(
|
||||
reward: float = 0.0,
|
||||
*,
|
||||
episode_id: str = "",
|
||||
agent_name: str = "agent",
|
||||
num_total_tokens: int = 10,
|
||||
num_input_tokens: int = 4,
|
||||
num_output_tokens: int = 6,
|
||||
@@ -30,14 +35,18 @@ def mk(
|
||||
is_filtered: bool = False,
|
||||
filter_results: dict | None = None,
|
||||
setup: float = 0.0,
|
||||
generation: float = 0.0,
|
||||
generation_model: float = 0.0,
|
||||
generation_harness: float = 0.0,
|
||||
agent: float = 0.0,
|
||||
agent_model: float = 0.0,
|
||||
agent_harness: float = 0.0,
|
||||
finalize: float = 0.0,
|
||||
scoring: float = 0.0,
|
||||
):
|
||||
"""Duck-typed stand-in for ``Rollout``, exposing only the Trace properties the metrics read."""
|
||||
"""Duck-typed stand-in for ``Rollout``, exposing only the Trace properties the metrics read.
|
||||
Without an ``episode_id`` each rollout is its own single-trace episode (the unique ``id``
|
||||
is the grouping fallback)."""
|
||||
return SimpleNamespace(
|
||||
id=f"t{next(_ids)}",
|
||||
episode_id=episode_id,
|
||||
reward=reward,
|
||||
rewards=rewards or {},
|
||||
num_total_tokens=num_total_tokens,
|
||||
@@ -53,16 +62,16 @@ def mk(
|
||||
metrics=metrics or {},
|
||||
env_name=env_name,
|
||||
group_id=group_id,
|
||||
agent=SimpleNamespace(trainable=trainable),
|
||||
agent=SimpleNamespace(trainable=trainable, name=agent_name),
|
||||
is_trainable=is_trainable,
|
||||
is_filtered=is_filtered,
|
||||
filter_results=filter_results or {},
|
||||
timing=SimpleNamespace(
|
||||
setup=SimpleNamespace(duration=setup),
|
||||
generation=SimpleNamespace(
|
||||
duration=generation,
|
||||
model=SimpleNamespace(duration=generation_model),
|
||||
harness=SimpleNamespace(duration=generation_harness),
|
||||
agent=SimpleNamespace(
|
||||
duration=agent,
|
||||
model=SimpleNamespace(duration=agent_model),
|
||||
harness=SimpleNamespace(duration=agent_harness),
|
||||
),
|
||||
finalize=SimpleNamespace(duration=finalize),
|
||||
scoring=SimpleNamespace(duration=scoring),
|
||||
@@ -105,20 +114,60 @@ def test_to_wandb_distributions():
|
||||
).metrics
|
||||
assert m.num_input_tokens.mean() == 5.0 # fluent Stat access
|
||||
out = m.to_wandb(prefix="train/agg", subset="all")
|
||||
assert out["train/agg/all/reward/mean"] == 0.5
|
||||
assert out["train/agg/all/agent/reward/mean"] == 0.5
|
||||
assert "train/agg/all/reward/mean" not in out # trace-level metrics are agent-only
|
||||
assert out["train/agg/all/num_total_tokens/mean"] == 15.0
|
||||
assert out["train/agg/all/num_total_tokens/max"] == 20.0 # flat over rollouts, not per-group
|
||||
assert out["train/agg/all/num_total_tokens/max"] == 20.0 # single-trace episodes: one value per rollout
|
||||
assert out["train/agg/all/num_input_tokens/mean"] == 5.0
|
||||
assert out["train/agg/all/num_output_tokens/mean"] == 6.0
|
||||
|
||||
|
||||
def test_episode_and_agent_levels():
|
||||
# Two proposer-solver episodes: one proposer + two solvers each (the solver fan-out).
|
||||
rollouts = [
|
||||
mk(reward=1.0, num_turns=1, agent_name="proposer", episode_id="e1"),
|
||||
mk(reward=0.0, num_turns=2, agent_name="solver", episode_id="e1"),
|
||||
mk(reward=1.0, num_turns=4, agent_name="solver", episode_id="e1"),
|
||||
mk(reward=0.0, num_turns=3, agent_name="proposer", episode_id="e2"),
|
||||
mk(reward=1.0, num_turns=6, agent_name="solver", episode_id="e2"),
|
||||
mk(reward=0.0, num_turns=8, agent_name="solver", episode_id="e2"),
|
||||
]
|
||||
m = TrainRollouts(rollouts).metrics
|
||||
assert m.num_turns.mean() == 12.0 # episode-level sums: 1+2+4 and 3+6+8
|
||||
assert m.num_total_tokens.values == [30.0, 30.0] # summed across the episode's traces
|
||||
out = m.to_wandb(prefix="train/agg", subset="all")
|
||||
assert out["train/agg/all/num_turns/mean"] == 12.0
|
||||
assert out["train/agg/all/proposer/num_turns/mean"] == 2.0 # (1 + 3) / 2
|
||||
assert out["train/agg/all/solver/num_turns/mean"] == 5.0 # flat over the 4 solver traces
|
||||
assert out["train/agg/all/solver/num_turns/max"] == 8.0 # a real trace, not an episode mean
|
||||
assert out["train/agg/all/solver/reward/mean"] == 0.5
|
||||
assert out["train/agg/all/proposer/is_truncated/mean"] == 0.0
|
||||
assert "train/agg/all/proposer/is_truncated/p90" not in out # rates emit /mean only
|
||||
assert "train/agg/all/reward/mean" not in out # reward never pools across agents
|
||||
|
||||
|
||||
def test_agent_metrics_are_flat_over_traces():
|
||||
"""Inside a seat the trace is the unit of aggregation, so an uneven fan-out (one solver trace
|
||||
from this episode, three from that) never reweights anything: every agent-level metric is the
|
||||
plain figure over that agent's rollouts."""
|
||||
rollouts = [
|
||||
mk(agent_name="solver", episode_id="e1", is_truncated=True, reward=1.0),
|
||||
*[mk(agent_name="solver", episode_id="e2", is_truncated=False, reward=0.0) for _ in range(3)],
|
||||
]
|
||||
out = TrainRollouts(rollouts).metrics.to_wandb(prefix="train/agg", subset="all")
|
||||
assert out["train/agg/all/solver/is_truncated/mean"] == 0.25 # 1 of 4 traces, not (1.0 + 0.0) / 2
|
||||
assert out["train/agg/all/solver/is_completed/mean"] == 1.0
|
||||
assert out["train/agg/all/solver/is_trainable/mean"] == 1.0 # sibling rates agree
|
||||
assert out["train/agg/all/solver/reward/mean"] == 0.25 # 1 of 4 traces scored, not (1.0 + 0.0) / 2
|
||||
|
||||
|
||||
def test_boolean_rates_and_error_breakdown_all_only():
|
||||
rc = TrainRollouts([mk(is_truncated=True), mk(has_error=True, error_type="ProviderError"), mk(is_filtered=True)])
|
||||
out = rc.metrics.to_wandb(prefix="train/agg", subset="all")
|
||||
assert out["train/agg/all/is_truncated/mean"] == 1 / 3
|
||||
assert out["train/agg/all/is_completed/mean"] == 1.0
|
||||
assert out["train/agg/all/has_error/mean"] == 1 / 3
|
||||
assert out["train/agg/all/error/ProviderError"] == 1 # error-type breakdown by count
|
||||
assert out["train/agg/all/agent/is_truncated/mean"] == 1 / 3
|
||||
assert out["train/agg/all/agent/is_completed/mean"] == 1.0
|
||||
assert out["train/agg/all/agent/has_error/mean"] == 1 / 3
|
||||
assert out["train/agg/all/agent/error/ProviderError"] == 1 # error-type breakdown by count
|
||||
assert not any("no_response" in k for k in out) # removed metric
|
||||
# has_error + the error-type counts are structurally empty on effective, so emitted on `all` only
|
||||
eff = rc.effective.metrics.to_wandb(prefix="train/agg", subset="effective")
|
||||
@@ -128,42 +177,59 @@ def test_boolean_rates_and_error_breakdown_all_only():
|
||||
def test_solve_rates():
|
||||
groups = {"A": [1.0, 1.0], "B": [0.0, 0.0], "C": [1.0, 0.0], "D": [1.0, 0.0]} # all / none / some / some
|
||||
out = train_wandb([mk(reward=r, group_id=g) for g, rs in groups.items() for r in rs])
|
||||
rates = (out["train/agg/all/solved_all"], out["train/agg/all/solved_none"], out["train/agg/all/solved_some"])
|
||||
rates = (
|
||||
out["train/agg/all/agent/solved_all"],
|
||||
out["train/agg/all/agent/solved_none"],
|
||||
out["train/agg/all/agent/solved_some"],
|
||||
)
|
||||
assert rates == (0.25, 0.25, 0.5)
|
||||
|
||||
|
||||
def test_stop_condition_breakdown():
|
||||
truncated = [mk(is_truncated=True, stop_condition=c) for c in ("length", "max_turns", "prompt_too_long")]
|
||||
out = train_wandb(truncated + [mk(stop_condition=None)])
|
||||
assert out["train/agg/all/stop_condition/generation_truncated"] == 0.5 # truncated & not prompt_too_long, over all
|
||||
assert out["train/agg/all/stop_condition/length"] == 1 / 3 # over the 3 recorded conditions
|
||||
assert out["train/agg/all/stop_condition/prompt_too_long"] == 1 / 3
|
||||
assert out["train/agg/all/agent/stop_condition/generation_truncated"] == 0.5 # truncated & not prompt_too_long
|
||||
assert out["train/agg/all/agent/stop_condition/length"] == 1 / 3 # over the 3 recorded conditions
|
||||
assert out["train/agg/all/agent/stop_condition/prompt_too_long"] == 1 / 3
|
||||
|
||||
|
||||
def test_nested_metrics_and_rewards():
|
||||
rollouts = [
|
||||
mk(metrics={"acc": 1.0}, rewards={"correct": vf.Reward(score=1.0), "format": vf.Reward(score=0.0)}),
|
||||
mk(metrics={"acc": 3.0, "fmt": 5.0}, rewards={"correct": vf.Reward(score=0.0), "format": vf.Reward(score=1.0)}),
|
||||
# scoring failed after seeding: unscored (None) entries count as 0.0 on `all`
|
||||
mk(has_error=True, metrics={"acc": None}, rewards={"correct": None, "format": None}),
|
||||
]
|
||||
m = TrainRollouts(rollouts).metrics
|
||||
assert m.metrics["acc"].mean() == 2.0 and m.rewards["correct"].mean() == 0.5 # nested group access
|
||||
rc = TrainRollouts(rollouts)
|
||||
m = rc.metrics
|
||||
agent = m.by_agent()["agent"]
|
||||
assert agent.metrics["acc"].mean() == pytest.approx(4 / 3) # nested group access
|
||||
assert agent.rewards["correct"].mean() == pytest.approx(1 / 3)
|
||||
out = m.to_wandb(prefix="train/agg", subset="all")
|
||||
assert out["train/agg/all/metrics/acc/mean"] == 2.0 # averaged over reporters
|
||||
assert out["train/agg/all/metrics/fmt/mean"] == 5.0 # single reporter
|
||||
assert out["train/agg/all/rewards/format/mean"] == 0.5
|
||||
assert out["train/agg/all/agent/metrics/acc/mean"] == pytest.approx(4 / 3)
|
||||
assert out["train/agg/all/agent/metrics/fmt/mean"] == 5.0 # single reporter
|
||||
assert out["train/agg/all/agent/rewards/format/mean"] == pytest.approx(1 / 3)
|
||||
# effective drops the errored rollout, so its seeds don't dilute the effective means
|
||||
eff = rc.effective.metrics.to_wandb(prefix="train/agg", subset="effective")
|
||||
assert eff["train/agg/effective/agent/metrics/acc/mean"] == 2.0
|
||||
assert eff["train/agg/effective/agent/rewards/format/mean"] == 0.5
|
||||
# cross-env agg: another env's unscored trace carries different keys, so it can't dilute these
|
||||
other = mk(env_name="other", has_error=True, rewards={"solved": None})
|
||||
agg = TrainRollouts(rollouts + [other]).metrics.to_wandb(prefix="train/agg", subset="all")
|
||||
assert agg["train/agg/all/agent/rewards/format/mean"] == pytest.approx(1 / 3)
|
||||
assert agg["train/agg/all/agent/rewards/solved/mean"] == 0.0
|
||||
|
||||
|
||||
def test_nested_timing():
|
||||
m = TrainRollouts(
|
||||
[mk(setup=1.0, generation=2.0, generation_model=1.5, generation_harness=0.5, finalize=0.5, scoring=0.5)]
|
||||
).metrics
|
||||
assert m.timing.setup.mean() == 1.0 and m.timing.total.mean() == 4.0 # total sums all four phases
|
||||
assert m.timing.generation_model.mean() == 1.5 and m.timing.generation_harness.mean() == 0.5
|
||||
m = TrainRollouts([mk(setup=1.0, agent=2.0, agent_model=1.5, agent_harness=0.5, finalize=0.5, scoring=0.5)]).metrics
|
||||
timing = m.by_agent()["agent"].timing
|
||||
assert timing.setup.mean() == 1.0 and timing.total.mean() == 4.0 # total sums all four phases
|
||||
assert timing.agent_model.mean() == 1.5 and timing.agent_harness.mean() == 0.5
|
||||
out = m.to_wandb(prefix="train/agg", subset="all")
|
||||
assert out["train/agg/all/timing/setup/mean"] == 1.0
|
||||
assert out["train/agg/all/timing/total/mean"] == 4.0
|
||||
assert out["train/agg/all/timing/generation/model/mean"] == 1.5
|
||||
assert out["train/agg/all/timing/generation/harness/mean"] == 0.5
|
||||
assert out["train/agg/all/agent/timing/setup/mean"] == 1.0
|
||||
assert out["train/agg/all/agent/timing/total/mean"] == 4.0
|
||||
assert out["train/agg/all/agent/timing/agent/model/mean"] == 1.5
|
||||
assert out["train/agg/all/agent/timing/agent/harness/mean"] == 0.5
|
||||
|
||||
|
||||
def test_train_only_metrics_absent_from_eval():
|
||||
@@ -172,9 +238,10 @@ def test_train_only_metrics_absent_from_eval():
|
||||
mk(is_trainable=False, filter_results={"gibberish": False}),
|
||||
]
|
||||
out = train_wandb(rollouts)
|
||||
assert out["train/agg/all/is_trainable/mean"] == 0.5
|
||||
assert out["train/agg/all/is_filtered/mean"] == 0.5
|
||||
assert out["train/agg/all/filters/gibberish/mean"] == 0.5
|
||||
assert out["train/agg/all/agent/is_trainable/mean"] == 0.5
|
||||
assert out["train/agg/all/agent/is_filtered/mean"] == 0.5
|
||||
assert out["train/agg/all/agent/filters/gibberish/mean"] == 0.5
|
||||
assert "train/agg/all/is_trainable/mean" not in out # pipeline verdicts are per-trace
|
||||
eval_out = EvalRollouts(rollouts).metrics.to_wandb(prefix="eval/x", subset="all")
|
||||
assert not any("is_trainable" in k or "is_filtered" in k or "/filters/" in k for k in eval_out)
|
||||
|
||||
@@ -182,11 +249,11 @@ def test_train_only_metrics_absent_from_eval():
|
||||
def test_eval_avg_at_k_and_pass_k():
|
||||
binary = EvalRollouts([mk(reward=1.0, group_id="g0"), mk(reward=0.0, group_id="g0")])
|
||||
eff = binary.effective.metrics.to_wandb(prefix="eval/x", subset="effective")
|
||||
assert eff["eval/x/effective/avg@2"] == 0.5 # mean reward under avg@<k> (k derived from the groups)
|
||||
assert not any(k.startswith("eval/x/effective/reward") for k in eff)
|
||||
assert eff["eval/x/effective/pass@1"] == 0.5 and eff["eval/x/effective/pass^2"] == 0.0
|
||||
assert eff["eval/x/effective/agent/avg@2"] == 0.5 # mean reward under avg@<k> (k from the groups)
|
||||
assert "eval/x/effective/avg@2" not in eff # scores are per-agent, never pooled
|
||||
assert eff["eval/x/effective/agent/pass@1"] == 0.5 and eff["eval/x/effective/agent/pass^2"] == 0.0
|
||||
all_out = binary.metrics.to_wandb(prefix="eval/x", subset="all")
|
||||
assert all_out["eval/x/all/avg@2"] == 0.5
|
||||
assert all_out["eval/x/all/agent/avg@2"] == 0.5
|
||||
assert not any("pass@" in k or "pass^" in k for k in all_out) # pass@k effective-only
|
||||
non_binary = EvalRollouts([mk(reward=0.5, group_id="g0"), mk(reward=1.0, group_id="g0")])
|
||||
assert not any("pass@" in k for k in non_binary.effective.metrics.to_wandb(prefix="eval/x", subset="effective"))
|
||||
|
||||
@@ -17,7 +17,6 @@ def test_setup_policy_inference_pool_uses_renderer_when_enabled():
|
||||
name="policy-model",
|
||||
),
|
||||
renderer=renderer_settings,
|
||||
pool_size=None,
|
||||
any_policy_sourced=True,
|
||||
)
|
||||
renderer = object()
|
||||
@@ -44,7 +43,6 @@ def test_setup_policy_inference_pool_uses_renderer_when_enabled():
|
||||
train_client_type="renderer",
|
||||
eval_client_type="openai_chat_completions",
|
||||
renderer_config=renderer_settings,
|
||||
pool_size=None,
|
||||
)
|
||||
|
||||
asyncio.run(run())
|
||||
@@ -65,7 +63,6 @@ def test_setup_policy_inference_pool_keeps_renderer_without_policy_sampling():
|
||||
name="policy-model",
|
||||
),
|
||||
renderer=renderer_settings,
|
||||
pool_size=None,
|
||||
any_policy_sourced=False,
|
||||
)
|
||||
renderer = object()
|
||||
@@ -92,7 +89,6 @@ def test_setup_policy_inference_pool_keeps_renderer_without_policy_sampling():
|
||||
train_client_type="renderer",
|
||||
eval_client_type="openai_chat_completions",
|
||||
renderer_config=renderer_settings,
|
||||
pool_size=None,
|
||||
)
|
||||
|
||||
asyncio.run(run())
|
||||
|
||||
@@ -3,7 +3,7 @@ from pathlib import Path
|
||||
from unittest.mock import AsyncMock, MagicMock, patch
|
||||
|
||||
import httpx
|
||||
from verifiers.v1.clients.config import EvalClientConfig
|
||||
from verifiers.v1.configs.client import EvalClientConfig
|
||||
|
||||
from prime_rl.configs.shared import ClientConfig
|
||||
from prime_rl.utils.client import _is_retryable_lora_error, check_health, load_lora_adapter, setup_clients
|
||||
|
||||
@@ -4,7 +4,7 @@ from pathlib import Path
|
||||
from unittest.mock import AsyncMock, MagicMock, patch
|
||||
|
||||
import httpx
|
||||
from verifiers.v1.clients.config import TrainClientConfig
|
||||
from verifiers.v1.configs.client import TrainClientConfig
|
||||
|
||||
from prime_rl.utils.elastic import (
|
||||
AdapterState,
|
||||
|
||||
@@ -11,7 +11,7 @@ supported-markers = [
|
||||
]
|
||||
|
||||
[options]
|
||||
exclude-newer = "2026-07-23T19:34:50.942572Z"
|
||||
exclude-newer = "0001-01-01T00:00:00Z" # This has no effect and is included for backwards compatibility when using relative exclude-newer values.
|
||||
exclude-newer-span = "P7D"
|
||||
|
||||
[options.exclude-newer-package]
|
||||
@@ -51,12 +51,14 @@ members = [
|
||||
"color-codeword-v1",
|
||||
"compact",
|
||||
"deepdive-v1",
|
||||
"deepseek-prover-v1",
|
||||
"deepwiki-v1",
|
||||
"enterprise-ops-gym-v1",
|
||||
"forth-lang-v1",
|
||||
"frontierscience-v1",
|
||||
"general-agent-v1",
|
||||
"glossary-v1",
|
||||
"goedel-pset-v1",
|
||||
"gpqa-v1",
|
||||
"graphwalks-v1",
|
||||
"gsm8k-v1",
|
||||
@@ -68,8 +70,8 @@ members = [
|
||||
"i3-science-v1",
|
||||
"ifbench-v1",
|
||||
"ifeval-v1",
|
||||
"kimina-v1",
|
||||
"kuhn-poker-v1",
|
||||
"lean-v1",
|
||||
"livecodebench-v1",
|
||||
"longbenchpro-v1",
|
||||
"longcot-mini-v1",
|
||||
@@ -78,12 +80,14 @@ members = [
|
||||
"math-env-v1",
|
||||
"math500-v1",
|
||||
"mcp-atlas-v1",
|
||||
"minif2f-v1",
|
||||
"mmlu-pro-v1",
|
||||
"mmmu-pro-v1",
|
||||
"mmmu-v1",
|
||||
"mrcr-v2-v1",
|
||||
"multiswe-v1",
|
||||
"nl2repobench-v1",
|
||||
"numina-v1",
|
||||
"oolong-pairs-v1",
|
||||
"oolong-real-v1",
|
||||
"oolong-synth-v1",
|
||||
@@ -98,6 +102,7 @@ members = [
|
||||
"programbench-v1",
|
||||
"prolog-v1",
|
||||
"proposer-solver-v1",
|
||||
"proverbench-v1",
|
||||
"r2e-gym-v1",
|
||||
"redsearcher-v1",
|
||||
"reverse-text-v1",
|
||||
@@ -122,6 +127,7 @@ members = [
|
||||
"unscramble-v1",
|
||||
"uuid-ctf-v1",
|
||||
"verbatim-copy-v1",
|
||||
"virl39k-v1",
|
||||
"wideseek-v1",
|
||||
"wiki-search-v1",
|
||||
"wikispeedia-v1",
|
||||
@@ -484,7 +490,7 @@ requires-dist = [
|
||||
{ name = "datasets" },
|
||||
{ name = "mcp", specifier = "<2" },
|
||||
{ name = "openai" },
|
||||
{ name = "verifiers", specifier = ">=0.2.1" },
|
||||
{ name = "verifiers", specifier = ">=0.2.2.dev65" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -608,7 +614,7 @@ dependencies = [
|
||||
requires-dist = [
|
||||
{ name = "bfcl-eval", git = "https://github.com/mikasenghaas/gorilla.git?subdirectory=berkeley-function-call-leaderboard&rev=898763a" },
|
||||
{ name = "soundfile", specifier = ">=0.13.0" },
|
||||
{ name = "verifiers", specifier = ">=0.2.2.dev21" },
|
||||
{ name = "verifiers", specifier = ">=0.2.2.dev65" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -730,7 +736,7 @@ requires-dist = [
|
||||
{ name = "openai" },
|
||||
{ name = "pystemmer" },
|
||||
{ name = "tokenizers" },
|
||||
{ name = "verifiers", specifier = ">=0.2.0" },
|
||||
{ name = "verifiers", specifier = ">=0.2.2.dev65" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1413,6 +1419,21 @@ dependencies = [
|
||||
requires-dist = [
|
||||
{ name = "datasets" },
|
||||
{ name = "openai" },
|
||||
{ name = "verifiers", specifier = ">=0.2.2.dev65" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "deepseek-prover-v1"
|
||||
version = "0.1.0"
|
||||
source = { editable = "deps/research-environments/environments/lean/deepseek_prover_v1" }
|
||||
dependencies = [
|
||||
{ name = "datasets", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "verifiers", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [
|
||||
{ name = "datasets", specifier = ">=2.0.0" },
|
||||
{ name = "verifiers", specifier = ">=0.2.0" },
|
||||
]
|
||||
|
||||
@@ -1604,7 +1625,7 @@ dependencies = [
|
||||
[package.metadata]
|
||||
requires-dist = [
|
||||
{ name = "datasets", specifier = ">=4.0.0,<5" },
|
||||
{ name = "verifiers", specifier = ">=0.2.0" },
|
||||
{ name = "verifiers", specifier = ">=0.2.2.dev65" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1973,7 +1994,7 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "forth-lang-v1"
|
||||
version = "0.1.0"
|
||||
version = "0.2.0"
|
||||
source = { editable = "deps/research-environments/environments/code/forth_lang_v1" }
|
||||
dependencies = [
|
||||
{ name = "datasets", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
@@ -1983,7 +2004,7 @@ dependencies = [
|
||||
[package.metadata]
|
||||
requires-dist = [
|
||||
{ name = "datasets" },
|
||||
{ name = "verifiers", specifier = ">=0.2.0" },
|
||||
{ name = "verifiers", specifier = ">=0.2.2.dev65" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2056,7 +2077,7 @@ dependencies = [
|
||||
[package.metadata]
|
||||
requires-dist = [
|
||||
{ name = "pydantic" },
|
||||
{ name = "verifiers", extras = ["harbor"], specifier = ">=0.2.0" },
|
||||
{ name = "verifiers", extras = ["harbor"], specifier = ">=0.2.2.dev65" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2130,6 +2151,21 @@ dependencies = [
|
||||
[package.metadata]
|
||||
requires-dist = [{ name = "verifiers" }]
|
||||
|
||||
[[package]]
|
||||
name = "goedel-pset-v1"
|
||||
version = "0.1.0"
|
||||
source = { editable = "deps/research-environments/environments/lean/goedel_pset_v1" }
|
||||
dependencies = [
|
||||
{ name = "datasets", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "verifiers", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [
|
||||
{ name = "datasets", specifier = ">=2.0.0" },
|
||||
{ name = "verifiers", specifier = ">=0.2.0" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "google-auth"
|
||||
version = "2.55.0"
|
||||
@@ -2429,7 +2465,7 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "hle-v1"
|
||||
version = "0.2.0"
|
||||
version = "0.3.0"
|
||||
source = { editable = "deps/research-environments/environments/knowledge/hle_v1" }
|
||||
dependencies = [
|
||||
{ name = "datasets", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
@@ -3177,6 +3213,21 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/81/db/e655086b7f3a705df045bf0933bdd9c2f79bb3c97bfef1384598bb79a217/keyring-25.7.0-py3-none-any.whl", hash = "sha256:be4a0b195f149690c166e850609a477c532ddbfbaed96a404d4e43f8d5e2689f", size = 39160, upload-time = "2025-11-16T16:26:08.402Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "kimina-v1"
|
||||
version = "0.1.0"
|
||||
source = { editable = "deps/research-environments/environments/lean/kimina_v1" }
|
||||
dependencies = [
|
||||
{ name = "datasets", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "verifiers", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [
|
||||
{ name = "datasets", specifier = ">=2.0.0" },
|
||||
{ name = "verifiers", specifier = ">=0.2.0" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "kiwisolver"
|
||||
version = "1.5.0"
|
||||
@@ -3272,21 +3323,6 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/e9/61/f75cd1fa54d8434276126034aed54dd120747de9a8fa013cdd79545ccbeb/latex2sympy2_extended-1.11.0-py3-none-any.whl", hash = "sha256:aebb77d52ce269e25028e4bea89ddb14d242ba36bcf7b636496fb5fd9728d234", size = 209050, upload-time = "2026-01-10T01:43:19.458Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lean-v1"
|
||||
version = "0.1.0"
|
||||
source = { editable = "deps/research-environments/environments/math/lean_v1" }
|
||||
dependencies = [
|
||||
{ name = "datasets", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "verifiers", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [
|
||||
{ name = "datasets", specifier = ">=2.0.0" },
|
||||
{ name = "verifiers", specifier = ">=0.2.0" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "linkify-it-py"
|
||||
version = "2.1.0"
|
||||
@@ -3632,7 +3668,7 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "mcp-atlas-v1"
|
||||
version = "0.2.0"
|
||||
version = "0.3.0"
|
||||
source = { editable = "deps/research-environments/environments/tool_use/mcp_atlas_v1" }
|
||||
dependencies = [
|
||||
{ name = "datasets", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
@@ -3646,7 +3682,7 @@ requires-dist = [
|
||||
{ name = "datasets", specifier = ">=4.0.0,<5" },
|
||||
{ name = "httpx" },
|
||||
{ name = "prime-sandboxes", specifier = ">=0.2.19" },
|
||||
{ name = "verifiers", specifier = ">=0.2.0" },
|
||||
{ name = "verifiers", specifier = ">=0.2.2.dev65" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3670,6 +3706,21 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/b3/38/89ba8ad64ae25be8de66a6d463314cf1eb366222074cfda9ee839c56a4b4/mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8", size = 9979, upload-time = "2022-08-14T12:40:09.779Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "minif2f-v1"
|
||||
version = "0.1.0"
|
||||
source = { editable = "deps/research-environments/environments/lean/minif2f_v1" }
|
||||
dependencies = [
|
||||
{ name = "datasets", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "verifiers", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [
|
||||
{ name = "datasets", specifier = ">=2.0.0" },
|
||||
{ name = "verifiers", specifier = ">=0.2.0" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "mistral-common"
|
||||
version = "1.11.7"
|
||||
@@ -4155,6 +4206,21 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/0c/61/ce753a1d7646dd477e16d15e89473703faebb8995d2f71d7ad69a540b565/numba-0.65.0-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:da8e371e328c06d0010c3d8b44b21858652831b85bcfba78cb22c042e22dbd8e", size = 3501622, upload-time = "2026-04-01T03:51:36.348Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "numina-v1"
|
||||
version = "0.1.0"
|
||||
source = { editable = "deps/research-environments/environments/lean/numina_v1" }
|
||||
dependencies = [
|
||||
{ name = "datasets", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "verifiers", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [
|
||||
{ name = "datasets", specifier = ">=2.0.0" },
|
||||
{ name = "verifiers", specifier = ">=0.2.0" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "numpy"
|
||||
version = "2.3.5"
|
||||
@@ -4593,7 +4659,7 @@ dependencies = [
|
||||
[package.metadata]
|
||||
requires-dist = [
|
||||
{ name = "datasets" },
|
||||
{ name = "verifiers", specifier = ">=0.2.0" },
|
||||
{ name = "verifiers", specifier = ">=0.2.2.dev65" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4743,11 +4809,11 @@ name = "openthoughts-tblite-v1"
|
||||
version = "0.1.1"
|
||||
source = { editable = "deps/research-environments/environments/terminal/openthoughts_tblite_v1" }
|
||||
dependencies = [
|
||||
{ name = "verifiers", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "verifiers", extra = ["harbor"], marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [{ name = "verifiers", specifier = ">=0.2.1" }]
|
||||
requires-dist = [{ name = "verifiers", extras = ["harbor"], specifier = ">=0.2.1" }]
|
||||
|
||||
[[package]]
|
||||
name = "orderly-set"
|
||||
@@ -4828,7 +4894,7 @@ dependencies = [
|
||||
requires-dist = [
|
||||
{ name = "datasets" },
|
||||
{ name = "openai" },
|
||||
{ name = "verifiers", specifier = ">=0.2.0" },
|
||||
{ name = "verifiers", specifier = ">=0.2.2.dev65" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4924,7 +4990,7 @@ requires-dist = [
|
||||
{ name = "openai" },
|
||||
{ name = "prime-sandboxes", specifier = ">=0.2.19" },
|
||||
{ name = "pyyaml", specifier = ">=6.0.1" },
|
||||
{ name = "verifiers", specifier = ">=0.2.0" },
|
||||
{ name = "verifiers", specifier = ">=0.2.2.dev65" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -5286,7 +5352,7 @@ requires-dist = [
|
||||
{ name = "renderers", specifier = ">=0.1.9.dev10" },
|
||||
{ name = "tomli", specifier = ">=2.2.1" },
|
||||
{ name = "tomli-w", specifier = ">=1.2.0" },
|
||||
{ name = "verifiers", specifier = ">=0.2.2.dev43" },
|
||||
{ name = "verifiers", specifier = ">=0.2.2.dev73" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -5362,7 +5428,7 @@ requires-dist = [
|
||||
|
||||
[[package]]
|
||||
name = "prolog-v1"
|
||||
version = "0.4.0"
|
||||
version = "0.5.0"
|
||||
source = { editable = "deps/research-environments/environments/reasoning/prolog_v1" }
|
||||
dependencies = [
|
||||
{ name = "verifiers", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
@@ -5440,6 +5506,21 @@ wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/c4/72/02445137af02769918a93807b2b7890047c32bfb9f90371cbc12688819eb/protobuf-6.33.6-py3-none-any.whl", hash = "sha256:77179e006c476e69bf8e8ce866640091ec42e1beb80b213c3900006ecfba6901", size = 170656, upload-time = "2026-03-18T19:04:59.826Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proverbench-v1"
|
||||
version = "0.1.0"
|
||||
source = { editable = "deps/research-environments/environments/lean/proverbench_v1" }
|
||||
dependencies = [
|
||||
{ name = "datasets", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "verifiers", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [
|
||||
{ name = "datasets", specifier = ">=2.0.0" },
|
||||
{ name = "verifiers", specifier = ">=0.2.0" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "psutil"
|
||||
version = "7.2.2"
|
||||
@@ -6058,7 +6139,7 @@ dependencies = [
|
||||
[package.metadata]
|
||||
requires-dist = [
|
||||
{ name = "datasets" },
|
||||
{ name = "verifiers", specifier = ">=0.2.0" },
|
||||
{ name = "verifiers", specifier = ">=0.2.2.dev65" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -6259,7 +6340,7 @@ dependencies = [
|
||||
[package.metadata]
|
||||
requires-dist = [
|
||||
{ name = "huggingface-hub" },
|
||||
{ name = "verifiers", specifier = ">=0.2.0" },
|
||||
{ name = "verifiers", specifier = ">=0.2.2.dev65" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -6328,7 +6409,7 @@ wheels = [
|
||||
|
||||
[[package]]
|
||||
name = "scicode-v1"
|
||||
version = "0.2.0"
|
||||
version = "0.3.0"
|
||||
source = { editable = "deps/research-environments/environments/code/scicode_v1" }
|
||||
dependencies = [
|
||||
{ name = "datasets", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
@@ -6338,7 +6419,7 @@ dependencies = [
|
||||
[package.metadata]
|
||||
requires-dist = [
|
||||
{ name = "datasets" },
|
||||
{ name = "verifiers", specifier = ">=0.2.0" },
|
||||
{ name = "verifiers", specifier = ">=0.2.2.dev65" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -6429,7 +6510,7 @@ dependencies = [
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [{ name = "verifiers", extras = ["harbor"], specifier = ">=0.2.2.dev27" }]
|
||||
requires-dist = [{ name = "verifiers", extras = ["harbor"], specifier = ">=0.2.2.dev65" }]
|
||||
|
||||
[[package]]
|
||||
name = "sentence-transformers"
|
||||
@@ -6847,29 +6928,29 @@ dependencies = [
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [{ name = "verifiers", extras = ["harbor"], specifier = ">=0.2.2.dev27" }]
|
||||
requires-dist = [{ name = "verifiers", extras = ["harbor"], specifier = ">=0.2.2.dev65" }]
|
||||
|
||||
[[package]]
|
||||
name = "swebench-pro-v1"
|
||||
version = "0.1.0"
|
||||
source = { editable = "deps/research-environments/environments/swe/swebench_pro_v1" }
|
||||
dependencies = [
|
||||
{ name = "verifiers", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "verifiers", extra = ["harbor"], marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [{ name = "verifiers", specifier = ">=0.2.2.dev27" }]
|
||||
requires-dist = [{ name = "verifiers", extras = ["harbor"], specifier = ">=0.2.2.dev27" }]
|
||||
|
||||
[[package]]
|
||||
name = "swebench-verified-v1"
|
||||
version = "0.1.0"
|
||||
source = { editable = "deps/research-environments/environments/swe/swebench_verified_v1" }
|
||||
dependencies = [
|
||||
{ name = "verifiers", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "verifiers", extra = ["harbor"], marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [{ name = "verifiers", specifier = ">=0.2.2.dev27" }]
|
||||
requires-dist = [{ name = "verifiers", extras = ["harbor"], specifier = ">=0.2.2.dev65" }]
|
||||
|
||||
[[package]]
|
||||
name = "swelego-v1"
|
||||
@@ -7059,11 +7140,11 @@ name = "terminal-bench-2-v1"
|
||||
version = "0.1.0"
|
||||
source = { editable = "deps/research-environments/environments/terminal/terminal_bench_2_v1" }
|
||||
dependencies = [
|
||||
{ name = "verifiers", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "verifiers", extra = ["harbor"], marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [{ name = "verifiers", specifier = ">=0.2.1" }]
|
||||
requires-dist = [{ name = "verifiers", extras = ["harbor"], specifier = ">=0.2.1" }]
|
||||
|
||||
[[package]]
|
||||
name = "terminal-lego-v1"
|
||||
@@ -7071,13 +7152,13 @@ version = "0.1.1"
|
||||
source = { editable = "deps/research-environments/environments/terminal/terminal_lego_v1" }
|
||||
dependencies = [
|
||||
{ name = "huggingface-hub", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "verifiers", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "verifiers", extra = ["harbor"], marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [
|
||||
{ name = "huggingface-hub" },
|
||||
{ name = "verifiers", specifier = ">=0.2.0" },
|
||||
{ name = "verifiers", extras = ["harbor"], specifier = ">=0.2.0" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -7896,6 +7977,25 @@ examples = [
|
||||
{ name = "wordle-v1", editable = "deps/verifiers/environments/wordle_v1" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "virl39k-v1"
|
||||
version = "0.1.0"
|
||||
source = { editable = "deps/research-environments/environments/multimodal/virl39k_v1" }
|
||||
dependencies = [
|
||||
{ name = "datasets", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "huggingface-hub", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "math-verify", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
{ name = "verifiers", marker = "(platform_machine == 'aarch64' and sys_platform == 'linux') or (platform_machine == 'x86_64' and sys_platform == 'linux')" },
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [
|
||||
{ name = "datasets" },
|
||||
{ name = "huggingface-hub" },
|
||||
{ name = "math-verify" },
|
||||
{ name = "verifiers", specifier = ">=0.2.2.dev65" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "virtualenv"
|
||||
version = "21.3.3"
|
||||
@@ -8548,7 +8648,7 @@ dependencies = [
|
||||
]
|
||||
|
||||
[package.metadata]
|
||||
requires-dist = [{ name = "verifiers", specifier = ">=0.2.0" }]
|
||||
requires-dist = [{ name = "verifiers", specifier = ">=0.2.2.dev65" }]
|
||||
|
||||
[[package]]
|
||||
name = "wordle-v1"
|
||||
|
||||
Reference in New Issue
Block a user