-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Use high progress_bar_refresh_rate on Google Colab #4654
Conversation
Hello @Samyak2! Thanks for updating this PR. There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-11-23 20:02:02 UTC |
Codecov Report
@@ Coverage Diff @@
## master #4654 +/- ##
======================================
Coverage 93% 93%
======================================
Files 118 118
Lines 9020 9021 +1
======================================
+ Hits 8393 8394 +1
Misses 627 627 |
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 is just for default values adjustment? or shall we cast anything smaller than 20 in COlab to 20?
I think if the user sets it manually to a value less than 20, we should not change that. I personally haven't experienced crashes with the default 1 (although the CPU usage is significantly higher for 1 than 20). Is there a way to find out if the user set it manually? |
what if the user sets it to |
That seems better. |
Automatically override progress_bar_refresh_rate when on Google Colab. Also added a constant IS_COLAB in utilities to check whether it is being run in colab or not. (#3786)
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 catch there !
Moved warning to configure_progress_bar instead of on_trainer_init
I actually disagree. I think its super useful as an override, less as warning. Do we have a way to tell if the user overrides? |
I don't think a force override is a good idea since it doesn't crash always with low refresh rate and what if the user wants |
Co-authored-by: Rohit Gupta <[email protected]>
* Use high refresh rate on Google Colab (#3786) Automatically override progress_bar_refresh_rate when on Google Colab. Also added a constant IS_COLAB in utilities to check whether it is being run in colab or not. (#3786) * Show a warning instead of overriding when rate is low on colab * Change warning to suggestion and move it Moved warning to configure_progress_bar instead of on_trainer_init * Apply suggestions from code review Co-authored-by: Rohit Gupta <[email protected]> * add a mock test Co-authored-by: chaton <[email protected]> Co-authored-by: Jirka Borovec <[email protected]> Co-authored-by: Rohit Gupta <[email protected]> (cherry picked from commit ccf38ce)
What does this PR do?
Automatically override
progress_bar_refresh_rate
when on Google Colab.For this, I added a
IS_COLAB
constant underutilities
.The changes in import were by
isort
.Fixes #3786
Before submitting
Did you have fun?
Yes 😄