leap_ec.distributed package¶
Submodules¶
leap_ec.distributed.asynchronous module¶
leap_ec.distributed.evaluate module¶
leap_ec.distributed.individual module¶
Subclass of core.Individual that adds some state relevant for distributed runs.
Adds:
uuid for each individual
birth ID, a unique birth number; first individual has ID 0, the last N-1.
-
class
leap_ec.distributed.individual.
DistributedIndividual
(genome, decoder=None, problem=None)¶ Bases:
leap_ec.individual.RobustIndividual
-
birth_id
= count(0)¶ Core individual that has unique UUID and birth ID.
-
leap_ec.distributed.logger module¶
leap_ec.distributed.probe module¶
A collection of probe functions tailored for distributed evaluation
-
leap_ec.distributed.probe.
log_pop
(update_interval, stream=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>, header=True)¶ Regularly update a CSV formatted stream with snapshots of the given population.
This is useful for asynchronous.steady_state() to regularly probe the regularly updated population.
- Parameters
update_interval – how often should we write a row?
stream – open stream to which to write rows
header – True if we want a header for the CSV file
- Returns
a function for saving regular population snapshots
-
leap_ec.distributed.probe.
log_worker_location
(stream=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>, header=True)¶ When debugging dask distribution configurations, this function can be used to track what machine and process was used to evaluate a given individual. Accumulates this information to the given stream as a CSV.
Suitable for being passed as the evaluated_probe argument for leap.distributed.asynchronous.steady_state().
- Parameters
stream – to which we want to write the machine details
header – True if we want a header for the CSV file
- Returns
a function for recording where individuals are evaluated