Unverified Commit 063d6b74 authored by SparkSnail's avatar SparkSnail Committed by GitHub
Browse files

Merge pull request #3580 from microsoft/v2.2

[do not Squash!] Merge V2.2 back to master
parents 08986c6b e1295888
......@@ -419,7 +419,7 @@ class TableList extends React.Component<TableListProps, TableListState> {
private _renderOperationColumn(record: any): React.ReactNode {
const runningTrial: boolean = ['RUNNING', 'UNKNOWN'].includes(record.status) ? false : true;
const disabledAddCustomizedTrial = ['DONE', 'ERROR', 'STOPPED'].includes(EXPERIMENT.status);
const disabledAddCustomizedTrial = ['DONE', 'ERROR', 'STOPPED', 'VIEWED'].includes(EXPERIMENT.status);
return (
<Stack className='detail-button' horizontal>
<PrimaryButton
......
......@@ -21,6 +21,7 @@ const EXPERIMENTSTATUS = [
'ERROR',
'STOPPING',
'STOPPED',
'VIEWED',
'DONE',
'NO_MORE_TRIAL',
'TUNER_NO_MORE_TRIAL'
......
......@@ -152,7 +152,10 @@ export interface ExperimentConfig {
const timeUnits = { d: 24 * 3600, h: 3600, m: 60, s: 1 };
export function toSeconds(time: string): number {
export function toSeconds(time: string | number): number {
if (typeof time === 'number') {
return time;
}
for (const [unit, factor] of Object.entries(timeUnits)) {
if (time.endsWith(unit)) {
const digits = time.slice(0, -1);
......
......@@ -116,12 +116,12 @@ class Experiment {
}
get maxExperimentDurationSeconds(): number {
const value = this.config.maxExperimentDuration;
const value = this.config.maxExperimentDuration || (this.config as any).maxExecDuration;
return value === undefined ? Infinity : toSeconds(value);
}
get maxTrialNumber(): number {
const value = this.config.maxTrialNumber;
const value = this.config.maxTrialNumber || (this.config as any).maxTrialNum;
return value === undefined ? Infinity : value;
}
......@@ -139,7 +139,13 @@ class Experiment {
}
get trainingServicePlatform(): string {
return this.config.trainingService.platform;
if (Array.isArray(this.config.trainingService)) {
return 'hybrid';
} else if (this.config.trainingService) {
return this.config.trainingService.platform;
} else {
return (this.config as any).trainingServicePlatform;
}
}
get searchSpace(): object {
......
......@@ -78,7 +78,7 @@ $margin: 24px;
}
&-dropdown {
width: 65px;
width: 60px;
display: inline-block;
position: relative;
top: 13px;
......
......@@ -19,7 +19,8 @@ $error: #a4262c;
}
.DONE,
.STOPPED {
.STOPPED,
.VIEWED {
color: $done;
.ms-ProgressIndicator-progressBar {
......@@ -37,7 +38,8 @@ $error: #a4262c;
.bestMetric {
.DONE,
.STOPPED {
.STOPPED,
.VIEWED {
color: $done;
}
......
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