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

Avoid flaky trainer test failures #17979

Merged
merged 1 commit into from
Jul 1, 2022

Conversation

ydshieh
Copy link
Collaborator

@ydshieh ydshieh commented Jul 1, 2022

What does this PR do?

Avoid flaky trainer test failures on multi GPUs.

I ran the test 1000 times on single/muti GPU VMs.

  • single gpu: all 0.0
  • multi gpu: a lot of 0.0, but the largest can go 1e-4.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jul 1, 2022

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

@ydshieh ydshieh requested review from stas00 and sgugger July 1, 2022 14:46
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 for fixing those!

Copy link
Contributor

@stas00 stas00 left a comment

Choose a reason for hiding this comment

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

I assume that 1e-7 and 1e-6 were still flakey, right? Just concerned with very low margin where it could potentially hide issues.

But otherwise looks good. Thank you for fixing, @ydshieh

@ydshieh
Copy link
Collaborator Author

ydshieh commented Jul 1, 2022

I assume that 1e-7 and 1e-6 were still flakey, right? Just concerned with very low margin where it could potentially hide issues.

But otherwise looks good. Thank you for fixing, @ydshieh

From Slack report, I could see a few times with 2e-6. On my manual tests (1000 times), multi GPUs could reach 1e-4. I choose 1e-5, thinking the test failure would be super rare.

@stas00
Copy link
Contributor

stas00 commented Jul 1, 2022

Super, thank you for sharing the details of why this value was chosen, @ydshieh!

All is good.

@ydshieh ydshieh merged commit 664688b into huggingface:main Jul 1, 2022
viclzhu pushed a commit to viclzhu/transformers that referenced this pull request Jul 18, 2022
@ydshieh ydshieh deleted the fix_flaky_trainer_test branch September 7, 2022 08:11
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.

4 participants