You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: skills/create-environments/SKILL.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -136,7 +136,7 @@ Runtime config chooses where code executes. Task hooks should use the `vf.Runtim
136
136
- Prefer deterministic verification grounded in the task's actual artifact or answer.
137
137
- Use an LLM judge only when semantic judgment is unavoidable.
138
138
- Metrics are for observability and do not contribute to reward, but are useful. Use them deliberately and appropriately!
139
-
- Judgement that compares the sibling traces of one env-rollout (best-of-n selection, zero-sum payoffs) lives on `Environment.finalize(task, episode)`or the env's `@vf.reward`/`@vf.metric` methods — attach via `trace.record_reward`/`record_metric`; no live runtime there.
139
+
- Judgement that compares the sibling traces of one env-rollout (best-of-n selection, zero-sum payoffs) lives on `Environment.finalize(task, episode)` — attach via `trace.record_reward`/`record_metric`, in program order; no live runtime there.
140
140
- Raise ordinary Python exceptions from rollout hooks and scoring. The rollout records them as `TaskError`.
141
141
142
142
## Validation and lifecycle
@@ -194,7 +194,7 @@ The selected harness must support user simulation, which a lot of the built-in,
194
194
195
195
## Multi-agent environments
196
196
197
-
When one rollout is more than one agent run, export an `Environment` subclass next to the taskset: declare each agent as a `vf.AgentConfig` field with a default instance on a `vf.EnvConfig` subclass (bound via `Environment[YourConfig]`, read as `self.config`, addressed as `--env.<agent>.*`) — the field name is the agent's name, the only naming site, and per-run caps (turns, tokens, stage timeouts, retries) are agent fields. A declared pin is its author default; an unpinned agent runs the taskset's default harness, and its model context defaults to the run's own. Task x agent fit validates per run, on the task each agent actually receives (an env-minted task carries its own `tools`/`NEEDS_CONTAINER`, so a bare verdict task pairs with any taskset). Then write `run(task, agents)` (imperative control flow, returning nothing — every finished run joins the episode automatically, stamped with its standing), and optionally `setup(agents)` (env-hardcoded standing, e.g. `agents.judge.trainable = False`) and `finalize(task, episode)` (sibling-dependent judgement over `episode.traces`; `trace.agent_name` names each agent; the env's `@vf.reward`/`@vf.metric` methods run after it). Before writing one, check the bundled envs (`--env.id best-of-n | agentic-judge`) and the reference implementation (`environments/code_golf_v1`). See docs/v1/environments.md.
197
+
When one rollout is more than one agent run, export an `Environment` subclass next to the taskset: declare each agent as a `vf.AgentConfig` field with a default instance on a `vf.EnvConfig` subclass (bound via `Environment[YourConfig]`, read as `self.config`, addressed as `--env.<agent>.*`) — the field name is the agent's name, the only naming site, and per-run caps (turns, tokens, stage timeouts, retries) are agent fields. A declared pin is its author default; an unpinned agent runs the taskset's default harness, and its model context defaults to the run's own. Task x agent fit validates per run, on the task each agent actually receives (an env-minted task carries its own `tools`/`NEEDS_CONTAINER`, so a bare verdict task pairs with any taskset). Then write `run(task, agents)` (imperative control flow, returning nothing — every finished run joins the episode automatically, stamped with its standing), and optionally `setup(agents)` (env-hardcoded standing, e.g. `agents.judge.trainable = False`) and `finalize(task, episode)` (sibling-dependent judgement over `episode.traces`, via `record_reward`/`record_metric`; `trace.agent_name` names each agent). Before writing one, check the bundled envs (`--env.id best-of-n | agentic-judge`) and the reference implementation (`environments/code_golf_v1`). See docs/v1/environments.md.
Copy file name to clipboardExpand all lines: skills/evaluate-environments/references/REFERENCE.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -117,7 +117,7 @@ trace.
117
117
|`id`|`ID`|`""`| Which `Environment` (control flow between agents) runs: a bundled env (`best-of-n`, `agentic-judge`), a local package, or a Hub `org/name[@version]`. Empty = the taskset's own story (its exported `Environment` subclass, else `SingleAgentEnv`). |
118
118
|`taskset`|`TasksetConfig \| None`|`None`| The seed taskset every rollout starts from; resolved to its concrete subclass by `--env.taskset.id` (positional shorthand: `eval <taskset-id>`). See [Taskset config](#taskset-config). `None` only for a taskset-less env; every bundled env requires one. |
119
119
|*(agents)*|`AgentConfig`| env-declared | Each declared agent: `agent` on `SingleAgentEnvConfig`, `solver`/`judge` on the agentic-judge env, the env's own names elsewhere. See [Agent config](#agent-config). |
120
-
|`timeout`|`EnvTimeoutConfig`|`EnvTimeoutConfig()`| The env's own hook bounds: `--env.timeout.episode` (the whole `run()` hook) and `--env.timeout.finalize` (`finalize()`plus the decorated signals). Per-run stage timeouts are each agent's (`--env.<agent>.timeout.*`). |
120
+
|`timeout`|`EnvTimeoutConfig`|`EnvTimeoutConfig()`| The env's own hook bounds: `--env.timeout.episode` (the whole `run()` hook) and `--env.timeout.finalize` (the `finalize()`hook). Per-run stage timeouts are each agent's (`--env.<agent>.timeout.*`). |
121
121
|`retries`|`RolloutRetryConfig`|`RolloutRetryConfig()`| Whole-EPISODE retries, the coarse fallback for faults no agent owns. See [Retry config](#retry-config). Set via `--env.retries.*`. |
122
122
|`interception`|`InterceptionConfig`|`ElasticInterceptionPoolConfig()`| The interception shape: `elastic` (default — servers grown on demand, `multiplex` rollouts each), `server` (one server, tunnel choice incl. bring-your-own endpoint), or `static` (a fixed list). |
123
123
@@ -181,7 +181,7 @@ fields. Shared by the `serve` CLI, server-backed eval, and prime-rl's orchestrat
181
181
|`finalize`|`float \| None`|`None`| Max wall-clock for the task's `finalize` hook. |
182
182
|`scoring`|`float \| None`|`None`| Max wall-clock for task rewards/metrics/judges and harness metrics. |
183
183
184
-
`EnvTimeoutConfig` (the env's `--env.timeout.*`) keeps only `episode` — the bound on the whole `run()` interaction — and `finalize` — the bound on the env's `finalize()` hook plus its decorated signals.
184
+
`EnvTimeoutConfig` (the env's `--env.timeout.*`) keeps only `episode` — the bound on the whole `run()` interaction — and `finalize` — the bound on the env's `finalize()` hook.
185
185
186
186
> Remote sandboxes cap any harness timeout at 24 hours (provider max lifetime).
Copy file name to clipboardExpand all lines: skills/train-with-environments/SKILL.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -112,7 +112,7 @@ can override it.
112
112
- If groups are mostly all-one, increase difficulty or sample a harder task distribution.
113
113
- Choose `batch_size` with whole groups, packing, sequence length, and GPU memory in mind.
114
114
115
-
Sibling-dependent scoring (best-of-n selection, zero-sum payoffs) lives on `Environment.finalize(task, episode)` and the env's decorated signals, and runs inside the env — every trace carries its agent name, trainability, and episode stamp, so a flat batch regroups without a side lookup. `-r` stays purely the trainer's group size: n independent env-rollouts per task; env-internal fan-out is the env's own knob (`--env.n`).
115
+
Sibling-dependent scoring (best-of-n selection, zero-sum payoffs) lives on `Environment.finalize(task, episode)`, and runs inside the env — every trace carries its agent name, trainability, and episode stamp, so a flat batch regroups without a side lookup. `-r` stays purely the trainer's group size: n independent env-rollouts per task; env-internal fan-out is the env's own knob (`--env.n`).
0 commit comments