-
-
Notifications
You must be signed in to change notification settings - Fork 725
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
Ensuring a group of tasks are scheduled together. #4485
Comments
Maybe explict-comms in dask-cuda might be useful here. Using |
Relaxing the worker pinning on the submit might help here. I believe this can be done with |
Thanks for the reply @madsbk @quasiben I'm looking into the |
@trivialfis I am working on a general solution to this problem: #4503 |
I'm probably just missing something here, but @madsbk why is a |
The thing is, we want to wait until we can get exclusive access to all workers that have input data. In the following example def train(...):
futures = []
# workers are obtained from input data
with MultiLock(lock_names=workers):
for i, worker in enumerate(workers):
f = client.submit(train_on_worker, ..., workers=[worker])
futures.append(f)
results = client.gather(futures)
return results In principle this could be implemented using the |
Check out rapidsai/dask-cuda#523 for an use case |
Thanks @madsbk So if I'm not mistaken, this is similar to creating a single lock with all used workers as the name? |
Not exactly because different worker sets that overlap will also block each other. |
Hi all,
This is a feature request for applications that depend on MPI like communication framework like XGBoost. I will use XGBoost as an example in the following description.
Motivation
During training, XGBoost runs 1 process per-worker and needs to perform allreduce between all processes. When training 1 model at a time that's fine, we just submit a task for each worker:
This works as all
train_on_worker
will get a chance to run eventually. But if users launch multiple training sessions simultaneously, XGBoost might hang. For example, given there are 2 available workers, and each call totrain
use all of them.distributed might schedule 1 worker for each call to
train
. Due to the MPI allreduce call, the scheduled worker will be waiting for unscheduled worker to synchronize. And as both calls totrain
will be waiting (remember that we only have 2 workers), other tasks might never be scheduled, resulting into a hang.Feature request
Notice inside the
train
function where we submit tasks for each worker, is there a way to ensure tasks submitted there can be scheduled as a whole?The text was updated successfully, but these errors were encountered: