history arrayΒΆ

H: numpy structured array
    History to store output from gen_f/sim_f/alloc_f for each entry

Fields in H include those specified in sim_specs['out'], gen_specs['out'], and alloc_specs['out']. All values are initiated to 0 for integers, 0.0 for floats, and False for Booleans.

Below are the protected fields used in H. Other than 'sim_id' and cancel_requested, these fields cannot be overwritten by user functions (unless libE_spces['safe_mode'] is set to False).

libE_fields = [('sim_id', int),             # Unique id of entry in H that was generated
               ('gen_worker', int),         # Worker that (first) generated the entry
               ('gen_time', float),         # Time (since epoch) entry (first) was entered into H from a gen
               ('last_gen_time', float),    # Time (since epoch) entry was last requested by a gen
               ('given', bool),             # True if entry has been given for sim eval
               ('given_time', float),       # Time (since epoch) that the entry was (first) given to be evaluated
               ('last_given_time', float),  # Time (since epoch) that the entry was last given to be evaluated
               ('returned', bool),          # True if entry has been returned from sim eval
               ('returned_time', float),    # Time entry was (last) returned from sim eval
               ('sim_worker', int),         # Worker that did (or is doing) the sim eval
               ('cancel_requested', bool),  # True if cancellation of this entry is requested
               ('kill_sent', bool)          # True if a kill signal has been sent to worker

See also

Example sim_specs, gen_specs, and alloc_specs.


Users can check the internal consistency of a history array by importing check_inputs() and calling it with their gen_specs, alloc_specs, and sim_specs as keyword arguments:

from libensemble.tools import check_inputs

check_inputs(H0=my_H, sim_specs=sim_specs, alloc_specs=alloc_specs, gen_specs=gen_specs)