-
Couldn't load subscription status.
- Fork 6.5k
Use upload_folder in training scripts
#2934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use upload_folder in training scripts
#2934
Conversation
|
Can we merge this one in? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for handling this one!
Also, I love the little cleaning you have done to remove the bloating of code.
Could we also ensure the related tests pass the CI?
|
The documentation is not available anymore as the PR was closed or merged. |
|
@yiyixuxu could you give this a quick review as well? I think we're good to merge this one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
|
@patrickvonplaten could you give it a quick look as well? |
|
Some tests are still failing but I'm not sure they are related to my changes. Otherwise, I wrote a few warnings in the description but that's it from my side. |
|
Yes, sorry @Wauplin! https://github.com/huggingface/diffusers/actions/runs/4599394852/jobs/8124713689?pr=2934 should be fixed with #2959. MPS test failure is unrelated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super cool PR - much more concise thanks a lot!
|
Merging, taking:
as a "approved" |
use upload folder in training scripts Co-authored-by: testbot <lucainp@hf.co>
use upload folder in training scripts Co-authored-by: testbot <lucainp@hf.co>
use upload folder in training scripts Co-authored-by: testbot <lucainp@hf.co>
Related to #2860.
Updated some training scripts to use
upload_folderinstead ofRepository.push_to_hub. The two advantages are upload speed (x1.5?) and UX (progress bars).As said in #2860 (comment),
upload_folderdoes not supportblocking=False(see huggingface/huggingface_hub#939). This means I did not update the scripts that are pushing weights while training (train_dreambooth_flax.py,./research_projects/onnxruntime/unconditional_image_generation/train_unconditional.pyand./unconditional_image_generation/train_unconditional.py).Worth mentioning that this is not ISO-feature with the previous scripts. In particular,
upload_folderdoes not take into account if there is a.gitignorefile in the output_dir already.(Personal opinion: I think this PR makes the training script a bit cleaner (less duplicated code) but if you prefer to stick to the existing ones for consistency, I completely get it as well)