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
Update legacy Repository usage in various example files #29085
Update legacy Repository usage in various example files #29085
Conversation
…on/run_glue_no_trainer.py` Marked for deprecation here https://huggingface.co/docs/huggingface_hub/guides/upload#legacy-upload-files-with-git-lfs
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 for updating! Could you extend this to all the other examples which use Repository
?
@amyeroberts sure! Could you point out if I can find why the CI actions are failing? In the details it just shows as failed without any details. I ran the quality tools / tests locally and all seemed ok. |
@Hvanderwilk Great - thanks! For the failing runs on CI there's two things you'll need to do to get things passing:
|
1d9ae08
to
8366d95
Compare
8366d95
to
da71021
Compare
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 for all the work on this and improving our examples!
Just a few small changes to make, then we're good to merge!
examples/research_projects/codeparrot/scripts/codeparrot_training.py
Outdated
Show resolved
Hide resolved
examples/pytorch/image-classification/run_image_classification_no_trainer.py
Outdated
Show resolved
Hide resolved
examples/pytorch/semantic-segmentation/run_semantic_segmentation_no_trainer.py
Outdated
Show resolved
Hide resolved
with open(os.path.join(args.output_dir, ".gitignore"), "w+") as gitignore: | ||
if "step_*" not in gitignore: | ||
gitignore.write("step_*\n") | ||
if "epoch_*" not in gitignore: | ||
gitignore.write("epoch_*\n") |
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.
And here
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.
Alright, I've added it back and added it in an example which did not have it.
9a2239f
to
e11fba4
Compare
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 for all this work improving our examples!
What does this PR do?
The usage in the example is marked for deprecation here https://huggingface.co/docs/huggingface_hub/guides/upload#legacy-upload-files-with-git-lfs. Use the new recommended methods.
I've further removed the
epoch_/step_
gitignores, that seems a bit against the purpose of doing the intermediate push, for which some examples store models at an epoch.Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.