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

Cleanup dashboard code #3048

Closed
mrocklin opened this issue Sep 11, 2019 · 2 comments · Fixed by #3138
Closed

Cleanup dashboard code #3048

mrocklin opened this issue Sep 11, 2019 · 2 comments · Fixed by #3138

Comments

@mrocklin
Copy link
Member

The Dashboard code is effective... but messy.

This module has grown very organically over time, and so has some dead code, plenty of repetition, and so on. Some plots are in components.py, some in scheduler.py. Sometimes in both. There are some plots that we no longer use.

Additionally, I think that currently I'm the only person that maintains this section. It might be nice to increase the bus factor in this module, and code cleanup might be a useful way to get accustomed to it.

@TomAugspurger TomAugspurger added this to Sorted Backlog in Core maintenance Oct 8, 2019
@mrocklin
Copy link
Member Author

mrocklin commented Oct 9, 2019

@jacobtomlinson you might find this interesting. In general I suspect that you might enjoy futzing around with dashboard plots at some point, and this would be a good introduction. (assuming that @jrbourbeau hasn't already started on this)

@jacobtomlinson
Copy link
Member

I do enjoy futzing with web stuff!

@TomAugspurger TomAugspurger moved this from Sorted Backlog to Done in Core maintenance Oct 15, 2019
mrocklin pushed a commit that referenced this issue Oct 15, 2019
Closes #3048.

In an attempt to tidy up the dashboard code I've done some major shuffling of things within the dashboard submodule. I think overall this puts things in more obvious places and should make it more accessible to new contributors. 

Notable changes:
- Components have been broken out in a new `distributed.dashboard.components` submodule and placed into logical groupings "scheduler specific", "worker specific", "shared" and "nvml/gpu". This could be broken down further but there is a balance to be struck between indirection and giant scary files.
- The additional server routes from `scheduler_html.py` and `worker_html.py` have been moved into the `scheduler.py` and `worker.py` files to keep all server things together.
- Shared functions and utilities have been moved around into more appropriate places.

Other things I'd like to do:
- [x] Make use of the [update source function](https://github.com/dask/distributed/pull/3138/files#diff-0db0a1f6d00335e7cc6e5e94eae3f8a1R89-R116) outside of the scheduler components
- [x] ~Re-order components to group `_doc` functions with their `DashboardComponent` classes to reduce indirection (or at least distance).~ _On second thoughts as some docs use multiple components having the docs together at the bottom actually makes more sense._
- [x] Rename functions for consistency (there are a few which should probably follow the `_doc` names)
- [x] Identify and remove unused components. (Could use some pointers on this)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

3 participants