This PR enables two new workflows addressing #107:
Running an exploration in substeps:
# Create exploration.
exploration = Exploration(
generator=gen,
evaluator=ev,
max_evals=30,
sim_workers=2
)
# Run exploration in several steps until reaching 30 evaluations.
exploration.run(n_evals=3)
exploration.run(n_evals=4)
exploration.run(n_evals=10)
exploration.run(n_evals=5)
exploration.run() # Run remaining evaluations.
This can be useful when running optimas interactively. It would allow the user, for example, to tune the hyperparameters of the generator between each run.
Resuming from a previous exploration that was executed in the same exploration_dir_path.
# Create exploration.
exploration = Exploration(
generator=gen,
evaluator=ev,
max_evals=40,
sim_workers=2,
resume=True
)
# Run exploration until the total number of evaluations
# (including those of the previous run) reaches 40.
exploration.run()
This allows us to seamlessly continue a previous exploration
This features are enabled by the new 'reuse_output_dir' and 'final_gen_send' options in libensemblev1.0.0.
Changes
Added new n_evals argument to Exploration.run.
Added new resume option to Exploration.
The Exploration now keeps track of the number of evaluations.
The history file that is saved after run finishes is now called exploration_history_after_evaluation_{}.npy.
Added n_trials property to Generator to easily count how many trials it has generated.
The final batch of evaluations is now also given back to the Generator. Previously the generator was not informed about them. As a consequence, the last generated trials in the Ax generators remained as not completed, even though they did run.
A bug has been fixed in the gen_function where more trials than needed would be generated in the final batch. The gen_function is now aware of the maximum number of trials that should be generated.
The Exploration._reset_libensemble method has been removed. It seems that this workaround (introduced in #88) is no longer needed in libensemblev1.0.0.
This PR enables two new workflows addressing #107:
This can be useful when running
optimas
interactively. It would allow the user, for example, to tune the hyperparameters of the generator between eachrun
.exploration_dir_path
.This allows us to seamlessly continue a previous exploration
This features are enabled by the new
'reuse_output_dir'
and'final_gen_send'
options inlibensemble
v1.0.0
.Changes
n_evals
argument toExploration.run
.resume
option toExploration
.Exploration
now keeps track of the number of evaluations.run
finishes is now calledexploration_history_after_evaluation_{}.npy
.n_trials
property toGenerator
to easily count how many trials it has generated.Generator
. Previously the generator was not informed about them. As a consequence, the last generated trials in theAx
generators remained as not completed, even though they did run.gen_function
where more trials than needed would be generated in the final batch. Thegen_function
is now aware of the maximum number of trials that should be generated.Exploration._reset_libensemble
method has been removed. It seems that this workaround (introduced in #88) is no longer needed inlibensemble
v1.0.0
.libensemble
v1.0.0
.