Skip to content

[Draft] Retain native Agent tasks across complete-turn weight publications - #2257

Draft
xs1997zju wants to merge 15 commits into
InternLM:mainfrom
xs1997zju:xt-resume
Draft

xs1997zju wants to merge 15 commits into
InternLM:mainfrom
xs1997zju:xt-resume

Conversation

@xs1997zju

@xs1997zju xs1997zju commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Agent tool work can outlive a colocated optimizer step. This change keeps Agent tasks on their existing owner, gates complete model requests during weight publication, and reopens admission only after every backend has installed the new version and is ready. It also binds request-time provenance to training traces and saves/restores quiescent Trainer, sampler and replay state. The default disabled paths remain available.

Base: main f1fddc506a49b7d0aa71554e26908885b37211cc; head 43d62b6e1cbc59aea24c3c2ac5c7d65a90c8ecf4. Production code matches integrated core 4876ad6f; the later head adds documentation. See docs/en/rl/advanced_tutorial/agent_turn_lifecycle.md.

Validation

The separate repaired native-MTP integration completed two real optimizer updates on eight H200s (4 groups × K4, Agent concurrency16), with before/after parameter witnesses on every training rank, eight actual inference receivers, publication-following Agent requests and real multi-turn tools. Native HF and full Trainer DCP saves, normal exit and owned sandbox/process cleanup passed independent checks. A fresh eight-GPU full Trainer cold restore matched full local MTP and bounded main/shared weights, optimizer step2, sampler counts/replay IDs, republished restored weights and served a committed real response. At the user's request this cold smoke stops there: no complete restored batch or third optimizer update is claimed.

This is engineering smoke evidence for the recorded integrated candidate, not learning/speedup evidence or an exact-tree GPU rerun of every public dependency. Runtime Lagent adapter instrumentation and CRG recipe differences remain recorded. Gate drain concerns complete HTTP leases, not entire Agent episodes; final/checkpoint quiesce may wait long-tail episodes. Unknown settlement remains fail-closed, without automatic in-run barrier recovery. Long-run object-store growth and general distributed failure recovery remain outside this smoke.

Related work and review

Lagent #385 targets v1.0.0 and provides request-ID/adapter changes. CRG !78 targets the CyberGym source branch and provides the separate recipe. Choose one MTP route: native #2292 or external #2289. This PR does not switch or implement either MTP route.

Real Kimi CLI reviewed this exact head using the original xt-review prompt, followed by cross-repository review and parent adjudication. The parent confirmed existing producer-failure monitoring with its dedicated passing CPU regression rather than adopting the review's contrary inference. Original reports, exact SHAs and session IDs are retained. Keep Draft; no automatic merge, session-affinity redesign or general fault-recovery claim.

@xs1997zju xs1997zju changed the title [Draft] Retain disaggregated Agent turns across weight updates [Draft] Retain native Agent tasks across complete-turn weight publications Nov 10, 2026
jayhenry pushed a commit that referenced this pull request Nov 17, 2026
fix(rollout): retry proxy admin connection timeouts

Mechanical extraction from XTuner #2257 fixed head 43d62b6. No new implementation.

Co-authored-by: Codex <codex@local.invalid>
jayhenry pushed a commit that referenced this pull request Nov 17, 2026
Mechanical extraction from XTuner #2257 fixed head 43d62b6. No new implementation.
jayhenry pushed a commit that referenced this pull request Nov 17, 2026
Existing #2257 tests/docs retained centrally; no equality burden on individual review commits.
Wuyh11 pushed a commit to Wuyh11/xtuner that referenced this pull request Nov 17, 2026
Mechanical extraction from XTuner InternLM#2257 fixed head 43d62b6. No new implementation.
Wuyh11 pushed a commit to Wuyh11/xtuner that referenced this pull request Nov 17, 2026
Mechanical extraction from XTuner InternLM#2257 fixed head 43d62b6. No new implementation.
Wuyh11 pushed a commit to Wuyh11/xtuner that referenced this pull request Nov 17, 2026
…nces

