experiment_runner
¶
helper module for running experiments and keeping track of which model has been initialized with which policy.
- class ema_workbench.em_framework.experiment_runner.ExperimentRunner(msis)¶
Helper class for running the experiments
This class contains the logic for initializing models properly, running the experiment, getting the results, and cleaning up afterwards.
- Parameters
msis (dict) –
model_kwargs (dict) –
- msi_initializiation¶
keeps track of which model is initialized with which policy.
- Type
dict
- msis¶
models indexed by name
- Type
dict
- model_kwargs¶
keyword arguments for model_init
- Type
dict
- run_experiment(experiment)¶
The logic for running a single experiment. This code makes sure that model(s) are initialized correctly.
- Parameters
experiment (Case instance) –
- Returns
experiment_id (int)
case (dict)
policy (str)
model_name (str)
result (dict)
- Raises
EMAError – if the model instance raises an EMA error, these are reraised.
Exception – Catch all for all other exceptions being raised by the model. These are reraised.