Skip to content

Commit b45d78a

Browse files
committed
Corrections from review
1 parent bcb7fa0 commit b45d78a

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

docs/source/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2121

2222
- Cluster configuration can be provided to calculate cost function on multiple nodes of a cluster.
2323
Cluster support requires installation of optional packages related to Dask, a package set called `cluster`.
24-
```
24+
25+
- ```sh
2526
pip install moldrug[cluster]
2627
```
2728

src/moldrug/runner.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ def __init__(self, mode: RunnerMode, thread_count: Optional[int] = None, process
6060
elif mode in [RunnerMode.MULTIPROCESSING]:
6161
assert thread_count is None and process_count is not None and dask_cluster is None, "Only process count is needed."
6262
elif mode in [RunnerMode.DASK_LOCAL]:
63-
assert (thread_count is not None or process_count is None) and dask_cluster is None, "Only process count and/or thread count are needed."
63+
assert (thread_count is not None or process_count is not None) and dask_cluster is None, "Only process count and/or thread count are needed."
6464
elif mode in [RunnerMode.DASK_JOB_QUEUE_CLUSTER]:
65-
assert thread_count is None and process_count is None and dask_cluster is not None, "Dask execution takes only a Dask cluster object."
65+
assert thread_count is None and process_count is None and dask_cluster is not None, "Dask cluster execution takes only a Dask cluster object."
6666
else:
6767
assert False
6868

src/moldrug/utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1413,6 +1413,10 @@ def __call__(self, njobs: int = 1, runner: Optional[Runner] = None):
14131413
njobs : int, optional
14141414
The number of jobs for parallelization, the module multiprocessing will be used, by default 1,
14151415
1416+
runner: Runner, optional
1417+
Providing this parameter instead of njobs allows execution on a cluster with Dask. Few other modes
1418+
of executions are also available, but useful mostly for debugging and profiling.
1419+
14161420
Raises
14171421
------
14181422
RuntimeError

0 commit comments

Comments
 (0)