Mechanical extraction from XTuner InternLM#2257 fixed head 43d62b6. No new implementation.

Review commit only: protocol, affinity, lifecycle, Trainer guards and cold-start wiring form one atomic core merge group. Do not enable or merge this intermediate commit alone.
Trie traversal overlaps existing InternLM#2252; preserves InternLM#2257 request-aware reference rules rather than replacing the file.
Wuyh11 pushed a commit to Wuyh11/xtuner that referenced this pull request Nov 17, 2026
…rriers

Mechanical extraction from XTuner InternLM#2257 fixed head 43d62b6. No new implementation.

Review commit only: protocol, affinity, lifecycle, Trainer guards and cold-start wiring form one atomic core merge group. Do not enable or merge this intermediate commit alone.
Wuyh11 pushed a commit to Wuyh11/xtuner that referenced this pull request Nov 17, 2026
Mechanical extraction from XTuner InternLM#2257 fixed head 43d62b6. No new implementation.

Review commit only: protocol, affinity, lifecycle, Trainer guards and cold-start wiring form one atomic core merge group. Do not enable or merge this intermediate commit alone.
Wuyh11 pushed a commit to Wuyh11/xtuner that referenced this pull request Nov 17, 2026
Mechanical extraction from XTuner InternLM#2257 fixed head 43d62b6. No new implementation.

Review commit only: protocol, affinity, lifecycle, Trainer guards and cold-start wiring form one atomic core merge group. Do not enable or merge this intermediate commit alone.
Wuyh11 pushed a commit to Wuyh11/xtuner that referenced this pull request Nov 17, 2026
Mechanical extraction from XTuner InternLM#2257 fixed head 43d62b6. No new implementation.

Review commit only: protocol, affinity, lifecycle, Trainer guards and cold-start wiring form one atomic core merge group. Do not enable or merge this intermediate commit alone.
Wuyh11 pushed a commit to Wuyh11/xtuner that referenced this pull request Nov 17, 2026
Mechanical extraction from XTuner InternLM#2257 fixed head 43d62b6. No new implementation.
matrix72c pushed a commit to matrix72c/xtuner that referenced this pull request Nov 18, 2026
Mechanical extraction from XTuner InternLM#2257 fixed head 43d62b6. No new implementation.
matrix72c pushed a commit to matrix72c/xtuner that referenced this pull request Nov 18, 2026
Mechanical extraction from XTuner InternLM#2257 fixed head 43d62b6. No new implementation.
matrix72c pushed a commit to matrix72c/xtuner that referenced this pull request Nov 18, 2026
Mechanical extraction from XTuner InternLM#2257 fixed head 43d62b6. No new implementation.
matrix72c pushed a commit to matrix72c/xtuner that referenced this pull request Nov 18, 2026
…nces

Mechanical extraction from XTuner InternLM#2257 fixed head 43d62b6. No new implementation.

Review commit only: protocol, affinity, lifecycle, Trainer guards and cold-start wiring form one atomic core merge group. Do not enable or merge this intermediate commit alone.
Trie traversal overlaps existing InternLM#2252; preserves InternLM#2257 request-aware reference rules rather than replacing the file.
matrix72c pushed a commit to matrix72c/xtuner that referenced this pull request Nov 18, 2026
…rriers

Mechanical extraction from XTuner InternLM#2257 fixed head 43d62b6. No new implementation.

Review commit only: protocol, affinity, lifecycle, Trainer guards and cold-start wiring form one atomic core merge group. Do not enable or merge this intermediate commit alone.
matrix72c pushed a commit to matrix72c/xtuner that referenced this pull request Nov 18, 2026
Mechanical extraction from XTuner InternLM#2257 fixed head 43d62b6. No new implementation.

