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

Commit

Permalink
quick fix http error (#1896)
Browse files Browse the repository at this point in the history
  • Loading branch information
SparkSnail authored Dec 30, 2019
1 parent 8d8c9de commit 2906315
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ class PAIK8STrainingService extends PAITrainingService {
case TrialConfigMetadataKey.PAI_CLUSTER_CONFIG:
this.paiJobRestServer = new PAIJobRestServer(component.get(PAIK8STrainingService));
this.paiClusterConfig = <PAIClusterConfig>JSON.parse(value);
this.paiClusterConfig.host = this.formatPAIHost(this.paiClusterConfig.host);
if(this.paiClusterConfig.passWord) {
// Get PAI authentication token
await this.updatePaiToken();
} else if(this.paiClusterConfig.token) {
this.paiToken = this.paiClusterConfig.token;
}
this.paiClusterConfig.host = this.formatPAIHost(this.paiClusterConfig.host);
break;

case TrialConfigMetadataKey.TRIAL_CONFIG:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ class PAIYarnTrainingService extends PAITrainingService {
path: '/webhdfs/api/v1',
host: this.paiClusterConfig.host
});
this.paiClusterConfig.host = this.formatPAIHost(this.paiClusterConfig.host);
if(this.paiClusterConfig.passWord) {
// Get PAI authentication token
await this.updatePaiToken();
Expand All @@ -107,7 +108,6 @@ class PAIYarnTrainingService extends PAITrainingService {
} else {
throw new Error('pai cluster config format error, please set password or token!');
}
this.paiClusterConfig.host = this.formatPAIHost(this.paiClusterConfig.host);
break;

case TrialConfigMetadataKey.TRIAL_CONFIG:
Expand Down

0 comments on commit 2906315

Please sign in to comment.