Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
Show original search space (#2570)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lijiaoa authored Jun 17, 2020
1 parent 1a6cc41 commit 97f9d8a
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions src/webui/src/components/Overview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ class Overview extends React.Component<OverviewProps, OverviewState> {
render(): React.ReactNode {
const { trialConcurrency } = this.state;
const { experimentUpdateBroadcast, metricGraphMode, bestTrialEntries } = this.props;
const searchSpace = this.convertSearchSpace();
const bestTrials = this.findBestTrials();
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const bestAccuracy = bestTrials.length > 0 ? bestTrials[0].accuracy! : NaN;
Expand Down Expand Up @@ -105,7 +104,7 @@ class Overview extends React.Component<OverviewProps, OverviewState> {
<Stack.Item grow styles={{root: {width: 450}}} className="overviewBoder borderRight bgNNI">
<Title1 text="Search space" icon="10.png" />
<Stack className="experiment">
<SearchSpace searchSpace={searchSpace} />
<SearchSpace searchSpace={EXPERIMENT.searchSpace} />
</Stack>
</Stack.Item>
{/* <Stack.Item grow styles={{root: {width: 450}}} className="bgNNI"> */}
Expand Down Expand Up @@ -163,23 +162,6 @@ class Overview extends React.Component<OverviewProps, OverviewState> {
);
}

private convertSearchSpace(): object {
const searchSpace = Object.assign({}, EXPERIMENT.searchSpace);
Object.keys(searchSpace).map(item => {
const key = searchSpace[item]._type;
const value = searchSpace[item]._value;
switch (key) {
case 'quniform':
case 'qnormal':
case 'qlognormal':
searchSpace[item]._value = [value[0], value[1]];
break;
default:
}
});
return searchSpace;
}

private findBestTrials(): Trial[] {
const bestTrials = TRIALS.sort();
const { bestTrialEntries } = this.props;
Expand Down

0 comments on commit 97f9d8a

Please sign in to comment.