Where a rollout checkpoint save shows up: W&B before, W&B and Lens after

NVIDIA-NeMo/RL #4730 โ€” export rollout checkpoint metrics to Lens. All permalinks pin the PR head ec5348f. The review-comment links below work once the review is published.

Before
Rollout snapshot timings, sizes and attempt outcomes went to W&B and the file/MLflow loggers only. Lens had no rl.checkpoint.* series and no span for a snapshot save.
This PR
Copies those same logged numbers into Lens: 8 metrics, plus one trace span per completed save. The checkpoint code itself does not change.
Status
Open PR, in review. The review found no correctness bug in the export. It has 11 suggestions (docs, shared names, code comments, one test gap).
Background. In Single-Controller runs, a background task (the snapshot pump) saves rollout state every few seconds while training keeps running. It only saves when the trainer sits on a durable checkpoint, so many attempts skip. Lens is NeMo-RL's OpenTelemetry export. Dotted words have a short explanation: hover or tap them.

One logger call, two destinations

The controller logs each save as one dict through _log_telemetry_metrics, which adds the step and the wall-clock time. Nothing changes up to Logger.log_metrics: it sends the dict to W&B as before, then calls the Lens tee. The PR teaches the tee three new prefixes (metrics.py L810-L851). The example below uses the PR's own test values.

1 ยท a completed save at train step 7 controller logs one dict prefix "timing/rollout_checkpoint" total_save_seconds: 30.0 barrier_wait_seconds: 4.0 replay_rows: 256 snapshot_sequence: 99 train_step: 7 wall_time_seconds: 1.7e9 single_controller.py L4809-L4832 Logger.log_metrics the two paths split here logger.py L1370-L1373 already existed: W&B / file / MLflow โ€ฆ/total_save_seconds = 30.0 โ€ฆ/barrier_wait_seconds = 4.0 โ€ฆ/snapshot_sequence = 99 every key is its own series, plotted against wall time new in this PR: tee โ†’ Lens rl.checkpoint.duration{save,total} 30.0 rl.checkpoint.duration{save,barrier_wait} 4.0 rl.checkpoint.rows{save,replay} 256 snapshot_sequence, train_step as labels IDs are not metric labels; they go on the span: span rl.sc.rollout_checkpoint.save from 1.7e9 โˆ’ 30 s to 1.7e9 rl.checkpoint.snapshot_sequence=99 rl.iteration=7 metrics.py L611-L685 2 ยท every pump attempt, saved or not controller logs one dict prefix "rollout/checkpoint_outcome" skipped: 1.0 reason_missing_trainer_anchor: 1.0 attempt_duration_seconds: 0.02 seconds_since_last_success: 840 L4846-L4885 same Logger.log_metrics call new in this PR: tee โ†’ Lens rl.checkpoint.attempts{skipped, missing_trainer_anchor} +1 rl.checkpoint.attempt_duration{skipped} 0.02 rl.checkpoint.seconds_since_last_success 840 โ†‘ set only when an attempt finishes new Lens series struck out= dropped from metrics on purpose review note (see below) unchanged by this PR

Where they agree, and where they differ

They are the same numbers. Both paths start from the one dict the controller already logged, so Lens adds no second timer. W&B is still the per-run record of every key. Lens is for dashboards and alerts across runs. There, a metric label must come from a small fixed set, so the tee keeps only the fixed operation, phase and category labels. The snapshot number and step ride on the span, where a trace viewer can find which save was slow.

Read the save phases with care. Save phases overlap: barrier wait, the exclusive hold and publication all sit inside total. So never add save phases up. Restore phases do not overlap. The span carries no goodput bucket, because the pump runs while training continues.

What the review asks

So what. With telemetry on, Lens now shows how long rollout snapshots take, how big they are, and whether attempts keep skipping. Before, only W&B had this. The export logic checks out. The asks keep it correct over time: share the names the tee depends on, and alert on completed attempts, not on the gauge.