Skip to content

Commit e6a7274

Browse files
committed
first commit
Change-Id: Ica6a8c4c16b1bbba11fa6021dad7d1ac68fa32f1
1 parent e94be56 commit e6a7274

File tree

11 files changed

+799
-0
lines changed

11 files changed

+799
-0
lines changed

.gitignore

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
SOURCES.txt
2+
*.svg
3+
*.png
4+
*.DS_Store
5+
6+
*~
7+
*.pyc
8+
*.swo
9+
egg-info/
10+
*checkpoints
11+
*.run*
12+
*.pkl
13+
*.mvd*
14+
output/
15+
*profile_benchmark*
16+
*stdout
17+
*.swp
18+
.idea/
19+
*.c
20+
*.o
21+
*.so
22+
uild/*
23+
24+
# jupyter notebook
25+
*jupyter-log*
26+
.ipynb_checkpoints/
27+
28+
*.eqc
29+
30+
*si_*
31+
*si_*
32+
*.log
33+
34+
# Byte-compiled / optimized / DLL files
35+
__pycache__/
36+
*.py[cod]
37+
*$py.class
38+
39+
# C extensions
40+
*.so
41+
*.c
42+
*.cpp
43+
44+
# Distribution / packaging
45+
.Python
46+
env/
47+
build/
48+
develop-eggs/
49+
dist/
50+
downloads/
51+
eggs/
52+
.eggs/
53+
lib/
54+
lib64/
55+
parts/
56+
sdist/
57+
var/
58+
wheels/
59+
*.egg-info/
60+
.installed.cfg
61+
*.egg
62+
63+
# PyInstaller
64+
# Usually these files are written by a python script from a template
65+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
66+
*.manifest
67+
*.spec
68+
69+
# Installer logs
70+
pip-log.txt
71+
pip-delete-this-directory.txt
72+
73+
# Unit test / coverage reports
74+
htmlcov/
75+
.tox/
76+
.coverage
77+
.coverage.*
78+
.cache
79+
nosetests.xml
80+
coverage.xml
81+
*.cover
82+
.hypothesis/
83+
84+
# Translations
85+
*.mo
86+
*.pot
87+
88+
# Django stuff:
89+
*.log
90+
local_settings.py
91+
92+
# Flask stuff:
93+
instance/
94+
.webassets-cache
95+
96+
# Scrapy stuff:
97+
.scrapy
98+
99+
# Sphinx documentation
100+
docs/_build/
101+
102+
# PyBuilder
103+
target/
104+
105+
# Jupyter Notebook
106+
.ipynb_checkpoints
107+
108+
# pyenv
109+
.python-version
110+
111+
# celery beat schedule file
112+
celerybeat-schedule
113+
114+
# SageMath parsed files
115+
*.sage.py
116+
117+
# dotenv
118+
.env
119+
120+
# virtualenv
121+
.venv
122+
venv/
123+
ENV/
124+
125+
# Spyder project settings
126+
.spyderproject
127+
.spyproject
128+
129+
# Rope project settings
130+
.ropeproject
131+
132+
# mkdocs documentation
133+
/site
134+
135+
# mypy
136+
.mypy_cache/
137+
138+
# pytest
139+
.pytest_cache

.gitreview

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[gerrit]
2+
host=bbpcode.epfl.ch
3+
port=22
4+
project=cells/bluepyparallel
5+
defaultbranch=master
6+
defaultremote=origin

.pylintrc

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
## look at http://docutils.sourceforge.net/sandbox/py-rest-doc/utils/pylintrc
2+
# for some of the options that are available
3+
4+
[MESSAGES CONTROL]
5+
#C0103 - Invalid name "%s" (should match %s) - matches too many things, like variables w/ single char names
6+
#R0904 - Too Many public methods
7+
#R0903 - Too Few public methods
8+
#W0511 - TODO in code
9+
#W0232 - Class has no __init__ method
10+
#R0922 - Abstract class is only referenced 1 times
11+
#R0801 - Similar lines in %d files
12+
#R0921 - Abstract class not referenced
13+
#W0141 - Used builtin function 'map'
14+
#R0401 - cyclic-import
15+
#I0013 - Ignore the 'Ignoring entire file' warning
16+
#W0142 - Used * or ** magic
17+
#W0622 - redefined-builti
18+
#C0325 - superfluous-parens
19+
#R0205 - useless-object-inheritance
20+
disable=C0103,R0904,R0903,W0511,W0232,R0922,R0801,R0921,W0141,R0401,I0013,W0142,W0622,C0325,R0205,C0330,C0302,E231,C0415,R0201,E1133,C0112,C0116,W0221
21+
22+
[FORMAT]
23+
# Maximum number of characters on a single line.
24+
max-line-length=100
25+
26+
[DESIGN]
27+
# Maximum number of arguments for function / method
28+
max-args=15
29+
# Argument names that match this expression will be ignored. Default to name
30+
# with leading underscore
31+
ignored-argument-names=_.*
32+
# Maximum number of locals for function / method body
33+
max-locals=25
34+
# Maximum number of return / yield for function / method body
35+
max-returns=6
36+
# Maximum number of branch for function / method body
37+
max-branches=20
38+
# Maximum number of statements in function / method body
39+
max-statements=60
40+
# Maximum number of parents for a class (see R0901).
41+
max-parents=10
42+
# Maximum number of attributes for a class (see R0902).
43+
max-attributes=40
44+
# Minimum number of public methods for a class (see R0903).
45+
min-public-methods=2
46+
# Maximum number of public methods for a class (see R0904).
47+
max-public-methods=60
48+
# checks for similarities and duplicated code. This computation may be
49+
# memory / CPU intensive, so you should disable it if you experiments some
50+
# problems.
51+
#
52+
53+
[SIMILARITIES]
54+
# Minimum lines number of a similarity.
55+
min-similarity-lines=25
56+
# Ignore comments when computing similarities.
57+
ignore-comments=yes
58+
# Ignore docstrings when computing similarities.
59+
ignore-docstrings=yes
60+
61+
[TYPECHECK]
62+
# List of classes names for which member attributes should not be checked
63+
# (useful for classes with attributes dynamically set).
64+
#ignored-classes=foo.bar
65+
66+
# List of module names for which member attributes should not be checked
67+
# (useful for modules/projects where namespaces are manipulated during runtime
68+
# and thus existing member attributes cannot be deduced by static analysis. It
69+
# supports qualified module names, as well as Unix pattern matching.
70+
ignored-modules=bluepyopt.deapext.*,sqlite3,seaborn,neurom,morphio,kgforge,dask,dask_mpi,neuron,bglibpy,voxcell,synthesis_workflow.synthesis,luigi_tools

README.rst

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# BluePyParallel: Bluebrain Python Embarassingly Parallel library
2+
3+
4+
Introduction
5+
============
6+
7+
Provides an embarassingly parallel tool with sql backend.
8+
9+
Running using Dask
10+
==================
11+
12+
This is an example of a sbatch script that can be adapted to execute the script using multiple nodes and workers.
13+
14+
Dask variables are not strictly required, but highly recommended, and they can be fine tuned.
15+
16+
17+
.. code:: bash
18+
19+
#!/bin/bash -l
20+
#SBATCH --nodes=2 # Number of nodes
21+
#SBATCH --time=24:00:00 # Time limit
22+
#SBATCH --partition=prod # Submit to the production 'partition'
23+
#SBATCH --constraint=cpu # Constraint the job to run on nodes with/without SSDs. If you want SSD, use only "nvme". If you want KNLs then "knl"
24+
#SBATCH --exclusive # only if you need to allocate whole node
25+
#SBATCH --mem=0
26+
#SBATCH --ntasks-per-node=72 # no of mpi ranks to use per node
27+
#SBATCH --account=projXX # your project number
28+
#SBATCH --job-name=myscript
29+
#SBATCH --output=myscript_out_%j
30+
#SBATCH --error=myscript_err_%j
31+
set -e
32+
33+
module purge
34+
module load unstable hpe-mpi
35+
module unload unstable
36+
37+
unset PMI_RANK # for neuron
38+
39+
# Dask configuration
40+
export DASK_DISTRIBUTED__LOGGING__DISTRIBUTED="info"
41+
export DASK_DISTRIBUTED__WORKER__USE_FILE_LOCKING=False
42+
export DASK_DISTRIBUTED__WORKER__MEMORY__TARGET=False # don't spill to disk
43+
export DASK_DISTRIBUTED__WORKER__MEMORY__SPILL=False # don't spill to disk
44+
export DASK_DISTRIBUTED__WORKER__MEMORY__PAUSE=0.80 # pause execution at 80% memory use
45+
export DASK_DISTRIBUTED__WORKER__MEMORY__TERMINATE=0.95 # restart the worker at 95% use
46+
export DASK_DISTRIBUTED__WORKER__MULTIPROCESSING_METHOD=spawn
47+
export DASK_DISTRIBUTED__WORKER__DAEMON=True
48+
# Reduce dask profile memory usage/leak (see https://github.com/dask/distributed/issues/4091)
49+
export DASK_DISTRIBUTED__WORKER__PROFILE__INTERVAL=10000ms # Time between statistical profiling queries
50+
export DASK_DISTRIBUTED__WORKER__PROFILE__CYCLE=1000000ms # Time between starting new profile
51+
52+
# Split tasks to avoid some dask errors (e.g. Event loop was unresponsive in Worker)
53+
export PARALLEL_BATCH_SIZE=1000
54+
55+
# Script parameters
56+
OUTPUT="/path/to/mecombo_emodel.tsv"
57+
CIRCUIT_CONFIG="/gpfs/bbp.cscs.ch/project/proj68/circuits/Isocortex/20190307/CircuitConfig"
58+
MORPHOLOGY_PATH="/gpfs/bbp.cscs.ch/project/proj68/circuits/Isocortex/20190307/morphologies"
59+
RELEASE_PATH="emodel_release"
60+
N_CELLS=100
61+
MTYPE="L5_TPC:A"
62+
63+
# load the virtual env (alternatively, load the required modules)
64+
source ~/venv/3.7.4-BluePyEModel/bin/activate
65+
66+
srun -v \
67+
BluePyEModel -v get_me_combos_parameters \
68+
--circuit-config "$CIRCUIT_CONFIG" \
69+
--morphology-path "$MORPHOLOGY_PATH" \
70+
--release-path "$RELEASE_PATH" \
71+
--output "$OUTPUT" \
72+
--n-cells "$N_CELLS" \
73+
--mtype "$MTYPE" \
74+
--parallel-lib dask

bluepyparallel/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
"""BluePyParallel functions."""
2+
from .evaluator import evaluate_combos
3+
from .parallel import init_parallel_factory

0 commit comments

Comments
 (0)