Conversation
|
Hi @wunianze666-netizen, thanks for the PR! It does not appear to link an issue it fixes. If this PR addresses an existing issue, please add a closing keyword (e.g. Please note that PRs without a linked issue are likely to be automatically closed 10 days after this notice. Once the PR links an issue (or gets the |
|
Thanks for the reminder. This PR is one item in the multi-script umbrella tracker #8384, which still has many unchecked entries, so adding |
…-scheduler-epochs
|
Synced this branch with current Post-sync validation passed: Ruff check/format, Python compilation, |
|
This PR has been automatically closed because it does not link an issue and the reminder above was not addressed within 10 days. If this PR is still relevant, please link the issue it fixes (e.g. We are experimenting with this process to keep the review queue manageable, and it will sometimes get it wrong. If you think this PR should stay open, please just say so here and we will reopen it — no need to justify it at length. Thanks again for contributing, and sorry for the noise if we closed this by mistake! |
|
This fix is still relevant and remains an unfinished subtask of the umbrella tracker #8384. Could a maintainer please reopen the PR and apply the appropriate non-closing/no-issue-needed label for this umbrella-issue case? |
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
|
This PR has been automatically closed because it does not link an issue and the reminder above was not addressed within 10 days. If this PR is still relevant, please link the issue it fixes (e.g. We are experimenting with this process to keep the review queue manageable, and it will sometimes get it wrong. If you think this PR should stay open, please just say so here and we will reopen it — no need to justify it at length. Thanks again for contributing, and sorry for the noise if we closed this by mistake! |
|
Failing tests are unrelated. |
Part of #8384. This PR addresses one unchecked script and must not close the umbrella tracker.
Coordination and reproduction evidence: #8384 (comment)
This updates only
examples/research_projects/wuerstchen/text_to_image/train_text_to_image_lora_prior.pyto size the learning-rate scheduler using the post-sharding update count and Accelerate's process-scaled scheduler contract.Root cause
The scheduler was created before
accelerator.prepare()from the unsharded dataloader length, while warmup and training steps were multiplied by gradient accumulation instead of the number of processes. In distributed epoch-based training, the optimizer therefore consumed only part of the intended schedule.The change mirrors the established #8312 pattern:
accelerator.num_processes;accelerator.prepare();Focused reproduction
With five pre-sharding batches, two CPU/Gloo processes, gradient accumulation 2, and one epoch:
0.333333;0.000000on both ranks.Additional uneven-sharding arithmetic cases (7 batches / 3 processes and 11 batches / 2 processes) also match the actual process-scaled scheduler call count after the change.
Minimal training command
Validation
ruff checkon the changed scriptruff format --checkon the changed scriptpython -m py_compileon the changed scriptgit diff --check upstream/main...HEADAI assistance and self-review
This contribution was developed with Codex assistance. I read the repository's AI-agent guidance and ran the repository self-review rubric after syncing with current
main.@sayakpaul @geniuspatrick