Open cyberbob4 opened 5 years ago
@cyberbob4 thanks for your observation. I need to further investigate this. On the first look I'm not sure how this is possible, since we pass-through trials down to hyperopt's fmin
eventually, see here:
https://github.com/maxpumperla/hyperas/blob/master/hyperas/optim.py#L124
I want to continue optimization with additional runs. It seems that hyperopt can do this by setting the random seed and saving Trials. Ref: https://github.com/hyperopt/hyperopt/issues/267
To replicate the same workflow I set the random seed and then run my script with 1 evaluation. I then saved Trials to a pickle file. For next iteration I increased the number of runs to two and read the pickle file to initialize Trials. Previous run is read by hyperopt as it shows "using 1/1 trials" in the beginning instead of 0/0. Also it just does an additional run and stops. Unfortunately the run is not a different one. As a result I end up with two exactly same runs where it supposed to be a different run. Is this a bug or am I doing something wrong.
I am adding the code below which is for the second run. For the first one " trials = pickle.load(open("myfile.p", "rb"))" is commented instead of "trials = Trials()" and max_evals is set to 1.