Skip to main content

A set of tools for running simulation using vivarium on cluster.

Project description

https://badge.fury.io/py/vivarium-cluster-tools.svg Latest Version Documentation Status

Vivarium cluster tools is a python package that makes running vivarium simulations at scale on a Univa Grid Engine cluster easy.

Installation

You can install this package with

pip install vivarium-cluster-tools

In addition, this tool needs the redis client. This must be installed using conda.

conda install redis

A simple example

If you have a vivarium model specifcation file defining a particular model, you can use that along side a branches file to launch a run of many simulations at once with variations in the input data, random seed, or with different parameter settings.

psimulate run /path/to/model_specification.yaml /path/to/branches_file.yaml

The simplest branches file defines a count of input data draws and random seeds to launch.

input_draw_count: 25
random_seed_count: 10

This branches file defines a set of simulations for all combinations of 25 input draws and 10 random seeds and so would run, in total, 250 simulations.

You can also define a set of parameter variations to run your model over. Say your original model specification looked something like

plugins:
  optional: ...

components:
  vivarium_public_health:
    population:
      - BasePopulation()
      - Mortality()
    disease.models:
      - SIS('lower_respiratory_infections')
  my_lri_intervention:
    components:
      - GiveKidsVaccines()

configuration:
  population:
    population_size: 1000
    age_start: 0
    age_end: 5
  lri_vaccine:
    coverage: 0.2
    efficacy: 0.8

Defining a simple model of lower respiratory infections and a vaccine intervention. You could then write a branches file that varied over both input data draws and random seeds, but also over different levels of coverage and efficacy for the vaccine. That file would look like

input_draw_count: 25
random_seed_count: 10

branches:
  lri_vaccine:
    coverage: [0.0, 0.2, 0.4, 0.8, 1.0]
    efficacy: [0.4, 0.6, 0.8]

The branches file would overwrite your original lri_vaccine configuration with each combination of coverage and efficacy in the branches file and launch a simulation. More, it would run each coverage-efficacy pair in the branches for each combination of input draw and random seed to produce 25 * 10 * 5 * 3 = 3750 unique simulations.

To read about more of the available features and get a better understanding of how to correctly write your own branches files, check out the vivarium cluster tools documentation.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vivarium_cluster_tools-1.2.11.tar.gz (29.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vivarium_cluster_tools-1.2.11-py3-none-any.whl (31.6 kB view details)

Uploaded Python 3

File details

Details for the file vivarium_cluster_tools-1.2.11.tar.gz.

File metadata

  • Download URL: vivarium_cluster_tools-1.2.11.tar.gz
  • Upload date:
  • Size: 29.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12

File hashes

Hashes for vivarium_cluster_tools-1.2.11.tar.gz
Algorithm Hash digest
SHA256 352f76439859a592c5d0143f3ff9c4043af399d3454c6bc4b7326f9b9c5eca06
MD5 03f0185517eca097f2ed7cd122ccc007
BLAKE2b-256 18d5a7209b39a652c21dd141fbc669a4cb2e68829d9229ae528860746ababb1c

See more details on using hashes here.

File details

Details for the file vivarium_cluster_tools-1.2.11-py3-none-any.whl.

File metadata

  • Download URL: vivarium_cluster_tools-1.2.11-py3-none-any.whl
  • Upload date:
  • Size: 31.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12

File hashes

Hashes for vivarium_cluster_tools-1.2.11-py3-none-any.whl
Algorithm Hash digest
SHA256 3f5718eaa209886b402a191b9eedb46cf3e8b75c755dac7bf199cd4e830d680a
MD5 3684eb753d930b19d6acb03373c935dc
BLAKE2b-256 c53f4357e8184b1f2b13263db2291799462c20d9574e50704890fa526e5a0f52

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page