fix(rlix): always resume generation after finalize#14
Merged
TianyeGGBond merged 1 commit intoMay 18, 2026
Merged
Conversation
Collaborator
|
lgtm |
zhenyulincs
added a commit
that referenced
this pull request
May 24, 2026
…+ release-on-sync-failure) Doc-audit gap closed. Tianye's `#14` (`tianye/m11-finalize-always-continue`, merged 2026-05-18 as `8727394`) was never reflected in the implementation guide. PR #14 contains two commits, both pure `try/finally` cleanup-path fixes paralleling Phase 1 (R04-F1) and Phase 7 (F3+F4): - `0302437 fix(rlix): always resume generation after finalize` — `rlix/pipeline/miles_model_update_service.py:307-323`. Wraps `_ray_get(finalize_refs)` in try/finally so `continue_generation` always fires; prevents indefinite engine pause after finalize raises. Test: `tests/test_miles_model_update_service_cleanup.py` (51 LoC). - `a8460a9 fix(rlix): release train GPUs after sync failure` — `rlix/pipeline/miles_pipeline.py:674-697`. Wraps `sync_base_weights_to_active` in try/finally so `_notify_release_cluster_gpus` always fires; prevents scheduler-ledger leak of actor_train allocation when sync raises after train actor offloaded. R11-F1 invariant preserved. Test: `tests/test_miles_pipeline_after_training_cleanup.py` (39 LoC). Promoted to §3.6 (top-level) per Codex recommendation — PR #14 is a distinct merged PR, not an M11.3 open issue, so it belongs as a §3.5 sibling rather than nested below "Open M11.3 follow-ups". Append-only verified: diff <HEAD:doc> <working> | grep '^<' = 0 lines. Codex APPROVE_WITH_NOTES (0 BLOCKERS) pre-commit: - Zero deletions confirmed. - Diff content of `0302437` + `a8460a9` confirmed accurate. - Test files confirmed on disk. - Per-row markers not needed: sub-section-level marker suffices.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Ensures
MilesModelUpdateService._run_atomic_unit()always attemptscontinue_generationafter thefinalize_weight_updatefan-out, even whenfinalize_weight_updateraises.Why
Before this change, the sequence was:
If
finalize_weight_updatefailed or timed out, control left_run_atomic_unit()beforecontinue_generation()ran. Any engine paused by the pre-finalizepause_generation(mode="retract")could remain paused indefinitely, causing the nextgeneratepath to hang in a misleading way.Correctness Semantics
This change does not treat a failed weight update as successful.
continue_generationhere is only cleanup for the SGLang scheduler pause state. Iffinalize_weight_updatefails:set_weight_versionis not calledSo the failure remains explicit, but we avoid leaking the engine in a paused control-plane state.
Before
After
Tests
Added a lightweight regression test that checks the cleanup contract structurally, without Ray or GPU dependencies:
Result:
Scope
Exception-safety hardening only. Happy-path ordering and version publishing behavior are unchanged.