dask / dask-labextension

JupyterLab extension for Dask
BSD 3-Clause "New" or "Revised" License
311 stars 62 forks source link

Configurable default layout #248

Closed ian-r-rose closed 1 year ago

ian-r-rose commented 1 year ago

Fixes #247 dask-layout

quasiben commented 1 year ago

Very cool!

ian-r-rose commented 1 year ago

Ah, very cool indeed. @ian-r-rose I'm wondering how can folks make/integrate their own custom layout?

It still needs documentation, but briefly, you can refer to the names of the individual-* plots, and specify how they are going to be put into the main area. So the default looks like this:

        "individual-task-stream": {
          "mode": "split-right",
          "ref": null
        },
        "individual-workers-memory": {
          "mode": "split-bottom",
          "ref": "individual-task-stream"
        },
        "individual-progress": {
          "mode": "split-right",
          "ref": "individual-workers-memory"
        }

Which puts the task stream chart on the right, then puts the worker memory chart beneath the task stream chart, then puts the progress chart to the right of the worker memory chart.

You can't make an arbitrary layout, since you can't refer to other things like notebooks and terminals, but you can make a little "dask" zone however you like.

ian-r-rose commented 1 year ago

I should also note that JupyterLab has recently grown a nice new settings UI that can read json schema, and it works reasonably well for this new configuration object:

image

ian-r-rose commented 1 year ago

Also experimenting with a new interaction where the Client repr gets a button which automatically populates the dashboard URL and then launches the default layout: dask-layout-2

The goal being to drastically reduce the number of clicks to get your dashboards setup next to your notebooks.