Skip to content

perf: write single-controller training dumps as Parquet - #4845

Merged
ZhiyuLi-Nvidia merged 4 commits into
NVIDIA-NeMo:mainfrom
mk-0:mkitov/trajectory-parquet-logging2
Nov 18, 2026
Merged

ZhiyuLi-Nvidia merged 4 commits into
NVIDIA-NeMo:mainfrom
mk-0:mkitov/trajectory-parquet-logging2

Conversation

@mk-0

@mk-0 mk-0 commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Replace the single controller’s JSONL training-data dumps with Parquet, reusing the existing log_full_train_data path in the advantage stage.

Chunks are written from tensors already available there, without additional TransferQueue reads. Conversion uses NumPy/Arrow rather than per-token Python objects. A lightweight manifest marks completed steps without merging files or rereading their contents.

In a short run with 30x looped logging (simulating Nemotron 3 Ultra batch size), Parquet reduced average conversion/write time from 163.8s to 10.9s per step and output size from 6.31 GB to 0.53 GB. Both runs logged the same fields with similar token counts.

Validation: all single-controller tests passed, plus sanity checks on actual Parquet output.

@copy-pr-bot

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

@github-actions github-actions Bot added the Documentation Improvements or additions to documentation label Oct 21, 2026
@mk-0
mk-0 marked this pull request as ready for review October 21, 2026 22:01
@ZhiyuLi-Nvidia
ZhiyuLi-Nvidia self-requested a review November 4, 2026 21:25
@terrykong terrykong added the CI:Lfast Runs a fast test suite and re-use nightly `main` container (but sync dependencies to PRs version) label Nov 5, 2026
mk-0 and others added 2 commits November 16, 2026 23:17
Validate Parquet columns up front, cache the schema, and republish a
retried step by replacing the manifest and then removing superseded chunks.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Signed-off-by: Zhiyu Li <[email protected]>
@ZhiyuLi-Nvidia
ZhiyuLi-Nvidia force-pushed the mkitov/trajectory-parquet-logging2 branch from ffe12d7 to d65657a Compare November 17, 2026 08:38
@ZhiyuLi-Nvidia

Copy link
Copy Markdown
Contributor

/ok to test d65657a

Pin the tests and functional scripts that read train_data_step*.jsonl to the
json writer.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Signed-off-by: Zhiyu Li <[email protected]>
@nemo-automation-bot
nemo-automation-bot Bot requested a review from a team November 17, 2026 08:41
@ZhiyuLi-Nvidia

Copy link
Copy Markdown
Contributor

/ok to test ab2d4ca

ZhiyuLi-Nvidia
ZhiyuLi-Nvidia previously approved these changes Nov 17, 2026

@ZhiyuLi-Nvidia ZhiyuLi-Nvidia 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.

Thank you @mk-0.
Just a nit, LGTM!

@ZhiyuLi-Nvidia

Copy link
Copy Markdown
Contributor

/ok to test ab2d4ca

…ublished

A write that dies after creating its .partial file left it in the step
directory, and the cleanup in _publish_step only matched step-*.parquet.
Also remove dot-prefixed .partial files that the new manifest does not list.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Signed-off-by: Zhiyu Li <[email protected]>
@ZhiyuLi-Nvidia

Copy link
Copy Markdown
Contributor

/ok to test ea0db34

@ZhiyuLi-Nvidia
ZhiyuLi-Nvidia enabled auto-merge (squash) November 17, 2026 18:19
@ZhiyuLi-Nvidia
ZhiyuLi-Nvidia merged commit f3e4f0f into NVIDIA-NeMo:main Nov 18, 2026
157 of 161 checks passed
jthomson04 added a commit to jthomson04/RL that referenced this pull request Nov 18, 2026
…Q clear fix) into jthomson04/dynamo-1.7

Brings in NVIDIA-NeMo#5258, NVIDIA-NeMo#4845, NVIDIA-NeMo#5141 and NVIDIA-NeMo#5201. Git merged the six files both sides changed without a conflict. pyproject.toml, uv.lock and the submodule pins are unchanged.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Signed-off-by: jthomson04 <[email protected]>
ZhiyuLi-Nvidia pushed a commit that referenced this pull request Nov 18, 2026
Same cause as the previous commit: the default debug writer is Parquet since
#4845, but these tests install a JsonDebugWriter or compare with its output.
CI runs pytest with -x, so they were hidden behind the first failure.

- test_debug_writer: the background-vs-sync comparison builds its writer with
  the json target.
- test_single_controller_actor: the stage-config helper sets the json target,
  so the stage writes the JSONL that the installed JsonDebugWriter merges.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Signed-off-by: Zhiyu Li <[email protected]>
zyzhou5 added a commit to zyzhou5/RL that referenced this pull request Nov 19, 2026
…ting

Pick up NVIDIA-NeMo#5290, which fixes the advantage-stage training-dump test that
fails on main since NVIDIA-NeMo#4845. No conflicts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Zeyu Zhou <[email protected]>
zhangyimi added a commit to zhangyimi/RL that referenced this pull request Nov 23, 2026
…k test

SingleController writes training dumps as Parquet since NVIDIA-NeMo#4845, so the
JSONL file count is always zero.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Signed-off-by: Zhang Shuai <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI:Lfast Runs a fast test suite and re-use nightly `main` container (but sync dependencies to PRs version) Documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants