-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
Listing DaskGateway clusters created via Python code alongside those created via the dask labextension UI #204
Comments
Thanks for raising this @consideRatio . In general, this is a hard problem, as dask doesn't really have a built-in cluster discovery method. Short of port sniffing, I'm not sure I know of a good way to handle auto-detecting any cluster in a given notebook (or set of notebooks). Indeed, part of the reason for creating the cluster manager sidebar in the first place was to be able to build some user interfaces around starting, stopping, and scaling clusters that the extension can actually keep track of and reason about. That being said, my goal for this extension is to get out of the game of managing clusters directly, and instead investigate a solution like |
I would really like |
Related question. How do you configure the lab extension to use dask-gateway for creating new clusters. I can't find that anywhere in the docs but clearly from the screenshot above it is possible. |
@dharhas I haven't tried it recently myself, but the configuration that @consideRatio posted above looks like the correct approach to me (though it could also be configured using a yml file or what have you):
In particular, the factory class and factory module options tell the labextension what to use when starting a new cluster. |
I have a reason and may have the time to pick this up at the moment. One approach is for the Manager class itself to be configurable, just like the factory_class. The Manager right now has in-memory-only state in a private Since Gateway is likely the main alternative for this, rather than making manager fully configurable, implementing a single GatewayManager class here is a simpler, less configurable option. The only tricky bit I've encountered is the scaling state. I don't quite understand how to get the manual scaling/adaptive state from the Gateway API, but surely there is a way? |
A few years ago I started an effort to standardise the discovery of existing clusters via |
That sounds really cool! So gateway would need to implement discovery via https://dask-ctl.readthedocs.io/en/latest/integrating.html ? This seems like it would be pretty easy, since discovery is just I've actually got this working already with a pretty small DaskGatewayManager subclass that doesn't do much other that call |
Yeah I think wiring up |
fwiw, here's my temporary package which adds gateway support: https://github.com/minrk/dask-labextension-gateway I'll try to investigate a PR here once I think I have a handle on what the 'right' way to do it is (as opposed to my Works for Me solution that I have right now). As it is, I went with something that's either/or - instead of adding Gateway clusters, it's fully Gateway-only, unlike using dask-ctl would be. That just happens to be what I want for what I'm working on right now. |
What happened:
I can create a dask-gateway cluster via the dask-labextension view and I'll see it visible there then.
But, if I create a dask-gateway cluster from a notebook using code like below, then no dask cluster shows up in the list of clusters.
My wish
My wish is that the dask clusters I've created should be listed visually. I'm not sure if this is possible or not, but I'd like to describe this wish here to explore if we can make it happen one way or another.
Environment:
JupyterHub (1.1.1 Helm chart) + Dask-Gateway (0.9.0 Helm chart).
Operating System: Ubuntu 20.04
Install method: conda-forge
The text was updated successfully, but these errors were encountered: