Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set n_workers for dask LocalCluster #85

Merged
merged 1 commit into from
Feb 6, 2024
Merged

Conversation

talumbau
Copy link
Member

@talumbau talumbau commented Feb 6, 2024

  • Explicitly set n_workers for LocalCluster creation (through Client). If this is not set, for machines with a high CPU count, the number of workers will be much larger than 7. In client.scatter with broadcast=True, this can cause hangs due to how dask distributed works. It's presumed that this bug is only apparent in more recent runs on machines with high CPU counts, although that is not confirmed. But, this fix does allow the example to run to completion on a machine with CPU_COUNT=128.

 - Explicity set n_workers for LocalCluster creation (through Client).
 If this is not set, for machines with a high CPU count, the number of
 workers will be much larger than 7. In `client.scatter` with
 `broadcast=True`, this can cause hangs due to how dask distributed works.
 It's presumed that this bug is only apparent in more recent runs on
 machines with high CPU counts, although that is not confirmed. But,
 this fix does allow the example to run to completion on a machine
 with CPU_COUNT=128.
@talumbau talumbau requested a review from jdebacker February 6, 2024 03:13
@codecov-commenter
Copy link

codecov-commenter commented Feb 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c0802c6) 73.76% compared to head (6843966) 73.76%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #85   +/-   ##
=======================================
  Coverage   73.76%   73.76%           
=======================================
  Files          24       24           
  Lines        1616     1616           
=======================================
  Hits         1192     1192           
  Misses        424      424           
Flag Coverage Δ
unittests 73.76% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jdebacker
Copy link
Member

Looks great and ran well on my machine. Merging. Thanks @talumbau!

@jdebacker jdebacker merged commit 1982230 into master Feb 6, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants