Custom Harness
Some benchmarks do not run through Gym’s rollout collection: the harness may provision external machines and drive Gym from there, for example. For those, set command on the benchmark. The driver runs your script instead of gym eval run, in the same container and with the same services running.
What your script gets
The driver clones Gym into a fresh temporary checkout when gym_install is set, so a script that sits next to your submit config is not copied there. Put the harness on a shared cluster path, mount it with driver.mounts, and call it by absolute path, as /harness/run_my_harness.py above.
The variables from driver.env are present too, and driver.container and driver.mounts apply as usual.
What changes compared with gym eval run
- The
commandis emitted verbatim as the last statement of the driver’s shell, underset -euo pipefail. A multi-line script is fine, and its exit status is the job’s. - If
gym_installis set, the install step still runs first, and so doesprepare. Your script starts in the Gym checkout. - Nothing from
runis applied, which is whyrunandcommandcannot be combined:runonly configuresgym eval run. Put those settings in your script. --model-type,require_complete, observability capture, and the defaultrollouts.jsonloutput are properties ofgym eval run. They do not apply; your script decides where results go and what counts as complete.resumablecannot be combined withcommand. A resumed job only passesresume_from_cachetogym eval run, so a custom command would restart from zero.