Repository navigation
fix(fastsac): 修正首次训练初始化与吞吐量状态显示 - #137
Merged
Merged
Conversation
wlgys8
force-pushed
the
fix/136-fastsac-startup-status
branch
from
October 18, 2026 17:23
cc0bdd9 to
10c20a8
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
The changes alter concurrency-sensitive startup gating in the multi-process async FastSAC trainer, and the PR notes the FastSAC test suite could not be executed and real GPU/CUDA-Graph startup behavior was not verified.
No open issues 🎉
What changed in this PR
This PR addresses issue #136, where the FastSAC async trainer prematurely switched from the startup panel to the training panel before learners finished their first (potentially lazily-compiled) update, and where sampling stalls were misrendered as warming up. The fix is scoped strictly to startup-readiness gating and console status wording; it deliberately does not touch learner training/data-movement scheduling.
Changes:
- Added a per-run
training_startedflag to learner panel payloads (published immediately on the first completed update, not after a full log interval), and gate the training-panel handoff on all learners reporting it — with a short-run escape so runs that end during replay warmup still shut down cleanly. - Reworked the panel rate window so a non-empty time span with zero step progress reports a measured
0 env-steps/sinstead ofNone, and disambiguated theNonerate aswarming up(replay warmup) vsmeasuring…(no span yet). - Added regression tests for console throughput wording and for async-panel first-update waiting, zero-throughput-after-stall, and no-update short runs.
| File | Description |
|---|---|
motrix_rl/src/motrix_rl/console.py |
Renders warming up vs measuring… based on the warming flag at all three None-rate sites; comment reworded. |
motrix_rl_builtin/src/motrix_rl_builtin/fastsac/async_impl/worker.py |
Emits training_started in payloads and publishes the first-update payload immediately. |
motrix_rl_builtin/src/motrix_rl_builtin/fastsac/async_impl/train.py |
Gates panel handoff on all learners' first updates, adds a dead-learner break, and reports measured-zero throughput. |
motrix_rl/tests/test_console.py |
Parametrized test covering missing-measurement vs replay-warmup vs zero-throughput wording. |
motrix_rl_builtin/tests/test_fastsac_live_metrics.py |
Adds updates/training_started to the scripted learner and three async-panel regression tests. |
Review effort: Balanced
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.
摘要
Closes #136
本 PR 只修复启动就绪判断和 console 状态表达,不修改 learner 训练/数据搬运调度。
initializing first update…。training_started状态,避免把 resume 的历史 update counter 当作本次初始化已完成。measuring…,不再误显示warming up。范围
首次 lazy compilation / CUDA Graph 初始化仍然可能耗时。本改动把首批初始化保留在启动阶段明确展示,不消除实际编译或 ring 等待。
根据 review,撤回初版中的 chunk 间 drain、staging stream 同步和相关调度测试。这些 learner 流水线改动需要独立正确性和性能验证,不属于本次状态修复范围。更新预算、strict UTD、ring 消费和 CUDA stream 同步保持原实现。
回归覆盖
验证
python -m pytest motrix_rl/tests/test_console.py -q,25 passed。ImportError: libcudnn.so.9)在收集阶段失败,未执行测试;未安装或修改依赖。