Skip to content

docs(eval): say which attempts the dispatch drain margin records - #4324

Merged
zyzhou5 merged 1 commit into
NVIDIA-NeMo:mainfrom
sven-rankov:sven-rankov/docs-dispatch-drain-margin-attempts
Oct 14, 2026
Merged

zyzhou5 merged 1 commit into
NVIDIA-NeMo:mainfrom
sven-rankov:sven-rankov/docs-dispatch-drain-margin-attempts

Conversation

@sven-rankov

Copy link
Copy Markdown
Contributor

What does this PR do?

Corrects a sentence I added in #4134 to the Dispatch budget bullet (gym eval run --resume) in reference/cli-commands.mdx. It said:

Completed rollouts are always recorded; a failed or timed-out attempt is recorded only if it ran at least as long as the median so far, so long timeouts raise the margin and early failures do not shrink it.

Two parts of that don't match main:

  • Which attempts count as failed. _post_subroutine calls record() whenever the agent's /run returns a usable reply (status below 400 and a JSON body), and record_failure() only when the call itself fails (nemo_gym/rollout_collection.py:3670-3713, succeeded is set at :3677). A rollout that the agent reports as failed or timed out inside a normal reply, such as nooa_agent's timeout_exceeded (responses_api_agents/nooa_agent/app.py:262-268), is therefore always recorded, however short it was.
  • Which way the margin moves. A recorded attempt can lower the p75 as well as raise it. Using @yaoyu-33's example from fix(rollout): two dispatch-budget correctness bugs #3853: with recorded durations [10, 20, 30, 400, 500] s the margin is 400 s; a failed /run after 30 s (at the median) brings it to 307.5 s, and so does an agent-reported timeout after 5 s.

The new sentence states the rule without claiming a direction:

An attempt whose agent /run returns a usable reply is always recorded, even when the agent reports the rollout itself as failed or timed out; an attempt whose /run fails (an error status, or no usable reply) is recorded only if it ran at least as long as the median so far, because a quick failure says nothing about how long rollouts take.

No issue: this is a docs follow-up to #4134. The frozen fern/versions/v0.7.0 snapshot doesn't contain the sentence (and r0.7.0 has no record_failure), so only latest changes.

Not changed here: the comment above the finally block (rollout_collection.py:3707-3708, "but only by raising it") makes the same directional claim. I left it alone to keep this PR docs-only; happy to send a one-line follow-up if you'd like it changed too.

Validation

  • Checked against upstream/main (7204f6b): DispatchLatencyTracker.record, record_failure and drain_margin (rollout_collection.py:1203-1244), _post_subroutine (:3641-3713), and raise_for_status (server_utils.py:685-686, response.ok).
  • Ran the real DispatchLatencyTracker with the durations above: baseline margin 400.0; record_failure(5) leaves 400.0 (ignored); record_failure(30) gives 307.5; record(5) gives 307.5; record_failure before any recorded attempt records nothing.
  • python tests/unit_tests/test_fern_docs_links.py: 18 passed.
  • pre-commit run --all-files: all hooks pass (none of them check .mdx); git diff --check is clean.
  • cd fern && npx -y fern-api@latest check (the npm run check command, fern-api 5.151.0): 0 errors; the only warning is the redirects check being skipped because I'm not logged in to Fern.

Rollouts

N/A: docs-only change. No environment, agent or model behaviour changes.

Compatibility and benchmark impact

None.

Checklist

  • I have read the contributing guidelines.
  • The change is focused; unrelated "drive-by" edits are tracked as separate issues/PRs.
  • Tests added or updated and pass locally, or N/A for docs-only / non-code changes (so CI unit/server checks pass when applicable).
  • Documentation added or updated, or N/A with justification.
  • Pre-commit checks pass locally (pre-commit run --all-files) (so CI lint/format checks pass).
  • New source files include the required Apache-2.0 SPDX header. (N/A: no new files)
  • All commits have DCO sign-off (git commit -s) (so the DCO check passes).

Proposed labels (I cannot apply labels): docs, area:evaluation, needs-review

cc @Kh4L (#3891) @yaoyu-33 (#3853)

The dispatch budget bullet said a failed or timed-out attempt is recorded
only if it ran at least as long as the median, "so long timeouts raise the
margin and early failures do not shrink it". The tracker splits on whether
the agent's /run call failed, not on how the rollout ended: a rollout the
agent reports as failed or timed out inside a usable reply is always
recorded, and a recorded attempt can lower the p75 as well as raise it.
State the actual rule and drop the claim about which way the margin moves.

Follow-up to NVIDIA-NeMo#4134.

Signed-off-by: Tsvetan (Sven) Rankov <[email protected]>
Assisted-by: Claude Code
@copy-pr-bot

copy-pr-bot Bot commented Oct 9, 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.

@nemo-automation-bot nemo-automation-bot Bot added the community-request Issue reported or requested by someone from the community label Oct 9, 2026
@yaoyu-33 yaoyu-33 added area:evaluation Evaluation, rollout collection, reward profiling, comparison, and exporters complexity:low Localized change in one scope with a small, straightforward review surface docs Documentation-only updates or documentation debt needs-review PR is ready for code review and waiting on a reviewer labels Oct 9, 2026
@svcnvidia-nemo-ci svcnvidia-nemo-ci added the waiting-on-maintainers Waiting on maintainers to respond label Oct 11, 2026
@yaoyu-33 yaoyu-33 removed the needs-review PR is ready for code review and waiting on a reviewer label Oct 11, 2026
@github-actions github-actions Bot added the sla:triage-overdue Review assignment is over the one-business-day SLA label Oct 12, 2026
@zyzhou5
zyzhou5 enabled auto-merge October 12, 2026 21:12
@zyzhou5

zyzhou5 commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

/ok to test 6a04e40

@github-actions

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot removed the sla:triage-overdue Review assignment is over the one-business-day SLA label Oct 12, 2026
@svcnvidia-nemo-ci svcnvidia-nemo-ci removed the waiting-on-maintainers Waiting on maintainers to respond label Oct 13, 2026
@yaoyu-33 yaoyu-33 added the ready-to-merge PR is approved, current, and waiting for final CI or merge label Oct 13, 2026
@zyzhou5
zyzhou5 added this pull request to the merge queue Oct 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/38612576063

Merged via the queue into NVIDIA-NeMo:main with commit 7519000 Oct 14, 2026
59 of 61 checks passed

This branch was previously deployed

1 inactive deployment
public — 6a04e403 Deployed Oct 12, 2026 by copy-pr-bot[bot] via release / finalize / notify #5100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:evaluation Evaluation, rollout collection, reward profiling, comparison, and exporters community-request Issue reported or requested by someone from the community complexity:low Localized change in one scope with a small, straightforward review surface docs Documentation-only updates or documentation debt ready-to-merge PR is approved, current, and waiting for final CI or merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants