Skip to content

feat(orchestration): auto-default model_call_capture_dir per benchmark - #3320

Merged
prokotg merged 2 commits into
mainfrom
prokotg/model-call-capture-dir-autodefault
Sep 11, 2026
Merged

prokotg merged 2 commits into
mainfrom
prokotg/model-call-capture-dir-autodefault

Conversation

@prokotg

@prokotg prokotg commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Auto-derive model_call_capture_dir per benchmark when observability_enabled: true is set on a Slurm-submitted benchmark, instead of requiring the user to write it out by hand.

  • observability_enabled=true requires an absolute model_call_capture_dir (ModelCallCaptureConfig validator), and it must be unique per submission β€” CaptureStore writes one file per rollout_id, not per submission, so a reused path silently merges different runs' captures into the same files.
  • New _with_default_capture_dir() in slurm_script.py derives the path from each benchmark's own real remote output directory (remote_bench_dir, already computed once per benchmark in build_sbatch_script's loop), giving a correct, collision-free path for free.
  • An explicit model_call_capture_dir in the config always wins over the default, mirroring the existing health_check.port-from-service.port precedent (VllmServiceConfig._default_health_check).
  • Has to happen in Python rather than via ${...} Hydra interpolation: remote_bench_dir isn't known until well after SubmitConfig validation, by which point Hydra has already resolved every interpolation in the submitted YAML.

Changes

  • nemo_gym/orchestration/executors/slurm_script.py β€” _with_default_capture_dir(), wired into build_sbatch_script
  • examples/slurm_vllm_1IN.yaml β€” updated example comment
  • tests/unit_tests/test_slurm_script.py β€” unit + integration coverage for default injection, explicit override, and observability-off cases
  • tests/unit_tests/test_cli_eval_submit.py β€” minor cleanup of a dead assertion

Test plan

  • pytest tests/unit_tests/test_slurm_script.py -x
  • pytest tests/unit_tests/test_cli_eval_submit.py -x

observability_enabled=true requires an absolute model_call_capture_dir
(ModelCallCaptureConfig validator), and it has to be unique per submission
or CaptureStore (one file per rollout_id, not per submission) silently
appends different runs' captures into the same files.

This ties the default directly to each benchmark's own real output
directory (remote_bench_dir, already computed once per benchmark in
build_sbatch_script's loop) -- a benchmark author now only has to write
observability_enabled: true and gets a correct, real, collision-free path
for free. An explicit model_call_capture_dir still wins if set, mirroring
the existing health_check.port-from-service.port default precedent
(VllmServiceConfig._default_health_check).

Has to happen in Python, rather than as a ${...} Hydra interpolation:
remote_bench_dir isn't computed until well after SubmitConfig validation,
which itself runs after Hydra has already resolved every interpolation in
the submitted YAML -- there is no config-time value to reference.

Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
@prokotg prokotg linked an issue Sep 11, 2026 that may be closed by this pull request
6 of 9 tasks
@prokotg prokotg added area:orchestration Job submission, deployment, services, and lifecycle management needs-review PR is ready for code review and waiting on a reviewer labels Sep 11, 2026
@yaoyu-33 yaoyu-33 added the feature New capabilities, enhancements, or enablement work label Sep 11, 2026
…onfig name

Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
@prokotg
prokotg merged commit 3c77562 into main Sep 11, 2026
38 checks passed
@prokotg
prokotg deleted the prokotg/model-call-capture-dir-autodefault branch September 11, 2026 13:16
jkyi-nvidia pushed a commit that referenced this pull request Sep 11, 2026
#3320)

## Summary

Auto-derive `model_call_capture_dir` per benchmark when
`observability_enabled: true` is set on a Slurm-submitted benchmark,
instead of requiring the user to write it out by hand.

- `observability_enabled=true` requires an absolute
`model_call_capture_dir` (`ModelCallCaptureConfig` validator), and it
must be unique per submission β€” `CaptureStore` writes one file per
`rollout_id`, not per submission, so a reused path silently merges
different runs' captures into the same files.
- New `_with_default_capture_dir()` in `slurm_script.py` derives the
path from each benchmark's own real remote output directory
(`remote_bench_dir`, already computed once per benchmark in
`build_sbatch_script`'s loop), giving a correct, collision-free path for
free.
- An explicit `model_call_capture_dir` in the config always wins over
the default, mirroring the existing
`health_check.port`-from-`service.port` precedent
(`VllmServiceConfig._default_health_check`).
- Has to happen in Python rather than via `${...}` Hydra interpolation:
`remote_bench_dir` isn't known until well after `SubmitConfig`
validation, by which point Hydra has already resolved every
interpolation in the submitted YAML.

## Changes

- `nemo_gym/orchestration/executors/slurm_script.py` β€”
`_with_default_capture_dir()`, wired into `build_sbatch_script`
- `examples/slurm_vllm_1IN.yaml` β€” updated example comment
- `tests/unit_tests/test_slurm_script.py` β€” unit + integration coverage
for default injection, explicit override, and observability-off cases
- `tests/unit_tests/test_cli_eval_submit.py` β€” minor cleanup of a dead
assertion

## Test plan

- [ ] `pytest tests/unit_tests/test_slurm_script.py -x`
- [ ] `pytest tests/unit_tests/test_cli_eval_submit.py -x`

---------

Signed-off-by: Tomasz Grzegorzek <tgrzegorzek@nvidia.com>
Signed-off-by: Junkeun Yi <jkyi@nvidia.com>

This branch was previously deployed

1 inactive deployment
public β€” 83af79d5 Deployed Sep 11, 2026 by copy-pr-bot[bot] via release / finalize / notify #2793
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:orchestration Job submission, deployment, services, and lifecycle management feature New capabilities, enhancements, or enablement work needs-review PR is ready for code review and waiting on a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[epic] orchestration: remote execution and job management for Gym evaluations

3 participants