Unverified Commit 8fd3cf00 authored by Guoxin's avatar Guoxin Committed by GitHub
Browse files

Merge pull request #1350 from lvybriage/dev-fix-hyper-bug

[fix issue#1332] Double check for trial does not have final result in webui
parents 8016c710 92d75bc0
......@@ -15,7 +15,6 @@ class IntermediateVal extends React.Component<IntermediateValProps, {}> {
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<IntermediateValProps, {}> {
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)`;
}
......
......@@ -78,7 +78,7 @@ class Para extends React.Component<ParaProps, ParaState> {
getParallelAxis =
(
dimName: Array<string>, parallelAxis: Array<Dimobj>,
accPara: Array<number>, eachTrialParams: Array<string>,
accPara: Array<number>, eachTrialParams: Array<string>,
lengthofTrials: number
) => {
// get data for every lines. if dim is choice type, number -> toString()
......@@ -276,7 +276,10 @@ class Para extends React.Component<ParaProps, ParaState> {
}
});
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);
});
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment