Context compaction: support trainer and rollout checkpoint/resume
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- machine-learning
Research direction
Start with the two guards and the context_compaction comment in nemo_rl/algorithms/single_controller_utils/config.py, then trace how rollout selection state is held in nemo_rl/experience/rollout_manager.py. The issue calls for trainer checkpoint/resume and in-flight rollout snapshot/resume tests; first inspect the existing checkpointing and rollout-resume paths. Done means CC state persists across restarts, training resumes at the same step and data order, and the guards are removed once both checkpoint paths work.
Written by the indexing model from the issue text.
Description
Follow-up to #4124 (context compaction, CC).
Problem
With CC on, the config rejects both kinds of checkpointing (config.py#L1440-L1443):
if master_config.checkpointing["enabled"]:
raise ValueError("CC checkpoint/resume is not supported initially")
if master_config.rollout_checkpointing.snapshot_attempt_interval_s is not None:
raise ValueError("CC rollout checkpoint/resume is not supported initially")
So a CC run can neither save and resume trainer checkpoints nor snapshot in-flight rollouts. The context_compaction field comment says the same (config.py#L653-L656).
Why it matters
CC is meant for long, multi-turn agent runs, and those are the runs that most need to resume. Without checkpoints, any crash, preemption or job time limit loses the whole run. Under #4124 as it stands, one dropped prompt group also stops the run (see #4557 for retry), so a long CC run today has no way to recover from either.
The same root cause blocks retry in #4557: RL keeps the record of which responses the agent accepted only inside the request that ran it (rollout_manager.py#L2210-L2214). Persisting that state would likely unblock both.
Ask
- Persist the per-rollout CC selection state, so it survives a checkpoint and a restart.
- Allow
checkpointing.enabledwith CC: save, then resume and check that training continues from the same step with the same data order. - Allow rollout snapshots (
rollout_checkpointing.snapshot_attempt_interval_s) with CC, with a test that resumes in-flight groups. - Remove the two guards above once each part works.
- Dominant language
- Python
- Stars
- 2.1k
- Forks
- 599
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 232
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from NVIDIA-NeMo/RL
-
r0.8.0: pyrefly rejects captured optional config in make_policy_factory, blocking CIPossibly taken A pull request linked to this issue is open or already merged. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NVIDIA-NeMo/RL#4599 ·
Maintainers usually reply within 2 days
-
Feature
Difficulty 2/5 Half a day Newbie friendliness 78/100
NVIDIA-NeMo/RL#4016 ·
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
NVIDIA-NeMo/RL#2948 ·
Maintainers usually reply within 2 days
-
[Bug] `tilelang==0.1.11` pin in the `automodel` extra is x86-only; on aarch64 (GB200) the Automodel venv gets tilelang 0.1.12, `tile_kernels` cannot import, and DeepSeek-V4.1 training fails at the first forwardPossibly taken @linmuchuiyang claimed this 1 day ago. Openbug community-request
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
NVIDIA-NeMo/RL#4754 ·
Maintainers usually reply within 2 days
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 30/100
NVIDIA-NeMo/RL#4737 ·
Maintainers usually reply within 2 days
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Graphify-Labs/graphify#4524 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
topoteretes/cognee#5982 ·
Maintainers usually reply within 1 day
-
Patches of derivations with `__structuredAttrs` are ignoredPossibly taken @KiaraGrouwstra claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 81/100
nix-community/vulnix#184 ·
-
New InternshipOpennew_internship
Difficulty 1/5 Under an hour Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
aws-samples/sample-per-model-bedrock#295 ·
Maintainers usually reply within 1 day