-
-
Notifications
You must be signed in to change notification settings - Fork 971
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
Display best objective value in contour plot for a given param pair, not the value from the most recent trial #4848
Conversation
This patch changes behavior of contour plot (both backends) when two or more trials params are overlapping. Currently, the objective value always comes from the last completed trial. This implementation selects the best objective value wrt. optimization direction (with reasonable default in multi-objective cases).
@Alnusjaponica Could you review this PR? |
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 you PR! It's almost LGTM. Please check my comment.
optuna/visualization/_contour.py
Outdated
# In multi-objective case we don't know which objective was selected in target | ||
# function therefore we don't know how to select the best objective value. |
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.
Since target
is also used in single-objective optimization, could you please modify this comment? For example, other metrics or elapsed time may be used as target
.
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.
Good point, updated in 4d7f407.
I see the sphinx issue already fixed on main, so I'll leave it at that since this check is not required. |
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## master #4848 +/- ##
=======================================
Coverage 89.54% 89.54%
=======================================
Files 197 199 +2
Lines 14676 14740 +64
=======================================
+ Hits 13141 13199 +58
- Misses 1535 1541 +6
... and 10 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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! 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.
LGTM!
@not522 Could you merge this PR?
Motivation
This patch changes behavior of contour plot (both backends) when two or more trials params are overlapping. Closes #4733.
Description of the changes
Currently, the objective value always comes from the last completed trial. This implementation selects the best objective value w.r.t. optimization direction (with reasonable default in multi-objective cases).