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

Inter-worker communication debugging #153

Open
alexander-held opened this issue Sep 10, 2024 · 0 comments
Open

Inter-worker communication debugging #153

alexander-held opened this issue Sep 10, 2024 · 0 comments

Comments

@alexander-held
Copy link
Member

We have occasionally seen what might be inter-worker communication issues of unclear origin. Here's a small setup to possibly reproduce those. The sleep is purely there for the tasks to be long enough for auto-scaling to work and can be removed otherwise.

import dask
import dask.bag
import numpy as np
import time

NUM_TASKS = 512

x = np.linspace(1, NUM_TASKS, NUM_TASKS)
b = dask.bag.from_sequence(x, npartitions=len(x))
 
def blackbox(num):
    time.sleep(4)
    return num

futures = b.map(blackbox)
task = futures.fold(lambda x,y: x+y, split_every=8)

res, *_ = dask.compute(task, scheduler=client)

res, sum(x)  # result should be sum(x)
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

No branches or pull requests

1 participant