Commit 92b392e
docs(evaluator): document the Gym runner and fix the runner protocol
The Gym runner shipped with no documentation. "Gym" appeared nowhere in
`docs/`, even though `GymAgentTaskRunner` sits alongside the Callable and
Harbor runners in the SDK and `GymRunnerTarget` alongside Codex, Fabric, and
Harbor in the job spec.
Targets and Runners was also wrong about the one thing readers copy from it.
`AgentTaskRunner` is a two-member protocol -- `run_tasks` *and* `runner_info` --
but the page called it "the one-method protocol", showed only `run_tasks`, and
its `EchoRunner` example omitted `runner_info`. That example does not work:
being `@runtime_checkable`, the protocol rejects the class, and the run dies
with `NotImplementedError: unsupported agent-eval target type: EchoRunner`,
naming neither the protocol nor the missing method. Fixed, and the failure mode
is now stated so the error is searchable.
Adds "Evaluate a NeMo Gym Environment" beside the Harbor page, which had the
same shape already: an example README in `examples/gym/` and no doc. It covers
install and the `PATH` constraint, credentials, task discovery, the config
reference, results, output directories, the two-step Gym invocation, and
submission as a platform job.
Adds "Evaluate with a NeMo Fabric Harness" alongside it. Fabric was the other
shipped runner with no documentation at all -- absent from the whole `docs/`
tree despite covering four harnesses through one config. The page documents the
adapter map, the agent-config shape, the ATIF trajectory that distinguishes this
runner, and the sandboxed `FabricContainerRuntime`.
Codex and the OpenAI-Agents Docker sandbox are deliberately left undocumented:
the Codex runner is being removed in #1419, and `DockerSandboxAgentRuntime` is
stranded by the same PR (it existed only as the `sk-...`-key branch of ProfBench's
Codex path) and is expected to follow it.
The Fabric page is verified the same way: its config and run blocks execute
verbatim against a real Fabric -> Codex -> Relay evaluation, producing a
completed trial with an `atif` trajectory. That caught two defects in the draft --
`work_dir` needed a `Path`, and the example task declared `metrics=[]`, which the
evaluator rejects outright. `FabricContainerRuntime` is documented from source
rather than run: its own tests use a fake sandbox provider, so there was nothing
live to exercise.
Everything here was executed rather than read. A throwaway venv with
`nemo-gym` installed ran three live evaluations against mcqa, which caught four
errors in my own draft: `agent_config` was `configs/simple_agent.yaml` where the
real value is `responses_api_agents/simple_agent/configs/simple_agent.yaml`;
`result.summary.scores` does not iterate scores (`.scores.scores` does);
`work_dir` needs a `Path`; and the page never showed how to set an output
directory at all. The score names, the 0-100 vs 0-1 scale note, and the
`gym_run/` artifact list are copied from real output. The taskset-submission block
is executed verbatim in review too -- it stores five tasks from the bundled mcqa
dataset and the job side rebuilds all five rows from them. The submission snippet was
executed verbatim against #1315's branch, and two more traps came out of it: a
task cannot be named after `task.id` (a 64-char hash starting with a digit,
against a 63-char cap requiring a leading letter), and `GymRewardMetric` is not
a built-in type so the inline packager rejects it.
Two fixes outside the docs tree, both found while sourcing from the example:
`examples/gym/README.md` said to install Gym "in the same environment as the
SDK". The source says the opposite, and it is right -- Gym imports Ray at module
load and nemo-platform excludes Ray by constraint. Its "Next steps" also linked
`runtimes/gym_runtime.py`, which became the `runtimes/gym/` package; split into
live links to `config.py` and `runtime.py`.
The reuse guard's `FileExistsError` told the caller to "give each run a fresh
output_dir". There is no such parameter -- it is `AgentEvalRunConfig.work_dir`
-- so the message sent readers looking for an argument that does not exist.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Sandy Chapman <schapman@nvidia.com>1 parent 42b4009 commit 92b392e
7 files changed
Lines changed: 612 additions & 13 deletions
File tree
- docs
- evaluator/agent-eval
- fern/versions
- packages/nemo_evaluator_sdk
- examples/gym
- src/nemo_evaluator_sdk/agent_eval/runtimes/gym
- sdk/python/nemo-platform/src/nemo_platform/beta/evaluator/agent_eval/runtimes/gym
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
0 commit comments