Skip to content

feat(inspect): let one Inspect worker run several samples at once - #6931

Draft
cwing-nvidia wants to merge 1 commit into
cwing/inspect/environment-serverfrom
cwing/inspect/batched-mode
Draft

cwing-nvidia wants to merge 1 commit into
cwing/inspect/environment-serverfrom
cwing/inspect/batched-mode

Conversation

@cwing-nvidia

@cwing-nvidia cwing-nvidia commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Goal of the stack (#6683): run an eval written for Inspect AI in Gym without porting it. The eval's dataset, solver and scorer run as written; Gym serves the model and records every model call.

PR 4 of 5. An optional speed-up for large runs.

What: samples_per_worker (default 1, up to 64). Above 1, the samples of a worker share one loaded task and one process.

Why: a large run of an eval without tools needs far fewer processes.

Worth knowing

  • A model call that names no episode masks every sample running in that worker.
  • A timed-out sample cannot be cancelled alone; its worker takes no more samples and stops when the others finish.

Validation

  • Server tests: 138 passed.
  • BBQ, 16 samples, gpt-4o-mini, samples_per_worker=8: accuracy identical to the default mode and to inspect eval.

Compatibility: additive, default unchanged.

@copy-pr-bot

copy-pr-bot Bot commented Nov 30, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@cwing-nvidia
cwing-nvidia added this pull request to stack #6933 November 30, 2026 04:50
@cwing-nvidia cwing-nvidia added area:env-infra Shared environment framework, lifecycle, registry, scaffolding, and validation feature New capabilities, enhancements, or enablement work labels Nov 30, 2026
@cwing-nvidia

Copy link
Copy Markdown
Contributor Author

/ok to test 686411f

@svcnvidia-nemo-ci svcnvidia-nemo-ci added the risk:mid Autobot PR risk: mid label Nov 30, 2026
Adds samples_per_worker to the inspect Environment Server. Above 1, a worker runs up to that many samples at once in one Inspect eval call, fed from the server's commands, so samples share the loaded task and the process.

Each request still names its own episode. A repeat of a sample goes to another worker, because Inspect runs a sample id once per eval call. A model request that names no episode while several samples share a worker cannot be attributed, so every sample running in that worker is masked.

Signed-off-by: Chris Wing <cwing@nvidia.com>
@cwing-nvidia
cwing-nvidia force-pushed the cwing/inspect/batched-mode branch from 686411f to bca66af Compare November 30, 2026 17:22
@cwing-nvidia

Copy link
Copy Markdown
Contributor Author

/ok to test bca66af

@copy-pr-bot

copy-pr-bot Bot commented Nov 30, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:env-infra Shared environment framework, lifecycle, registry, scaffolding, and validation feature New capabilities, enhancements, or enablement work risk:mid Autobot PR risk: mid

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants