Skip to content

feat(token-capture): add direct ledger manifest reader - #3646

Draft
pthombre wants to merge 2 commits into
mainfrom
pranav/manifest_fetch_fix
Draft

pthombre wants to merge 2 commits into
mainfrom
pranav/manifest_fetch_fix

Conversation

@pthombre

@pthombre pthombre commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Add a cache-free FileManifestReader for training actors that share the policy proxy's node-local ledger. It snapshots a rollout ledger under the existing shared file lock, releases the lock before parsing, and uses the HTTP endpoint's manifest builder. Deadline/cancellation checks bound lock waits and reject late results. Atomic writer markers let startup verify hostname, device, and inode.

The API has one read method and a visibility check; it adds no cache, per-stage instrumentation, HTTP client, or private pool. Companion RL integration: NVIDIA-NeMo/RL#4247. No separate issue is needed for this focused manifest timeout workaround.

Validation

Slurm 3940605, requested container /lustre/fsw/portfolios/nemotron/projects/nemotron_sw_post/users/pthombre/enroot-images/nvcr.io+nvidian+nemo-rl+nightly.squashfs:

uv run --no-project --python /opt/nemo_rl_venv/bin/python python -m pytest -q -o addopts= tests/unit_tests/test_token_capture*.py

254 Gym tests passed, including 14 reader tests: HTTP equivalence, separate writer process, concurrent appends, held/shared locks, invalid fields, deadlines, cancellation, and visibility. Companion RL: 47 receipt/integration and 1,129 controller/lifecycle tests passed. Gym pre-commit run --all-files and diff checks passed.

Rollouts and compatibility

Model rollouts: N/A; this is manifest metadata access, not an agent/verifier behavior change. A same-container uvloop reader benchmark is documented in the RL PR; no full-training performance claim is made.

HTTP behavior, ledger schema, receipt/finalizer semantics, and token staging are unchanged. Local reads require matching filesystem visibility and are explicitly selected by the consumer. Writer markers are best effort; consumers requiring them fail startup if verification is unavailable. Public API docstrings and the companion RL deployment guide document usage.

Checklist

  • Contribution guidelines followed; focused manifest-only change.
  • Tests and full pre-commit passed.
  • API docstrings and companion deployment documentation.
  • SPDX headers and DCO sign-offs.

@pthombre pthombre added feature New capabilities, enhancements, or enablement work area:training Training framework integrations and training-data interfaces labels Sep 23, 2026
@copy-pr-bot

copy-pr-bot Bot commented Sep 23, 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.

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:training Training framework integrations and training-data interfaces feature New capabilities, enhancements, or enablement work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant