dask / dask/distributed

graph_metrics() raises and generate a dashboard internal error

Open
#7,511 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
1.7k
Forks
778
Avg merge
2h 50m
Merged PRs (30d)
3

Description

Here a little MCVE that breaks the Dashboard **Groups** page.
The `graph_metrics()` function used by the Groups Dashboard page raises due to a missing key in `total_dependencies`.

**Minimal Complete Verifiable Example**:

```python
import dask.distributed
cluster = dask.distributed.LocalCluster()
client = dask.distributed.Client(cluster)
client
```
Open the Dask diagnostic Dashboard and select the **Groups** view

```python
dd1 = dask.datasets.timeseries()
# 'head' needs to be passed as a non-aligned dd via a keyword parameter in order to reproduce this specific bug
dd2 = dask.dataframe.map_partitions(lambda part, head: part, dd1, head=dd1.head(1, compute=False))
dd3 = dask.dataframe.map_partitions(lambda part, head: part, dd2, head=dd2.head(1, compute=False))
dd3.compute()
```
Here the console exception:
![gh2](https://user-images.githubusercontent.com/1694892/215345562-a21f10ab-2546-46c0-b80c-a273aded99a0.png)

Here is the dashboard exception:
![gh3](https://user-images.githubusercontent.com/1694892/215345563-86397c86-0aba-42a9-b850-4930e5aa017d.png)

**Anything else we need to know?**:
Removing `.head(1, compute=False)` still raises, it's simply here to illustrate my needs for the non-aligned keyword parameter.

**Environment**:

- Dask version: 2023.1.1
- Python version: 3.9.12
- Operating System: Win10
- Install method (conda, pip, source): pip

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.