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

Making Cluster's scale_up/scale_down methods coroutines #2004

Closed
jakirkham opened this issue May 24, 2018 · 3 comments
Closed

Making Cluster's scale_up/scale_down methods coroutines #2004

jakirkham opened this issue May 24, 2018 · 3 comments

Comments

@jakirkham
Copy link
Member

In Distributed's Adaptive class, there are calls to Cluster implementations of scale_up and scale_down from within coroutines. While it would be possible to call these as coroutines in some cases (as is the case in dask-drmaa), this appears to not be part of Adaptive's spec for its cluster instance nor is part of the Cluster's spec. A cursory glance at dask-jobqueue suggests it doesn't use coroutines either. Considering it would be possible to make scale_up and scale_down coroutines and these would fit nicely within the Adaptive model, could we consider migrating in that direction?

@mrocklin
Copy link
Member

Currently they can be coroutines or not coroutines, which I like

f = self.cluster.scale_down(workers)
if gen.is_future(f):
yield f

@jakirkham
Copy link
Member Author

For context, was attempting to remove a reimplemented Adaptive._retire_workers method from dask-drmaa, but found that we lost logging info about workers being retired. Based on some investigation, it seems to have something to do with scale_down being a coroutine. Though haven't narrowed down a fix as of yet. Hence the question.

ref: dask/dask-drmaa#85 (comment)

@mrocklin
Copy link
Member

Closing this for now. Feel free to reopen if the question persists.

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

2 participants