Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
Fix trainingService initialize error in View mode (#3872)
Browse files Browse the repository at this point in the history
  • Loading branch information
SparkSnail authored Jun 25, 2021
1 parent e5d6180 commit af5551f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions ts/nni_manager/core/nnimanager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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}`);
Expand Down

0 comments on commit af5551f

Please sign in to comment.