diff --git a/src/webui/src/components/public-child/IntermediateVal.tsx b/src/webui/src/components/public-child/IntermediateVal.tsx index abc4fb45d4..b5bd015843 100644 --- a/src/webui/src/components/public-child/IntermediateVal.tsx +++ b/src/webui/src/components/public-child/IntermediateVal.tsx @@ -15,7 +15,6 @@ class IntermediateVal extends React.Component { render() { const { record } = this.props; const interArr = record.description.intermediate; - const status = record.status; let lastVal; let wei = 0; if (interArr !== undefined) { @@ -29,8 +28,11 @@ class IntermediateVal extends React.Component { result = `${lastVal.toFixed(6)}`; } } - if (status === 'SUCCEEDED') { - result = `${result} (FINAL)`; + // some trial haven't final result + if (record.acc !== undefined) { + if (record.acc.default !== undefined) { + result = `${result} (FINAL)`; + } } else { result = `${result} (LATEST)`; } diff --git a/src/webui/src/components/trial-detail/Para.tsx b/src/webui/src/components/trial-detail/Para.tsx index 3d32c7c207..f8850e9c9f 100644 --- a/src/webui/src/components/trial-detail/Para.tsx +++ b/src/webui/src/components/trial-detail/Para.tsx @@ -78,7 +78,7 @@ class Para extends React.Component { getParallelAxis = ( dimName: Array, parallelAxis: Array, - accPara: Array, eachTrialParams: Array, + accPara: Array, eachTrialParams: Array, lengthofTrials: number ) => { // get data for every lines. if dim is choice type, number -> toString() @@ -276,7 +276,10 @@ class Para extends React.Component { } }); if (this._isMounted) { - this.setState({ max: Math.max(...accPara), min: Math.min(...accPara) }, () => { + // if not return final result + const maxVal = accPara.length === 0 ? 1 : Math.max(...accPara); + const minVal = accPara.length === 0 ? 1 : Math.min(...accPara); + this.setState({ max: maxVal, min: minVal }, () => { this.getParallelAxis(dimName, parallelAxis, accPara, eachTrialParams, lenOfDataSource); }); }