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