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

fix: compare charts showing no data while loading [WEB-1485] #7516

Merged
merged 4 commits into from
Aug 2, 2023

Conversation

julian-determined-ai
Copy link
Contributor

@julian-determined-ai julian-determined-ai commented Jul 28, 2023

Description

Charts in the "compare" view should always show a loading state until metrics have been successfully loaded for the selected experiments.

4DC29112-B338-4373-8DFB-3027AA76422B.mov

Test Plan

  1. Navigate to the compare view.
  2. With no experiments listed ensure that no charts are showing.
  3. Select an experiment with 0 trials, ensure you see "no data to plot"
  4. Select an experiment with a trial ensure you see the compare section load, then each individual chart load, and ensure you never see no data to plot.
  5. De-select all experiments.
  6. Click the checkbox in the top left corner of the compare view list and choose select first 25 ensure that while the charts are loading you do not see no data to plot ever.

Commentary (optional)

Checklist

  • Changes have been manually QA'd
  • User-facing API changes need the "User-facing API Change" label.
  • Release notes should be added as a separate file under docs/release-notes/.
    See Release Note for details.
  • Licenses should be included for new code which was copied and/or modified from any external code.

Ticket

WEB-1485

@cla-bot cla-bot bot added the cla-signed label Jul 28, 2023
@netlify
Copy link

netlify bot commented Jul 28, 2023

Deploy Preview for determined-ui ready!

Name Link
🔨 Latest commit bd609e5
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/64c92d7dc164df0009a72113
😎 Deploy Preview https://deploy-preview-7516--determined-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -27,6 +29,7 @@ const useMetricNames = (
setMetrics(Loaded([]));
return;
}
if (!isEqual(actualExpIds, previousExpIds)) setMetrics(NotLoaded);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, when the ExpIds change the metrics are still set as Loaded which causes us to show the No Data To Plot message since metrics may have not been loaded for the newly selected experiments.

@determined-ci
Copy link
Collaborator

determined-ci commented Aug 1, 2023

Hello! No changes detected to DesignKit for commit bd609e5. Verify here

if (!isLoaded) {
// When trial metrics hasn't loaded metric names or individual trial metrics.
return NotLoaded;
} else if (!chartDataIsLoaded || !isEqual(selectedMetrics, metrics)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the reason I added the !isEqual(selectedMetrics, metrics)) check is because one bug I was seeing is that when selecting new experiments sometimes for a split second the UI would show no data to plot. I tracked down the issue being that:

  1. A user selects a new experiment
  2. The new metric names are queried for both the current experiments and new one
  3. Eventually a call to summarizedMetricToSeries is made but the input metrics do not include all the new metrics from (1).
  4. We show no data to plot since we think the new metrics from (1) do not have any data, but actually we have not searched for them yet.

The isEqual check ensures that the metrics that were searched for matches the currently selected metrics.

Copy link
Contributor

@mapmeld mapmeld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ this loads the data and handles experiments with 0 trials, thanks for looking into it

@julian-determined-ai julian-determined-ai merged commit 3db61f5 into main Aug 2, 2023
21 of 23 checks passed
@julian-determined-ai julian-determined-ai deleted the jglover/web-1485 branch August 2, 2023 15:39
@dannysauer dannysauer added this to the 0.24.0 milestone Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants