-
Notifications
You must be signed in to change notification settings - Fork 27.3k
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
examples/run_summarization_no_trainer: fixed incorrect param to hasattr #18720
Conversation
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. |
Would you like to take a look at this, @muellerzr? |
@rahular this isn't quite the right solution. What this needs to check here is whether or not the checkpointing steps passed were either |
Hi @muellerzr,
Let me know what you think. |
@rahular good point! I think in that case something like the following chain may be how we want to do this: checkpointing_steps = args.checkpointing_steps
if checkpointing_steps is not None and checkpointing_steps.isdigit():
checkpointing_steps = int(checkpointing_steps) Since it's always present (it's part of the arg parser) and we really care if it's not None or if it's a digit. Does this make sense to you as well? (And the default is |
@muellerzr makes sense! Have simplified it and pushed. |
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.
Great job!
Likely the rest of the no_trainer
scripts will need this update as well. Would you like to tackle this? :) (This can be done in a separate PR)
Also make sure to run |
@muellerzr Sure I can take a look at other trainers as well! |
@muellerzr let's close this PR and I will update the other trainers and create a new request. |
…tr (huggingface#18720) * fixed incorrect param to hasattr * simplified condition checks * code cleanup
What does this PR do?
Fixes a small bug in
examples/run_summarization_no_trainer.py
which resulted in the script not checkpointing models even if the correct argument was passed from CLI.Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
@sgugger @patil-suraj