Repository navigation
Default to multiprocesses instead of single process - #334
jennirinker wants to merge 3 commits into
Conversation
willirath
left a comment
There was a problem hiding this comment.
Looks great and is good to go from my point of view. Thanks!
We could think about adding a test that ensures the new behavior.
|
Note that there is a pending rewrite of this project in
#307 . It might be a good idea
to wait for that;
…On Sun, Sep 8, 2019 at 6:43 AM Jenni Rinker ***@***.***> wrote:
This configuration change in JobQueueCluster changes the default processes
per job so that they follow the same heuristic as dask (proc=cores for
cores <= 4, otherwise it's the smallest factor greater than the square root
of cores).
PR also includes modified documentation (though it doesn't explain the
heuristic -- perhaps that should be done on dask's docs and we link it?).
------------------------------
You can view, comment on, or merge this pull request online at:
#334
Commit Summary
- adding heuristic for processes=None
- fixing tests
File Changes
- *M* dask_jobqueue/core.py
<https://github.com/dask/dask-jobqueue/pull/334/files#diff-0> (21)
- *M* dask_jobqueue/jobqueue.yaml
<https://github.com/dask/dask-jobqueue/pull/334/files#diff-1> (7)
- *M* dask_jobqueue/tests/test_jobqueue_core.py
<https://github.com/dask/dask-jobqueue/pull/334/files#diff-2> (2)
- *M* docs/source/configuration-setup.rst
<https://github.com/dask/dask-jobqueue/pull/334/files#diff-3> (6)
Patch Links:
- https://github.com/dask/dask-jobqueue/pull/334.patch
- https://github.com/dask/dask-jobqueue/pull/334.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#334?email_source=notifications&email_token=AACKZTHEZGMCX6OD4F2KB53QIT6PZA5CNFSM4IUTPVIKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HKALB3A>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AACKZTEDUDCLONOXJT5LYGDQIT6PZANCNFSM4IUTPVIA>
.
|
|
Ack, I already wrote and pushed the new test. Well, that's ok if this never gets merged, it was a good test-run for me on contributing. |
| Cluster(cores=4) | ||
|
|
||
|
|
||
| def test_default_workers(): |
There was a problem hiding this comment.
We could modify this further to cover all clusters:
@pytest.mark.parametrize(
"Cluster",
[PBSCluster, MoabCluster, SLURMCluster, SGECluster, LSFCluster, OARCluster],
)
def test_default_workers(Cluster):
"""For 6 cores, default is 1 workers with 3 procs, 2 threads/proc"""
with Cluster(cores=6, memory="4GB") as cluster:
assert " --nprocs 3" in cluster._command_template
assert " --nthreads 2" in cluster._command_templateBut let's only do this if there's agreement that this will be merged before the big rewrite.
Thanks a lot for the PR @jennirinker! I am confident that this will get merged since this is something we want to do as #332 indicates. I agree with @mrocklin that this is a good idea to first merge #307. Once #307 is merged this PR may need to be tweaked a bit but I expect that it should not be too much work. |
|
@jennirinker side-comment: Please use "Fix #issueNumber" in your PR description, this way the associated issue gets closed automatically when the PR is merged. For more details, look at this. Using anything more fancy e.g. "resolving issue #issueNumber" does not work unfortunately. I updated your PR description. |
|
@lesteve Ah, thanks. I was close -- "resolve" instead of "resolving" and I would've had it. Next time. |
|
No worries, this is the kind of caveats that trip everyone up once in a while ... |
Resolving #332 .
This configuration change in JobQueueCluster changes the default processes per job so that they follow the same heuristic as dask (proc=cores for cores <= 4, otherwise it's the smallest factor greater than the square root of cores).
PR also includes modified documentation (though it doesn't explain the heuristic -- perhaps that should be done on dask's docs and we link it?).