Vivarium Command Line Tools
vivarium
provides the tool simulate for running simulations
from the command line. It provides three subcommands:
Name |
Description |
---|---|
run
|
Runs a single simulation from a model specification file.
|
test
|
Runs an example simulation that comes packaged with
vivarium .Useful as an installation test.
|
profile
|
Produces a profile of a simulation using the python
cProfile module |
For more information, see the tutorial on running simulations from the command line.
simulate
A command line utility for running a single simulation.
You may initiate a new run with the run
sub-command, initiate a test
run of a provided model specification with the test
subcommand, or
profile a simulation run with the profile
subcommand.
simulate [OPTIONS] COMMAND [ARGS]...
profile
Run a simulation based on the provided MODEL_SPECIFICATION and profile the run.
simulate profile [OPTIONS] MODEL_SPECIFICATION
Options
- -o, --results_directory <results_directory>
The directory to write results to. A folder will be created in this directory with the same name as the configuration file.
- --process, --no-process
Automatically process the profile to human readable format with pstats, sorted by cumulative runtime, and dump to a file
Arguments
- MODEL_SPECIFICATION
Required argument
run
Run a simulation from the command line.
The simulation itself is defined by the given MODEL_SPECIFICATION yaml file.
Within the results directory, which defaults to ~/vivarium_results if none is provided, a subdirectory will be created with the same name as the MODEL_SPECIFICATION if one does not exist. Results will be written to a further subdirectory named after the start time of the simulation run.
simulate run [OPTIONS] MODEL_SPECIFICATION
Options
- -i, --artifact_path <artifact_path>
The path to the artifact data file.
- -o, --results_directory <results_directory>
The directory to write results to. A folder will be created in this directory with the same name as the configuration file.
- -v, --verbose
Logs verbosely. Useful for debugging and development.
- -q, --quiet
Suppresses all logging except for warnings and errors.
- --pdb
Drop into python debugger if an error occurs.
Arguments
- MODEL_SPECIFICATION
Required argument
test
Run a test simulation using the disease_model.yaml
model specification
provided in the examples directory.
simulate test [OPTIONS]