ChainEvaluator#

class optimas.evaluators.ChainEvaluator(evaluators)#

Evaluator that executes a chain of TemplateEvaluators.

This is useful when each evaluation consists of several steps, where each step is a simulation with a different simulation code. Each step is defined by a TemplateEvaluator and can request a different number of resources.

Each evaluation with the ChainEvaluator gets allocated the maximum number of processes (n_procs) and GPUs (n_gpus) that every step might request (e.g., if one step requires n_procs=20 and n_gpus=0, and a second step requires n_procs=4 and n_gpus=4, each evaluation will get assigned n_procs=20 and n_gpus=4). Then each step will only make use of the subset of resources it needs.

Parameters:
evaluatorslist of TemplateEvaluators

A list of TemplateEvaluators given in the order in which they should be executed.

Methods

get_libe_specs()

Get the libE_specs for libEnsemble.

get_run_params()

Return run parameters for this evaluator.

get_sim_specs(varying_parameters, ...)

Get the sim_specs for libEnsemble.

initialize()

Initialize the evaluator.