The current set of wrappers work well but can be rigid at times. We therefore require flexible wrappers that can handle both execution and data processing elements of the calibration workflow and do so in a user-defined fashion.
Changes
This PR provides
Initial call_experiment wrapper in the manager.py file
Tests of the experiment setup component of the manager through test_manager.py in tests. These are added in a new workflow, which is separate from test_toy_model.yaml that handles ABCtools tests.
A working example return-summaries using the wrapper to run simulations, execute a summary function over them, and store the products of both steps in two directories
Elements of the return-summaries example readme.md relevant to the creation of the manager wrapper are copied here
Goal
Purpose of this example is to show a simple implementation of the manager wrapper and how user defined calls are generated. The majority of the main.py file is used to create the user-specified simulation functions and parameter draw functions.
Calling experiments through the manager
There are only three required parameter inputs
config - configuration file to specify parameter inputs
experiment_mode - user-defined mode of the experiment that determines directory management, doesn't require using a string already known to the
write - tuple that tells the manager what outputs to write to files
The returned output of manager.call_experiment is a SimulationBundle object that contains the information from the simulations and summaries so that no information has to be written for further analysis.
Execution
Run the example from the terminal based in the main project directory
poetry install
poetry run python abctools/examples/return-summaries/main.py
Overview
The current set of wrappers work well but can be rigid at times. We therefore require flexible wrappers that can handle both execution and data processing elements of the calibration workflow and do so in a user-defined fashion.
Changes
This PR provides
call_experiment
wrapper in themanager.py
filetest_manager.py
intests
. These are added in a new workflow, which is separate fromtest_toy_model.yaml
that handles ABCtools tests.return-summaries
using the wrapper to run simulations, execute a summary function over them, and store the products of both steps in two directoriesElements of the return-summaries example
readme.md
relevant to the creation of the manager wrapper are copied hereGoal
Purpose of this example is to show a simple implementation of the manager wrapper and how user defined calls are generated. The majority of the
main.py
file is used to create the user-specified simulation functions and parameter draw functions.Calling experiments through the manager
There are only three required parameter inputs
config
- configuration file to specify parameter inputsexperiment_mode
- user-defined mode of the experiment that determines directory management, doesn't require using a string already known to thewrite
- tuple that tells the manager what outputs to write to filesThe returned output of
manager.call_experiment
is aSimulationBundle
object that contains the information from the simulations and summaries so that no information has to be written for further analysis.Execution
Run the example from the terminal based in the main project directory