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

Commit

Permalink
Fix paiToken update logic (#976)
Browse files Browse the repository at this point in the history
  • Loading branch information
SparkSnail authored Apr 17, 2019
1 parent 44f5486 commit 9a3c61e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/nni_manager/training_service/pai/paiTrainingService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,15 @@ class PAITrainingService implements TrainingService {

private async statusCheckingLoop(): Promise<void> {
while (!this.stopping) {
await this.updatePaiToken();
try{
await this.updatePaiToken();
}catch(error){
this.log.error(`${error}`);
//only throw error when initlize paiToken first time
if(!this.paiToken) {
throw new Error(error);
}
}
await this.paiJobCollector.retrieveTrialStatus(this.paiToken, this.paiClusterConfig);
const restServer: PAIJobRestServer = component.get(PAIJobRestServer);
if (restServer.getErrorMessage) {
Expand Down

0 comments on commit 9a3c61e

Please sign in to comment.