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
Do not run the GC after every trial by default. #1380
Do not run the GC after every trial by default. #1380
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1380 +/- ##
==========================================
- Coverage 88.08% 88.06% -0.03%
==========================================
Files 97 97
Lines 7313 7297 -16
==========================================
- Hits 6442 6426 -16
Misses 871 871
Continue to review full report at Codecov.
|
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.
Thank you for your PR.
I think we need to set gc_after_trial=True
when we use ChainerMNStudy
(c.f., #325). I'm not sure if this issue affects the GitHub Actions, though.
Is it not addressed by https://github.com/optuna/optuna/blob/master/optuna/integration/chainermn.py#L146? I was also wondering whether this line should be kept or controllable similar to the standard |
The line is executed by non-rank-0 nodes, but I think we need to call GC for rank-0 node. The rank-0 node calls
Depending on the user code and environments, GC calls can be omitted. I support the latter approach, but I think we can work on it in a new PR. |
Thanks for your explanation. I now see what you meant, that the behavior of |
PTAL. |
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.
Thank you for the fruitful discussion about ChainerMN
. I understood the motivation of this PR better.
LGTM.
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 the PR and the reasonable discussion. LGTM!
Motivation
Fixes #1307. See this issue for discussions.
Description of the changes
Changes the default GC collection behavior of
Study.optimize
to not run a collection.