dask / dask-labextension

JupyterLab extension for Dask

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove default dashboard plots

ian-r-rose opened this issue · comments

This extension gets its list of dask dashboard plots by querying the dashboard's individual-plots.json endpoint. These are then shown to the user as the orange buttons in the extension side bar. If, however, that request to individual-plots.json fails, we show a default listing, given by this:

export const DEFAULT_ITEMS = [
{ route: 'individual-task-stream', label: 'Task Stream' },
{ route: 'individual-progress', label: 'Progress' },
{ route: 'individual-workers', label: 'Workers' },
{ route: 'individual-nbytes', label: 'Memory (worker)' },
{ route: 'individual-cpu', label: 'CPU (workers)' },
{ route: 'statics/individual-cluster-map.html', label: 'Cluster Map' },
{ route: 'individual-graph', label: 'Graph' },
{ route: 'individual-nprocessing', label: 'Processing Tasks' },
{
route: 'individual-compute-time-per-key',
label: 'Compute Time (operation)'
},
{ route: 'individual-memory-by-key', label: 'Memory (operation)' },
{ route: 'individual-profile', label: 'Profile' },
{ route: 'individual-profile-server', label: 'Profile Server' },
{ route: 'individual-bandwidth-workers', label: 'Bandwidth (workers)' },
{ route: 'individual-bandwidth-types', label: 'Bandwidth (type)' },
{
route: 'individual-aggregate-time-per-action',
label: 'Compute/Transfer'
},
{ route: 'individual-gpu-memory', label: 'GPU Memory' },
{ route: 'individual-gpu-utilization', label: 'GPU Utilization' }
];
}

Historically, these default items were useful because we were checking for the individual-plots.json from the browser side. This request could fail for a valid dashboard URL (often for CORS-related reasons), and having the fallback meant that we could still iframe useful plots for the user. However, since #159 we are checking for individual-plots.json on the server side, which is not subject to the same restrictions as the browser. So as it stands today, the default items are mostly (only?) used to show the greyed out buttons when no dask dashboard is connected.

As the dask dashboard evolves, gains new plots, renames things, etc, it has become annoying to keep the default listing up-to-date. Furthermore, different scheduler plugins or distributions of dask could add different dashboards. So there really isn't much guarantee that the default listing is particularly accurate. We should consider removing them entirely, and just show something like a "No dashboard connected" info box.

Would anybody miss the grey buttons?

I wouldn't miss the greyed out buttons. Additionally, as you already mentioned, it would make renaming plots (xref dask/distributed#4878) easier

Agree I wouldn't miss the greyed out buttons.