-
Notifications
You must be signed in to change notification settings - Fork 458
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
Fix TPE Suggestion #1063
Fix TPE Suggestion #1063
Conversation
/retest |
/cc @gaocegege |
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
Thanks for the PR!
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: johnugeorge The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
2 similar comments
/retest |
/retest |
This PR fixes some problems in hyperopt Suggestion.
tpe
Algorithm on large-amount of Trials. After 20 Succeeded Trial I always got this error:I investigated hyperopt and found that here: https://github.com/hyperopt/hyperopt/blob/master/hyperopt/tpe.py#L906, we run just a simple random suggestion for
n_startup_jobs
times, and only after 20 Trials we start to runtpe
. I changed this number torequest_number
. Only in the firstGetSuggestion
call we must run random algorithm.To solve above error, I change structure of Doc. I believe, we can't use Trial name as
tid
in the Doc. Fortid
I use id generated byself.fmin
object. As well, I save Trial name to the spec section.I insert only new Trials in the Doc. I check which Trials have been already inserted in
recorded_trials_names
.To generate new ids every
GetSuggestions
call, I createFMinIter
instance in the first call. And I update information about succeeded Trials inself.fmin
object.To follow this PR Create Optimizer in BO Suggestion only for the first run #1057, Search Space is transformed to Domain only in the first
GetSuggestions
call.When we analyse information from Succeeded Trials we must cast values to
int
orfloat
or they will bestrings
and we will have errors intpe.suggest
After first
GetSuggestion
call,tpe.suggest
will generate only one Trial. I create a loop to run this method, in case that we need to create more than 1 Trial during Experiment.I tested
tpe
andrandom
on 150 Trial Experiment, I didn't get any errors.Please take a look.
/assign @gaocegege @johnugeorge
This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)