jamesavery / veropt

Bayesian Optimisation for the Versatile Ocean Simulator (VEROS)
MIT License
0 stars 0 forks source link

Save and restore random state after each iteration #1

Open jamesavery opened 13 hours ago

jamesavery commented 13 hours ago

Save and restore random state after each iteration to make interrupted runs reproducable (and not replay the same random numbers).

Currently, we set the random seed from optimizer.json. Thus, whenever a run is restarted, the random seed is set to random_seed, instead of the state that the random number generator was in when the run was interrupted. So we need to store the random state in the .pkl restart files and restore it when resuming.