Review commit only: protocol, affinity, lifecycle, Trainer guards and cold-start wiring form one atomic core merge group. Do not enable or merge this intermediate commit alone.
matrix72c pushed a commit to matrix72c/xtuner that referenced this pull request Nov 18, 2026
Mechanical extraction from XTuner InternLM#2257 fixed head 43d62b6. No new implementation.

Review commit only: protocol, affinity, lifecycle, Trainer guards and cold-start wiring form one atomic core merge group. Do not enable or merge this intermediate commit alone.
matrix72c pushed a commit to matrix72c/xtuner that referenced this pull request Nov 18, 2026
Mechanical extraction from XTuner InternLM#2257 fixed head 43d62b6. No new implementation.

Review commit only: protocol, affinity, lifecycle, Trainer guards and cold-start wiring form one atomic core merge group. Do not enable or merge this intermediate commit alone.
matrix72c pushed a commit to matrix72c/xtuner that referenced this pull request Nov 18, 2026
Mechanical extraction from XTuner InternLM#2257 fixed head 43d62b6. No new implementation.
matrix72c pushed a commit to matrix72c/xtuner that referenced this pull request Nov 18, 2026
Mechanical extraction from XTuner InternLM#2257 fixed head 43d62b6. No new implementation.
matrix72c pushed a commit to matrix72c/xtuner that referenced this pull request Nov 18, 2026
Existing InternLM#2257 tests/docs retained centrally; no equality burden on individual review commits.
jayhenry pushed a commit that referenced this pull request Nov 20, 2026
Mechanical extraction from XTuner #2257 fixed head 43d62b6. No new implementation.
jayhenry pushed a commit that referenced this pull request Nov 20, 2026
Mechanical extraction from XTuner #2257 fixed head 43d62b6. No new implementation.
jayhenry pushed a commit that referenced this pull request Nov 20, 2026
Existing #2257 tests/docs retained centrally; no equality burden on individual review commits.
jayhenry pushed a commit that referenced this pull request Nov 20, 2026
Mechanical extraction from XTuner #2257 fixed head 43d62b6. No new implementation.
jayhenry pushed a commit that referenced this pull request Nov 20, 2026
Mechanical extraction from XTuner #2257 fixed head 43d62b6. No new implementation.
jayhenry pushed a commit that referenced this pull request Nov 20, 2026
Existing #2257 tests/docs retained centrally; no equality burden on individual review commits.
jayhenry pushed a commit that referenced this pull request Nov 20, 2026
Mechanical extraction from XTuner #2257 fixed head 43d62b6. No new implementation.
jayhenry pushed a commit that referenced this pull request Nov 20, 2026
Existing #2257 tests/docs retained centrally; no equality burden on individual review commits.
jayhenry pushed a commit that referenced this pull request Nov 20, 2026
fix(rl): preserve global sampler identity and epoch on resume

Mechanical extraction from XTuner #2257 fixed head 43d62b6. No new implementation.

Co-authored-by: Codex <codex@local.invalid>
jayhenry pushed a commit that referenced this pull request Nov 20, 2026
fix(rl): release training batch references when fit fails

Mechanical extraction from XTuner #2257 fixed head 43d62b6. No new implementation.

Co-authored-by: Codex <codex@local.invalid>
jayhenry pushed a commit that referenced this pull request Nov 20, 2026
…RL (#2298)

feat(rl): reuse rollout and training debug phases for disaggregated runs

Mechanical extraction from XTuner #2257 fixed head 43d62b6. No new implementation.

Co-authored-by: Codex <codex@local.invalid>
jayhenry pushed a commit that referenced this pull request Nov 20, 2026
…#2299)

* feat(rl): expose optional valid-attempt filtering and sandbox metadata

Mechanical extraction from XTuner #2257 fixed head 43d62b6. No new implementation.

* test(rl): retain existing Agent lifecycle regressions and documentation

Existing #2257 tests/docs retained centrally; no equality burden on individual review commits.

---------

Co-authored-by: Codex <codex@local.invalid>

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant