-
-
Notifications
You must be signed in to change notification settings - Fork 110
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 new param to allow multiple workers in vmcluster, worker_mixin #389
add new param to allow multiple workers in vmcluster, worker_mixin #389
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems great, I'm happy it is such a minimal change.
Would you be able to go through the docstrings of the classes that implement the VMCluster
interface and document this option?
Also could you add a test?
@jacobtomlinson Thanks for the quick review. Sure, I can add tests and update docstrings. Do have a question for tests. Quickly looked at existing tests and it seems like the right place to put this test would be in |
Yeah that sounds good. |
Did you have any progress on this pull request in recent time? This option would be very helpful as well for the |
I tested this new option import time
from dask_cloudprovider.gcp import GCPCluster
from dask.distributed import Client
cluster = GCPCluster(n_workers=1, num_workers_per_vm=2, worker_options={'nthreads': 1}, projectid='the-project-id')
time.sleep(180)
client = Client(cluster)
print(client)
cluster.close() The printout is |
I'm not sure this is true. the default behaviour should start 1 thread per CPU core. |
Maybe, but I have an application that is not thread-safe due to the underlying FORTRAN code being used. |
Ah fair enough. I'm not sure I understand why this following isn't suitable though. cluster = GCPCluster(n_workers=1, worker_options={'nthreads': 1, 'nworkers': 2}, projectid='the-project-id') |
According to the documentation, this option does not exist for workers, only threads: https://distributed.dask.org/en/latest/worker.html#distributed.worker.Worker Trying it also fails. |
Ah yeah I remember, in To get this PR over the line we need:
Given that this seems abandoned @erl987 do you have any interest in pushing it forwards? |
👋 Hi @jacobtomlinson! I indeed have interest in continuing this PR, since it is something we are needing at https://github.com/CaviDBOrg/. After struggling for a few days last week with the same problem, I found this PR and I am currently testing those changes on AWS. In parallel, I have created a new branch based on this one - https://github.com/flbulgarelli/dask-cloudprovider/commits/feature-allow-multiple-workers-in-vm-cluster - that address some of your requests, but I am still a bit unsure about your expectations about testing it. As far as I understand, all of the tests here are smoke tests, while others do actually run distributed computations at some point. I am thinking of starting a cluster and checking the actual number of workers Thanks! |
That sounds great @flbulgarelli. Thats pretty much what I was hoping for in terms of tests. |
There has been no activity here for a long time, so I'm going to close it out. Thanks for the effort here, sorry it never got merged. |
Intended to address #173
Overview
The goal is to have the ability to spin up mulitple workers on VM Clusters (like
EC2Cluster
).num_workers_per_vm
is added to theVMCluster
andWorkerMixin
classes.num_workers_per_vm
worker classes are added to the spec (which are passed toSpecCluster
) to initialize multiple workers.num_workers_per_vm
is less than number of cores available.Testing
Confirmed this works by creating an
EC2Cluster
as followscreates an
EC2Cluster
with 10 m5.2xlarge worker machines and a total of 40 workers (asnum_workers_per_vm
= 4).