rapidsai / jupyterlab-nvdashboard

A JupyterLab extension for displaying dashboards of GPU usage.
BSD 3-Clause "New" or "Revised" License
588 stars 77 forks source link

Migration from Jupyterlab v3 to v4 #169

Closed AjayThorve closed 9 months ago

AjayThorve commented 11 months ago

JupyterLab Extension Migration from v3 to v4 with Improved Backend and Enhanced Front-End Features

The existing extension, which exclusively functions with JupyterLab v3, has undergone a transformation to ensure compatibility with JupyterLab v4 and above. This migration not only includes updating the version but also incorporates various improvements in both the backend and frontend components of the extension

Backend Migration: The previous version of our extension relied on a Bokeh server in the backend and utilized iframes to display GPU utilization charts. In this PR, we've transitioned to utilizing the built-in Tornado routes provided by JupyterLab. Additionally, we've integrated backend REST API calls with @tornado.web.authenticated, eliminating the need for a separate server and port management. This streamlined backend architecture simplifies deployment and maintenance.

Frontend Enhancements: The frontend of the extension has been significantly enhanced. We've leveraged React Native widgets and the Recharts charting library to create a visually pleasing and smooth user experience. The use of React Native widgets ensures a more aesthetic design, eliminates frame drops during widget drag-and-drop operations, and takes advantage of React's virtual DOM for efficient rendering.

New Features:

  1. Brush for Time Series Charts: We've introduced a brushing feature for time series charts, allowing users to easily inspect past events by selecting a specific time range.
  2. Synced Tooltips: For pages with multiple charts, our extension now provides synchronized tooltips for timestamps across all charts. This feature enhances the user's ability to analyze data cohesively.
  3. Theme Compatibility: The extension now seamlessly integrates with JupyterLab themes. It adapts its colors and aesthetics based on whether the user is in a light or dark theme, ensuring a consistent and visually appealing experience.

Version Compatibility: It's important to note that this updated extension is designed exclusively for JupyterLab v4 and later versions. To ensure continued support for JupyterLab v3 users, we will maintain the previous version separately.

Future Improvements: We understand that there was a request to add cell execution markers to the charts. However, due to the complexities associated with asynchronous cells, we have decided to defer this feature to a future update. Rest assured, we will explore this enhancement in subsequent releases

Attaching some snapshots of the updated design, feel free to suggest design and aesthitic changes.

image image image recording_2023-09-27_at_17 40 40

cc @exactlyallan @jacobtomlinson

jakirkham commented 11 months ago

Is this still planned for 0.10 or is it moving to 0.11?

AjayThorve commented 11 months ago

Is this still planned for 0.10 or is it moving to 0.11?

Not sure, @jacobtomlinson ?

jacobtomlinson commented 11 months ago

Is this still planned for 0.10 or is it moving to 0.11?

We are on 0.9 now so I think 0.10 should be fine.

AjayThorve commented 11 months ago

This is generally looking awesome! Thank you so much for putting in the effort here.

One thing that would be really great to see is a completely rewritten README with an updated demo gif, but more importantly updated contributing/developing guidelines. I really want to get to a better place to enable other folks in RAPIDS to contribute to this, so an explanation of how to set up a dev environment (bearing in mind TS and web dev is unfamiliar to many folks) and where to make changes is going to be critical to the maintainability of this work.

That's great feedback, I'll get to working on a new README and a DEVELOPER_GUIDELINES markdowns

jakirkham commented 11 months ago

RAPIDS has completed code freeze with a release planned soon. Hence the question of what release is being targeted

jacobtomlinson commented 10 months ago

@jakirkham this project is released ad-hoc and generally isn't tied to the bi-monthly RAPIDS releases.

jakirkham commented 10 months ago

Ok wasn't sure

copy-pr-bot[bot] commented 9 months ago

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

XQ-UT commented 6 months ago

Can we do a release that contains this fix? Does the current v0.11.0a include this fix?

AjayThorve commented 6 months ago

Can we do a release that contains this fix? Does the current v0.11.0a include this fix?

@XQ-UT You can access this via the nightly packages already:

# nightly version (for jupyterlab>=4)
pip install --extra-index-url https://pypi.anaconda.org/rapidsai-wheels-nightly/simple --pre jupyterlab_nvdashboard

There are a couple of issues, once fixed we will do a stable release in a week or so.