Unverified Commit 0fb78620 authored by SparkSnail's avatar SparkSnail Committed by GitHub
Browse files

Merge pull request #238 from microsoft/master

merge master
parents 3ee09617 b8d19e45
...@@ -154,7 +154,7 @@ class LogDrawer extends React.Component<LogDrawerProps, LogDrawerState> { ...@@ -154,7 +154,7 @@ class LogDrawer extends React.Component<LogDrawerProps, LogDrawerState> {
}); });
Promise.all([dispatcherPromise, nniManagerPromise]).then(() => { Promise.all([dispatcherPromise, nniManagerPromise]).then(() => {
this.setState({ isLoading: false }); this.setState({ isLoading: false });
this.timerId = window.setTimeout(this.refresh, 300); this.timerId = window.setTimeout(this.refresh, 10000);
}); });
} }
......
...@@ -77,8 +77,10 @@ const getFinal = (final?: MetricDataRecord[]): FinalType | undefined => { ...@@ -77,8 +77,10 @@ const getFinal = (final?: MetricDataRecord[]): FinalType | undefined => {
if (final) { if (final) {
showDefault = parseMetrics(final[final.length - 1].data); showDefault = parseMetrics(final[final.length - 1].data);
if (typeof showDefault === 'number') { if (typeof showDefault === 'number') {
if(!isNaN(showDefault)){
showDefault = { default: showDefault }; showDefault = { default: showDefault };
return showDefault; return showDefault;
}
} else if (isArrayType(showDefault)) { } else if (isArrayType(showDefault)) {
// not support final type // not support final type
return undefined; return undefined;
......
...@@ -5,7 +5,7 @@ class Trial implements TableObj { ...@@ -5,7 +5,7 @@ class Trial implements TableObj {
private metricsInitialized: boolean = false; private metricsInitialized: boolean = false;
private infoField: TrialJobInfo | undefined; private infoField: TrialJobInfo | undefined;
private intermediates: (MetricDataRecord | undefined)[] = [ ]; private intermediates: (MetricDataRecord | undefined)[] = [ ];
private final: MetricDataRecord | undefined; public final: MetricDataRecord | undefined;
private finalAcc: number | undefined; private finalAcc: number | undefined;
constructor(info?: TrialJobInfo, metrics?: MetricDataRecord[]) { constructor(info?: TrialJobInfo, metrics?: MetricDataRecord[]) {
...@@ -211,15 +211,23 @@ class Trial implements TableObj { ...@@ -211,15 +211,23 @@ class Trial implements TableObj {
public formatLatestAccuracy(): string { // TODO: this should be private public formatLatestAccuracy(): string { // TODO: this should be private
if (this.accuracy !== undefined) { if (this.accuracy !== undefined) {
if (isNaN(this.accuracy)) {
return this.accuracy.toString();
} else {
return `${formatAccuracy(this.accuracy)} (FINAL)`; return `${formatAccuracy(this.accuracy)} (FINAL)`;
}
} else if (this.intermediates.length === 0) { } else if (this.intermediates.length === 0) {
return '--'; return '--';
} else { } else {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const latest = this.intermediates[this.intermediates.length - 1]!; const latest = this.intermediates[this.intermediates.length - 1]!;
if (isNaN(metricAccuracy(latest))) {
return 'NaN';
} else {
return `${formatAccuracy(metricAccuracy(latest))} (LATEST)`; return `${formatAccuracy(metricAccuracy(latest))} (LATEST)`;
} }
} }
}
} }
export { Trial }; export { Trial };
This diff is collapsed.
This diff is collapsed.
authorName: nni authorName: nni
experimentName: default_test experimentName: default_test
maxExecDuration: 5m maxExecDuration: 5m
maxTrialNum: 2 maxTrialNum: 8
trialConcurrency: 1 trialConcurrency: 8
searchSpacePath: search_space.json searchSpacePath: ../naive_trial/search_space.json
tuner: tuner:
builtinTunerName: TPE builtinTunerName: TPE
...@@ -17,8 +17,8 @@ assessor: ...@@ -17,8 +17,8 @@ assessor:
start_step: 6 start_step: 6
threshold: 0.95 threshold: 0.95
trial: trial:
codeDir: ../../../examples/trials/mnist-tfv1 codeDir: ../naive_trial
command: python3 mnist.py --batch_num 100 command: python3 trial.py
gpuNum: 0 gpuNum: 0
useAnnotation: false useAnnotation: false
......
...@@ -12,7 +12,7 @@ assessor: ...@@ -12,7 +12,7 @@ assessor:
optimize_mode: maximize optimize_mode: maximize
trial: trial:
codeDir: ../../../examples/trials/mnist-annotation codeDir: ../../../examples/trials/mnist-annotation
command: python3 mnist.py --batch_num 100 command: python3 mnist.py --batch_num 10
gpuNum: 0 gpuNum: 0
useAnnotation: true useAnnotation: true
......
This diff is collapsed.
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