FunctionEvaluator#
- class optimas.evaluators.FunctionEvaluator(function, create_evaluation_dirs=False, redirect_logs_to_file=False)#
Evaluator class for executing an arbitrary function.
- Parameters:
- functioncallable
The function to be evaluated.
- create_evaluation_dirsbool
Whether to create a directory for each evaluation. The directories will be located in ./evaluations and be named sim{trial_index}. When using this option, the current working directory inside the
functionwill be changed to the corresponding evaluation directory. By default,False.- redirect_logs_to_filebool
Whether to redirect the logs (stdout and stderr) of the evaluation function to a file (log.out and log.err). This can be useful to keep the logs of the exploration clean, preventing many processes from writing to the terminal at once. If enabled, create_evaluation_dirs will be set to True.
Methods
Get the libE_specs for libEnsemble.
Return run parameters for this evaluator.
get_sim_specs(varying_parameters, ...)Get the sim_specs for libEnsemble.
Initialize the evaluator.