Skip to content

feat(rollouts): integrate v2 trajectory collection and health readers - #5661

Merged
lafrancef merged 1 commit into
mainfrom
flafrance/tool-timing-integration-v2
Nov 9, 2026
Merged

lafrancef merged 1 commit into
mainfrom
flafrance/tool-timing-integration-v2

Conversation

@lafrancef

@lafrancef lafrancef commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Integrates the v2 timing contract with collection, enrichment, and health readers. Select model_call_capture.trajectory_schema_version: "2.0" to retain qualified timing; the default remains v1.

GDPval now passes the configured schema version explicitly instead of inferring it from producer evidence. Health identity falls back to v2 capture_key when the outer rollout identifier is absent. Timing summaries respect clock domains and leave unsupported interval unions unknown.

Interrupted tools remain incomplete unless tool-local evidence proves timeout or cancellation. Enclosing timeout evidence still drives timeout health classification; the tool-failure marker check treats timeout, cancellation, and incomplete statuses consistently.

Collection applies the selected schema with or without enrichment. Metadata-only capture omits synthesized turn text while preserving joins. Compatible invocation snapshots and equivalent failure-event encodings merge without discarding valid evidence; conflicting owners remain diagnosed.

Schema #5660 is merged; this PR targets main, followed by #5507.

Omitted or invalid saved failure reports produce a v2-only failure_report_unavailable diagnostic. Successful v1 rollouts retain strict ATIF exportability; tool-specific missing-failure diagnostics keep their documented policy.

V2 follow-ups: populate observer clock domains on Gym model capture, and migrate trial-evidence/recovery readers from rollout_id to capture_key. Until then, multi-call time splits can remain unmeasured and those trial readers can report incomplete operation joins.

@copy-pr-bot

copy-pr-bot Bot commented Nov 5, 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.

@AdamRajfer AdamRajfer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: nemo_gym/orchestration/collect_evidence.py still reads trajectory["rollout_id"], and the recovery planner compares it with the row's rollout id. With 2.0 that key is capture_key, so recovery reports every trial's trajectory as incomplete. It is reported only and gates nothing, but the same capture_key fallback you added in rollout_health.py would fix it.

AdamRajfer
AdamRajfer previously approved these changes Nov 5, 2026

@AdamRajfer AdamRajfer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving; the collect_evidence rollout_id read I noted is report-only and can follow separately.

@svcnvidia-nemo-ci svcnvidia-nemo-ci left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHIP WITH CARE

I found three correctness risks: metadata-only v2 results retain capture content in generated turns, compatible invocation snapshots can cause trajectory projection to fail, and equivalent failure events can be treated as conflicts. I also suggest documenting the new schema-selection contract.

I inspected all 15 changed files and their directly affected capture, projection, replay, export, and health paths. This was a static review; I didn't execute tests.

Review generated by codex. This was a full review. Request a full review with /review reset=true.

Comment thread nemo_gym/rollouts/rollout_collection.py Resolved
Comment thread nemo_gym/rollouts/trajectory_builder.py Resolved
Comment thread nemo_gym/rollouts/trajectory_builder.py Resolved
Comment thread nemo_gym/models/model_call_capture.py Resolved
@lafrancef
lafrancef force-pushed the flafrance/tool-timing-schema-v2 branch from e2b26ad to 57c8706 Compare November 5, 2026 14:49
@lafrancef
lafrancef force-pushed the flafrance/tool-timing-integration-v2 branch from ed2f271 to 066d805 Compare November 5, 2026 15:02
@lafrancef

Copy link
Copy Markdown
Contributor Author

/review

@svcnvidia-nemo-ci svcnvidia-nemo-ci left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHIP

The three prior correctness findings are fixed in the current source:

  • Capture-derived turns now omit prompt, answer, and reasoning when payloads are disabled, while preserving metadata and independent producer turns.
  • Invocation reconciliation retains one owner per invocation ID, fills unknown instance identity, and diagnoses conflicting owners without dropping unrelated tools.
  • Failure-event comparison normalizes equivalent encodings before detecting conflicts, preserving valid causal links and cause/cycle validation.

The schema-selection documentation also addresses the prior note and matches the inspected selection paths.

I inspected the relevant regression tests and directly affected collection, replay, and configuration paths. No eligible findings remain in this follow-up. The previously reviewed tree wasn't supplied, so I couldn't independently compare the inter-review delta; this wasn't a fresh whole-PR review. This was a static review; I didn't execute tests.

Review generated by codex. This was a findings-only review. Request a full review with /review reset=true.

@lafrancef

Copy link
Copy Markdown
Contributor Author

/ok to test 066d805

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

@lafrancef
lafrancef force-pushed the flafrance/tool-timing-integration-v2 branch from 066d805 to 41b09f5 Compare November 5, 2026 19:15
@lafrancef
lafrancef force-pushed the flafrance/tool-timing-schema-v2 branch from 57c8706 to 491168e Compare November 5, 2026 19:15
@lafrancef

Copy link
Copy Markdown
Contributor Author

/ok to test 41b09f5

@lafrancef

Copy link
Copy Markdown
Contributor Author

/review

@AdamRajfer AdamRajfer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-read the diff at d470b05 against my earlier review.

The failure_report_unavailable gap is addressed: it is v2-only, v1 projection drops it, and the new tests cover omitted and invalid reports with repeated default enrichment staying strictly ATIF-exportable. The two items you recorded as v2 follow-ups (observer clock domain on Gym model capture, and collect_evidence/recovery reading rollout_id instead of capture_key) are still open in the code, as described. Both only affect runs that opt in to 2.0, and nothing gates on them, so I'm fine with them landing separately. I don't see anything else that blocks.

@AdamRajfer
AdamRajfer self-requested a review November 6, 2026 18:12
@nemo-automation-bot
nemo-automation-bot Bot requested a review from a team November 6, 2026 22:04
@kajalj22
kajalj22 removed request for a team November 6, 2026 22:50
@svcnvidia-nemo-ci svcnvidia-nemo-ci added feature New capabilities, enhancements, or enablement work area:evaluation Evaluation, rollout collection, reward profiling, comparison, and exporters ready-to-merge PR is approved, current, and waiting for final CI or merge labels Nov 7, 2026
@adil-a
adil-a added this pull request to the merge queue Nov 8, 2026
@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

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

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 8, 2026
@adil-a
adil-a added this pull request to the merge queue Nov 8, 2026
@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

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

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 9, 2026
@lafrancef
lafrancef added this pull request to the merge queue Nov 9, 2026
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

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

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 9, 2026
@lafrancef
lafrancef added this pull request to the merge queue Nov 9, 2026
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

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

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 9, 2026
@lafrancef
lafrancef added this pull request to the merge queue Nov 9, 2026
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

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

Merged via the queue into main with commit 31372ce Nov 9, 2026
112 of 115 checks passed
@lafrancef
lafrancef deleted the flafrance/tool-timing-integration-v2 branch November 9, 2026 11:23

This branch was previously deployed

1 inactive deployment
public — d470b05f Deployed Nov 6, 2026 by copy-pr-bot[bot] via release / finalize / notify #10657
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 feature New capabilities, enhancements, or enablement work 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.

3 participants