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

Add nprocs auto option to dask-worker CLI #4377

Merged
merged 6 commits into from
Jan 7, 2021

Conversation

jacobtomlinson
Copy link
Member

@jacobtomlinson jacobtomlinson commented Dec 18, 2020

Partly solves #4373

I've moved nprocesses_nthreads from distributed.deploy.local into distributed.deploy.utils and then am making use of it in distributed.cli.dask_worker.

Setting nprocs to auto when starting a worker will now have the same behaviour as LocalCluster in terms of the number of processes and threads created.

dask-worker tcp://localhost:8786 --nprocs=auto

@quasiben
Copy link
Member

Kicked CI

@jacobtomlinson
Copy link
Member Author

Thanks @quasiben. Looks like it was my fault, new test filename wasn't unique.

Copy link
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just merged the main branch to resolve some unrelated CI failures

Copy link
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jacobtomlinson! This is a nice addition. Could you add a test that checks when using --nprocs auto the expected number of workers with the expected number of threads are created? Something similar to distributed/cli/tests/test_dask_worker.py::test_nprocs_negative should work here too

@jacobtomlinson
Copy link
Member Author

Thanks for the feedback @jrbourbeau. Added a test.

Copy link
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jacobtomlinson! This LGTM, will merge after CI finishes

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