Unverified Commit 00ddf3aa authored by Lijiaoa's avatar Lijiaoa Committed by GitHub
Browse files

[bug bash] Rm default key from table column(because had "Default" column) (#2635)

parent 9c4a1c74
......@@ -414,6 +414,7 @@ class TableList extends React.Component<TableListProps, TableListState> {
const tableSource: Array<TableRecord> = JSON.parse(JSON.stringify(this.props.tableSource));
// parameter as table column
const parameterStr: string[] = [];
if (!EXPERIMENT.isNestedExp()) {
if (tableSource.length > 0) {
const trialMess = TRIALS.getTrial(tableSource[0].id);
const trial = trialMess.description.parameters;
......@@ -422,9 +423,10 @@ class TableList extends React.Component<TableListProps, TableListState> {
parameterStr.push(`${value} (search space)`);
});
}
}
// concat trial all final keys and remove dup "default" val, return list
return (COLUMNPro.concat(parameterStr)).concat(Array.from(new Set(TRIALS.finalKeys())));
const finalKeysList = TRIALS.finalKeys().filter(item => item !== 'default');
return (COLUMNPro.concat(parameterStr)).concat(finalKeysList);
}
// get IColumn[]
......
......@@ -14,6 +14,7 @@ function compareProfiles(profile1?: ExperimentProfile, profile2?: ExperimentProf
class Experiment {
private profileField?: ExperimentProfile = undefined;
private statusField?: NNIManagerStatus = undefined;
private isNestedExperiment: boolean = false;
private isexperimentError: boolean = false;
private experimentErrorMessage: string = '';
private isStatusError: boolean = false;
......@@ -31,6 +32,10 @@ class Experiment {
}
}
public isNestedExp(): boolean {
return this.isNestedExperiment;
}
public experimentError(): boolean {
return this.isexperimentError;
}
......@@ -114,7 +119,14 @@ class Experiment {
}
get searchSpace(): object {
return JSON.parse(this.profile.params.searchSpace);
const result = JSON.parse(this.profile.params.searchSpace);
for (const item in result) {
if (result[item]._value && typeof result[item]._value[0] === 'object') {
this.isNestedExperiment = true;
break;
}
}
return result;
}
get logCollectionEnabled(): boolean {
......
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