Skip to content
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 no trainer scripts for language modeling and image classification examples #18443

Conversation

nandwalritik
Copy link
Contributor

What does this PR do?

Fixes #18437
Updated no_trainer scripts for examples/pytorch/image-classification/run_image_classification_no_trainer.py, examples/pytorch/language-modeling/run_clm_no_trainer.py and examples/pytorch/language-modeling/run_mlm_no_trainer.py to includegather_for_metrics.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

@muellerzr @sgugger
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.

@nandwalritik nandwalritik changed the title Update no trainer for language modeling and image classification examples Update no trainer scripts for language modeling and image classification examples Aug 3, 2022
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Aug 3, 2022

The documentation is not available anymore as the PR was closed or merged.

Copy link
Collaborator

@sgugger sgugger left a 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 working on this! Left two comments on the LM examples.

Copy link
Contributor

@muellerzr muellerzr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! 😄 👍

@sgugger sgugger merged commit 3db4378 into huggingface:main Aug 3, 2022
@sgugger
Copy link
Collaborator

sgugger commented Aug 3, 2022

Thanks again for your contribution!

oneraghavan pushed a commit to oneraghavan/transformers that referenced this pull request Sep 26, 2022
…ion examples (huggingface#18443)

* Update no_trainer script for image-classification

* Update no_trainer scripts for language-modeling examples

* Remove unused variable

* Removing truncation from losses array for language modeling examples
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update no_trainer scripts to include gather_for_metrics
4 participants