Skip to content

Commit

Permalink
ready for release
Browse files Browse the repository at this point in the history
  • Loading branch information
Michelle Park committed Feb 23, 2019
1 parent 281390d commit e3845d6
Show file tree
Hide file tree
Showing 5 changed files with 124 additions and 13 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

**v1.0.0 - 02/22/19**

- Initial release
6 changes: 6 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
include README.rst
include CHANGELOG.rst
include setup.py

recursive-include src/vivarium_cluster_tools/ *.py

64 changes: 64 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
Vivarium Cluster Tools
=======================

This package includes a tool that allows vivarium users to run simulations based on multiple scenarios conveniently.
It requires an access to IHME cluster. To install this package, create or edit a file called ~/.pip/pip.conf which looks like this:

| [global]
| extra-index-url = http://dev-tomflem.ihme.washington.edu/simple
| trusted-host = dev-tomflem.ihme.washington.edu

This file tells the pip package management system to check with IHME's internal
pypi server for packages.

You can then install this package with

| > source activate <env-name>
| > pip install vivarium-cluster-tools
In addition, this tool needs redis client and cython.

| > conda install redis cython
How to use
-------------

The Vivarium ecosystem uses YAML configuration files throughout, including vivarium-cluster-tools.
To run the multiple scenarios, you need to make a separate branch file (YAML) in addition to a usual
vivarium model specification YAML file. You can specify how to vary a certain parameter in this branch file.
For example,

::

input_draw_count: 25
random_seed_count: 10

branches:
- intervention_name:
intervention_coverage: [0, 1]
efficacy: [0, .5, 1]

This branch shows that you want to have 25 different input draws, 10 different random seeds and 2 different
intervention coverages and 3 different intervention efficacy. This implies 25*10*2*3=1500 different simulation
scenarios. You can run all 1500 simulations by

::

psimulate run /path/to/your/model_configuration /path/to/your/branch_file

As an optional parameter, you can specify the name of project as well as result directory to save the outputs
and logs. To specify those optional arguments,

::

psimulate run /path/to/your/model_configuration /path/to/your/branch_file -p project_name -o /path/to/output/

If your psimulate run has any failed jobs from the previous runs, you can restart failed jobs by specifying
which output directory includes the partially completed jobs by,

::

psimulate restart /path/to/the/previous/results/


51 changes: 38 additions & 13 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
import os
from setuptools import setup, find_packages

if __name__ == "__main__":

setup(
name='vivarium_cluster_tools',
version='0.1',
packages=find_packages(where='src'),
package_dir={'': 'src'},
include_package_data=True,
entry_points="""
[console_scripts]
psimulate=vivarium_cluster_tools.cli:psimulate
""",
install_requires=[
base_dir = os.path.dirname(__file__)
src_dir = os.path.join(base_dir, "src")

about = {}
with open(os.path.join(src_dir, "vivarium_cluster_tools", "__about__.py")) as f:
exec(f.read(), about)

with open(os.path.join(base_dir, "README.rst")) as f:
long_description = f.read()

install_requires = [
'pandas',
'numpy',
'pyyaml',
Expand All @@ -20,5 +22,28 @@
'rq',
'vivarium',
'click',
],
)
]

setup(
name=about['__title__'],
version=about['__version__'],

description=about['__summary__'],
long_description=long_description,
url=about["__uri__"],

author=about["__author__"],
author_email=about["__email__"],

package_dir={'': 'src'},
packages=find_packages(where='src'),
include_package_data=True,
entry_points="""
[console_scripts]
psimulate=vivarium_cluster_tools.cli:psimulate
""",

install_requires=install_requires,

zip_safe=False,
)
12 changes: 12 additions & 0 deletions src/vivarium_cluster_tools/__about__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
__all__ = [
"__title__", "__summary__", "__uri__", "__version__", "__author__", "__email__",
]

__title__ = "vivarium_cluster_tools"
__summary__ = "A set of tools for running simulation using vivarium on cluster."
__uri__ = "https://stash.ihme.washington.edu/projects/CSTE/repos/vivarium_cluster_tools"

__version__ = "1.0.0"

__author__ = "The vivarium developers"
__email__ = "[email protected]"

0 comments on commit e3845d6

Please sign in to comment.