-
-
Notifications
You must be signed in to change notification settings - Fork 965
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
Separate MOTPESampler
from TPESampler
#2616
Conversation
This pull request has not seen any recent activity. |
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. A first pass. 🙇
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.
@@ -32,8 +34,129 @@ def _default_weights_above(x: int) -> np.ndarray: | |||
return np.ones(x) | |||
|
|||
|
|||
class _ParzenEstimatorParameters( |
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 class is copied from optuna.samplers._tpe.parzen_estimator._ParzenEstimatorParameters
.
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.
[just a question] Is it OK not to add some prefix for indicating that this parameter (and estimator) are for multi-objective TPE?
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.
And is it needed to create a file for the estimator like _MultivariateParzenEstimator
or _ParzenEstimatorParameters
?
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 comment. These classes are only being added temporarily and will be integrated as the #2614 task progresses. Therefore, I'm not too concerned about naming conventions here.
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.
Mostly curious but could you possibly share more concretely how they will be merged together afterwards?
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.
pass | ||
|
||
|
||
class _ParzenEstimator(object): |
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 class is copied from optuna.samplers._tpe.parzen_estimator._ParzenEstimator
.
@@ -576,6 +700,162 @@ def after_trial( | |||
|
|||
self._mo_random_sampler.after_trial(study, trial, state, values) | |||
|
|||
def _sample_from_gmm( |
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.
The following methods are copied from optuna.samplers._tpe.TPESampler
.
Codecov Report
@@ Coverage Diff @@
## master #2616 +/- ##
==========================================
- Coverage 91.68% 91.63% -0.06%
==========================================
Files 138 138
Lines 11299 11445 +146
==========================================
+ Hits 10360 10488 +128
- Misses 939 957 +18
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.
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 notes to explain where the code was copied from. 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!
Depends on #2615.
Part of works for #2614.
Motivation
Currently, the
MOTPESampler
is defined to inherit from theTPESampler
and is heavily influenced by changes made to theTPESampler
. In order to phase in Issue #2614, this PR aims to make sure that theMOTPESampler
is not affected by theTPESampler
by copy-and-pasting some modules ofTPESampler
toMOTPESampler
.Description of the changes
MOTPESampler
fromTPESampler