- class history.History(alloc_specs, sim_specs, gen_specs, exit_criteria, H0)¶
The history class provides methods for managing the history array.
These are set on initialization.
H (numpy_structured_array) – History array storing rows for each point. Field names are in libensemble/tools/fields_keys.py
offset (int) – Starting index for this ensemble (after H0 read in)
index (int) – Index where libEnsemble should start filling in H
given_count (int) – Number of points given to sim fuctions (according to H)
returned_count (int) – Number of points evaluated (according to H)
Note that index, given_count and returned_count reflect the total number of points in H and therefore include those prepended to H in addition to the current run.
- __init__(alloc_specs, sim_specs, gen_specs, exit_criteria, H0)¶
Forms the numpy structured array that records everything from the libEnsemble run
- update_history_f(D, safe_mode)¶
Updates the history after points have been evaluated
- update_history_x_out(q_inds, sim_worker)¶
Updates the history (in place) when new points have been given out to be evaluated
q_inds (numpy array) – Row IDs for history array H
sim_worker (integer) – Worker ID
- update_history_x_in(gen_worker, D, safe_mode)¶
Updates the history (in place) when new points have been returned from a gen
gen_worker (integer) – The worker who generated these points
D (numpy array) – Output from gen_func
Adds k rows to H in response to gen_f producing more points than available rows in H.
k (integer) – Number of rows to add to H
Returns truncated array