-
Notifications
You must be signed in to change notification settings - Fork 348
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
Conversation
✅ Deploy Preview for determined-ui ready!
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); |
There was a problem hiding this comment.
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.
if (!isLoaded) { | ||
// When trial metrics hasn't loaded metric names or individual trial metrics. | ||
return NotLoaded; | ||
} else if (!chartDataIsLoaded || !isEqual(selectedMetrics, metrics)) { |
There was a problem hiding this comment.
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:
- A user selects a new experiment
- The new metric names are queried for both the current experiments and new one
- Eventually a call to
summarizedMetricToSeries
is made but the input metrics do not include all the new metrics from (1). - 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.
There was a problem hiding this 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
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
no data to plot
.select first 25
ensure that while the charts are loading you do not seeno data to plot
ever.Commentary (optional)
Checklist
docs/release-notes/
.See Release Note for details.
Ticket
WEB-1485