fix(trainer): preserve failures during async teardown - #238
Closed
CjhHa1 wants to merge 13 commits into
Closed
Conversation
…usion RL Diffusion sibling of AsyncARTrainer: subclasses DiffusionTrainer(layout=separate) to reuse the two-slab build + NCCLWeightSync handshake, and overlays the async rollout buffer loop (non-blocking generate, reap-time reward scoring off the train critical path, buffer of scored GRPO groups, train consumes the freshest batch). Knobs: max_inflight (overlap depth), buffer_max_staleness (0=on-policy). Adds unirl/trainer/async_diffusion.py, unirl/train_async_diffusion.py, and examples/diffusion/sd3/sd3_vllmomni_async.yaml. Purely additive.
…segment transfer, add BAGEL async recipe, drop SD3 async recipe
Default Hydra config still pointed at the dropped SD3 async yaml. Point train_async_diffusion at bagel_vllmomni_async and set buffer_max_staleness=2 (the throughput-optimal knob from the PR validation table).
Evaluate the resident rollout policy without syncing or offloading the async engine, while preserving synchronous defaults and forwarding configured eval suites.
State consistently that generation overlaps training while reap-time reward scoring remains synchronous.
Fail before worker construction unless max_inflight is exactly one, preserving the idle-worker window required by reap-time transfer.
Record the train slab fraction and describe the actual remote LoRA sync and bounded policy-lag ratio semantics without changing runtime behavior.
Protect resume/eval initialization and ensure secondary drain errors cannot mask the primary failure or skip checkpoint and logger finalization.
Collaborator
Author
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.
Summary
AsyncARTrainerandAsyncDiffusionTrainerKeyboardInterruptDependency
Stacked on #192 because the shared fix covers its new
AsyncDiffusionTrainer. Keep this PR draft until #192 merges; its diff againstmainwill then collapse to the teardown changes.Test plan
PYTHONPATH=$PWD python3 -m pytest -q tests/test_async_teardown.py(4 passed)pre-commit run --files unirl/trainer/base.py unirl/trainer/async_ar.py unirl/trainer/async_diffusion.py tests/test_async_teardown.py--cfg job --resolve)