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

Allow users to configure clusters #54

Merged
merged 5 commits into from
Jul 9, 2019
Merged

Allow users to configure clusters #54

merged 5 commits into from
Jul 9, 2019

Conversation

jcrist
Copy link
Member

@jcrist jcrist commented Jul 3, 2019

This adds a mechanism for specifying user configurable cluster
parameters in a declarative way. The set of configurable cluster
parameters (as well as useful metadata like input type/bounds/valid
values, etc...) are exposed via a rest api. This allows creation of nice
interactive GUIs on the client side without requiring client-side
configuration.

This adds a mechanism for specifying user configurable cluster
parameters in a declarative way. The set of configurable cluster
parameters (as well as useful metadata like input type/bounds/valid
values, etc...) are exposed via a rest api. This allows creation of nice
interactive GUIs on the client side without requiring client-side
configuration (still TODO).

Still needs tests and nicer client-side interaction, but on initial
experimentation the server-side componts work.
@jcrist
Copy link
Member Author

jcrist commented Jul 8, 2019

This still needs tests, but now supports a nice user experience on the client side.

Screen Shot 2019-07-08 at 5 41 08 PM

Users can query the gateway endpoint to get a description of the valid user options. These are configured by administrators - in this example the config looks like:

c.DaskGateway.cluster_manager_options = Options(
    Integer("worker_cores", min=1, max=4, default=1, label="Worker Cores"),
    Float("worker_memory", min=0.5, max=8, default=1, label="Worker Memory (GB)"),
    Select("environment", options=["basic", "torch", "tensorflow"], label="Conda Environment")
)

The options object supports getting/setting values programmatically (via key or attribute), and does some simple validation on the client side. If the user is using a web based frontend (e.g. jupyter notebooks) and has ipywidgets installed. They also have access to a nice GUI frontend for configuring the cluster.

When they're satisfied with the configuration, they can pass it to gateway.new_cluster to get a new cluster with the specified configuration.

Alternatively, if they know what parameters are available, they can specify them via keyword e.g.

cluster = gateway.new_cluster(worker_cores=2, environment='basic')

This design is flexible, allowing admins to define configuration as needed, and users to get access to introspect the options without any user-side configuration needed. This design also easily supports other graphical frontends, since the option description is a simple json spec (I think a JupyterLab plugin would be nice to have).

@jcrist
Copy link
Member Author

jcrist commented Jul 8, 2019

cc @mrocklin, this may interest you.

@mrocklin
Copy link
Member

mrocklin commented Jul 9, 2019

Cool stuff. I think that something like this would be useful as a general dask.distributed issue to make folks from the other cluster managers aware and get their thoughts on how best to handle things like this.

@jcrist jcrist changed the title [WIP] Allow users to configure clusters Allow users to configure clusters Jul 9, 2019
@jcrist jcrist merged commit 056cb4f into master Jul 9, 2019
@jcrist jcrist deleted the cluster-options branch July 9, 2019 17:26
@jcrist jcrist mentioned this pull request Jul 9, 2019
kyprifog pushed a commit to kyprifog/dask-gateway that referenced this pull request Oct 16, 2020
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

None yet

2 participants