Skip to content

Commit

Permalink
[ML] Fixes display of regression stop stats if one is NaN (#72412) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
peteharverson committed Jul 20, 2020
1 parent 5822f5d commit 3378313
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ export function getValuesFromResponse(response: RegressionEvaluateResponse) {
if (response.regression.hasOwnProperty(statType)) {
let currentStatValue =
response.regression[statType as keyof RegressionEvaluateResponse['regression']]?.value;
if (currentStatValue) {
if (currentStatValue && !isNaN(currentStatValue)) {
currentStatValue = Number(currentStatValue.toPrecision(DEFAULT_SIG_FIGS));
}
results[statType as keyof RegressionEvaluateExtractedResponse] = currentStatValue;
Expand Down

0 comments on commit 3378313

Please sign in to comment.