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