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

Fix trainingService initialize error in View mode (#3872)

parent e5d61809
......@@ -204,11 +204,6 @@ class NNIManager implements Manager {
const experimentId: string = getExperimentId();
this.log.info(`Resuming experiment: ${experimentId}`);
this.experimentProfile = await this.dataStore.getExperimentProfile(experimentId);
this.readonly = readonly;
if (readonly) {
this.setStatus('VIEWED');
return Promise.resolve();
}
const config: ExperimentConfig = this.experimentProfile.params;
this.config = config;
......@@ -217,6 +212,12 @@ class NNIManager implements Manager {
this.trainingService = await this.initTrainingService(config);
}
this.readonly = readonly;
if (readonly) {
this.setStatus('VIEWED');
return;
}
this.log.info('Setup tuner...');
const dispatcherCommand: string = getMsgDispatcherCommand(config);
this.log.debug(`dispatcher command: ${dispatcherCommand}`);
......
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