Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Context compaction: support trainer and rollout checkpoint/resume

Open
#4,558 0 comments 0 reactions 0 assignees View on GitHub

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

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

Feature

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

  1. Persist the per-rollout CC selection state, so it survives a checkpoint and a restart.
  2. Allow checkpointing.enabled with CC: save, then resume and check that training continues from the same step with the same data order.
  3. Allow rollout snapshots (rollout_checkpointing.snapshot_attempt_interval_s) with CC, with a test that resumes in-flight groups.
  4. 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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NVIDIA-NeMo/RL

All issues in NVIDIA-NeMo/RL

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.