Unverified Commit fcc6c78c authored by liuzhe-lz's avatar liuzhe-lz Committed by GitHub
Browse files

Fix k8s webui (#3565)

parent 019eef75
...@@ -33,10 +33,11 @@ def main(): ...@@ -33,10 +33,11 @@ def main():
enable_multi_thread() enable_multi_thread()
if 'trainingServicePlatform' in exp_params: # config schema is v1 if 'trainingServicePlatform' in exp_params: # config schema is v1
from types import SimpleNamespace
from .experiment.config.convert import convert_algo from .experiment.config.convert import convert_algo
for algo_type in ['tuner', 'assessor', 'advisor']: for algo_type in ['tuner', 'assessor', 'advisor']:
if algo_type in exp_params: if algo_type in exp_params:
convert_algo(algo_type, exp_params, exp_params) exp_params[algo_type] = convert_algo(algo_type, exp_params, SimpleNamespace()).json()
if exp_params.get('advisor') is not None: if exp_params.get('advisor') is not None:
# advisor is enabled and starts to run # advisor is enabled and starts to run
......
...@@ -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 {
......
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