Configuration Reference
A submit config is a YAML file with the top-level sections services, compute, driver, job, and optionally otel. All models are strict: an unknown key anywhere is an error, which is how typos surface. Top-level keys that start with _ are the exception; they are scratch namespaces for interpolation and are dropped before validation.
Fields without a default are required.
env values
env appears on every service and on the driver. Every value must start with one of three prefixes; a missing or misspelled prefix is an error, not a guess.
VAR must be a valid environment variable name. host: values are resolved when the config is validated, so they must be set for --resolve-only too. In the persisted resolved-config.yaml and gym-job.json the original host:VAR reference is written back, not the secret.
services
A mapping from service name to a service definition. The type field selects the kind: vllm, vllm_pd, or ray. Service names are free-form, but they become part of log file names and shell variable names.
Fields common to every service
type: vllm
A vLLM server, started with vllm serve.
If health_check is not set, it defaults to /health on port. If it is set without a port, the service’s port is used.
type: vllm_pd
Prefill/decode disaggregated vLLM: two vLLM tiers behind a vllm-router. A single vllm_pd entry named X deploys three services: X-prefill, X-decode, and the router X. Set driver.policy_model to X. The router’s container must provide vllm-router. See the Prefill/Decode Disaggregation how-to.
type: ray
A Ray cluster. The head starts on the driver’s node and every other node of the spanned pools joins it as a worker.
A ray service is not a model service: it cannot be driver.policy_model for URL injection, and it has no default health check. The head’s address is exported to the job as GYM_RAY_ADDRESS_<SERVICE> (service name upper-cased, non-alphanumerics replaced by _).
compute
A mapping with exactly one entry; its key is a name you choose (the examples use cluster). More than one is an error.
type: slurm
Use forward_env with runtime: for credentials needed by a remote job:
Only listed names are forwarded. Leave scheduler-provided values such as
CUDA_VISIBLE_DEVICES out of this list. --resolve-only and dry runs do not
require forwarded values to be set. Slurm must export the submission environment
to the job; an explicit --export=NONE prevents that inheritance.
Node pools
A benchmark is one Slurm job. Pools do not create separate Slurm requests; they divide the one allocation between services. The job requests the sum of every pool’s nodes, and pool i owns the contiguous node range after all pools before it, in declaration order. Because Slurm takes one value per job, pools must agree on partition, ntasks_per_node, and gpus_per_node, and may not set the same extra_args key to different values. Disagreement is an error.
driver
The driver runs the benchmarks against the services.
Policy wiring
When policy_model names a vllm or vllm_pd service, each benchmark’s run config receives:
policy_base_url:http://<policy_host>:<service port>/v1policy_model_name: the service’sserved_model_name, or itsmodelpolicy_api_key: a dummy value (vLLM does not require authentication)
If a benchmark’s run already sets one of these keys to a different value, validation fails: remove one or the other. A key set to the value policy_model gives is accepted, so these keys no longer conflict once submit has filled them in. policy_model must name an existing service.
benchmarks
Each key under driver.benchmarks is a benchmark name. It must match ^[A-Za-z0-9._-]+$, because it is used in job names and in the line each sbatch reports back.
prepare and run are nested mappings that are flattened to Hydra overrides: {split: benchmark, config_paths: [a.yaml, b.yaml]} becomes +split=benchmark and +config_paths=[a.yaml,b.yaml], and nested keys become dotted paths.
Submit sets a few defaults on run that you can override:
resumable
Asking for resumable on an executor that does not support it is an error rather than a silent no-op.
export
An export sends a finished benchmark run somewhere, with the same exporters as gym eval export, as the last step of the benchmark’s job. It runs in the same container as gym eval run, so it needs gym_install or an image that has Gym, with python3 being the Python Gym is installed in.
Each key is an exporter and each value its settings, as documented under gym eval export. job.export is the default for every benchmark. A benchmark’s own export override it setting by setting (a nested mapping such as mlflow_run_tags merges), and null drops the export for that benchmark. A benchmark that runs a command takes none of the job-level defaults.
Submit fills in what only it knows, and the submit config may not set it: rollouts_jsonl_fpath and result_json_fpath. It also names things unless you do:
Credentials are not export settings. resolved-config.yaml and --resolve-only output are meant to be shared, and submit resolves ${oc.env:...} references before it writes them, so a key given as an export setting would end up in them in plain text. Provide it through the environment instead: put it in driver.env as host:VAR, which is written back as a reference in the record, while its value goes only into the owner-only job script. The exporters read it from there: WANDB_API_KEY for wandb (set just wandb_project in the export) and MLFLOW_TRACKING_TOKEN for mlflow. For example, driver.env: {WANDB_API_KEY: "host:WANDB_API_KEY"} together with export.wandb: {wandb_project: p}.
When exports run. After gym eval run finishes with exit code 0. A failed or incomplete run is never exported, and a run that is killed at the time limit leaves its exports for the job that resumes it. Exports never change the job’s exit code: the exit code of gym eval run is written to <benchmark dir>/eval.exit and is the job’s own.
Results. Each export writes <benchmark dir>/exports/<exporter>.result.json. No file means the export was never attempted, {"state": "running"} means it was interrupted (for example at the time limit), and anything else is its final result (state is succeeded, skipped or failed, with exit_code, error and detail). An export whose result is succeeded or skipped is not repeated if the job runs it again; a failed or interrupted one is retried. To export again, delete its result file (and, for mlflow and wandb, the <stem>_<exporter>_export_done file next to the rollouts).
Validation. Submit rejects, before anything is sent: an unknown exporter or setting, settings the exporter would not accept (for example a missing agent_version for atif, or an mlflow export without a tracking URI and experiment), an export on a benchmark that also enables the same live exporter in its run settings (the run would be logged twice), export on a benchmark with a command, and exports on Kubernetes compute.
The duplicate check only sees the settings written in the benchmark’s run block. A live exporter that is switched on some other way is not detected before submit: through a config file listed in config_paths, through an env.yaml, or through a file in the gym_install checkout. If you also use an export for that backend, the run is logged twice, once live and once as a separate run by the export, and gym eval export logs a warning naming the live run. To avoid it, do not enable the live exporter for a backend you export with export.
reverify
A reverify step judges every saved rollout of the benchmark again with another resources server, such as a judge that labels reward hacking, without running the policy again and without changing the run’s rewards:
After gym eval run exits 0, the driver runs gym eval reverify for each step, before the exports, with the step’s config files (relative to the Gym checkout) and overrides. It reads <benchmark dir>/artifacts/rollouts.jsonl and its materialized inputs, and writes <benchmark dir>/artifacts/rollouts_<step name>.jsonl with its aggregate metrics. NEMO_GYM_REVERIFY_SOURCE_ROLLOUTS names the run’s rollouts file, so a server config can read what /verify is not sent, such as the saved rewards. When the job runs again, a step whose output exists resumes it. A failed step is reported in the driver log and does not change the job’s exit code; its judge model must be reachable from the driver node.
job
otel
The OpenTelemetry collector that runs beside every benchmark job. It is enabled by default, and always writes local JSONL dumps while enabled. Set remote_export: false for local-only collection. Remote export requires endpoint, service_name, and a token in the submitting shell (token_env, default OTEL_TOKEN); if the token is missing or empty, Gym warns and sets remote_export: false. Set enabled: false to opt out. All fields, and what is exported, are described in Collector for Submitted Jobs.
Cross-field validation
Schema validation runs when the config is composed, before anything is rendered or contacted. --resolve-only performs these checks and stops. The pool-agreement checks listed at the end are made later, while the script is rendered, so use --dry-run to verify them:
- One compute resource. More than one is rejected. A service’s
placementmust name it. - Node pool references. A service’s
node_pool, and every pool in a ray service’snode_pools, must exist in the compute’snode_pools. - Tier name collisions. A
vllm_pdserviceXdeploysX-prefillandX-decode;servicesmust not already contain those names. - Prefill/decode tiers each need a
node_pool, must use differentdata_parallel_rpc_portvalues, and withserver_per_nodemust havenumber_of_instances: 1. The router, if pinned, must be pinned to the first pool, since the driver reaches it over localhost on the first node. - vLLM GPU footprint (when pools declare
gpus_per_node). The GPUs a service needs are compared with what it can use. Too few is an error that names the footprint; too many is a warning that GPUs would idle. The calculation depends on the deployment shape:- single node:
tensor_parallel_size x pipeline_parallel_size x number_of_instancesagainst one node’s GPUs; - one instance across nodes:
tensor_parallel_size x pipeline_parallel_sizeagainst all GPUs of the nodes; - multi-node data parallel: the per-node share of replicas against one node’s GPUs; and
- Ray Serve gateway: the total footprint against all GPUs.
- single node:
- Multi-node data parallelism requires
number_of_instancesto be evenly divisible by the number of nodes, unless the Ray Serve gateway is in use. - Policy wiring conflicts, as described above.
- Benchmark
commandcombined withrunorresumableis rejected. - Benchmark
targetwithout anagent,agentorsandboxwithout atarget, an emptytargetoragent,targetcombined withcommand, ortargetwithonly_tasks,exclude_tasksorskip_unloadableunderrun(gym eval runtakes those only as command-line flags) is rejected. - Pool agreement (checked at render time, not by
--resolve-only). Pools used together by one job must agree onpartition, tasks, GPUs, and extra directives. A mismatch fails--dry-runand the real submit.
Mount source existence, SSH reachability, and OTel destination checks happen later, at submit time.