-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Fixup all example CI tests and properly fail #517
Conversation
The documentation is not available anymore as the PR was closed or merged. |
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 fixes!
@@ -229,20 +229,14 @@ def training_function(config, args): | |||
with torch.no_grad(): | |||
outputs = model(**batch) | |||
predictions = outputs.logits | |||
predictions, references = accelerator.gather((predictions, batch["labels"])) |
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.
This will stop working on distributed setup. The predictions will need to be gathered (maybe not the labels).
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.
Should be fixed now
All slow ci is now passing here: https://github.com/huggingface/accelerate/runs/7358153325 |
Fix all example CI
What does this add?
This pr makes a variety of fixes to the example tests to solve all failures and properly ensure that failures occur when they need to
Why is it needed?
The entire list of issues I noticed are below:
CometMLTracker
to run offline tests with the tracking example script, so the CI now explicitly uninstalls themrequires_tracking
decorator for the example tests to make sure at least one tracking API is installed andcomet_ml
is not installedrun_command
function which will properly call a subprocess test function and check its outputs properly as well as fully fail if the call did not work.