Skip to content

Commit

Permalink
add trial job detail link
Browse files Browse the repository at this point in the history
  • Loading branch information
SparkSnail committed Jul 19, 2020
1 parent 5544ae8 commit c5e26ef
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/nni_manager/training_service/pai/paiConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ export class PAITrialJobDetail implements TrialJobDetail {
public form: TrialJobApplicationForm;
public logPath: string;
public isEarlyStopped?: boolean;
public paiJobDetailUrl?: string;

constructor(id: string, status: TrialJobStatus, paiJobName: string,
submitTime: number, workingDirectory: string, form: TrialJobApplicationForm, logPath: string) {
submitTime: number, workingDirectory: string, form: TrialJobApplicationForm, logPath: string, paiJobDetailUrl?: string) {
this.id = id;
this.status = status;
this.paiJobName = paiJobName;
Expand All @@ -56,5 +57,6 @@ export class PAITrialJobDetail implements TrialJobDetail {
this.form = form;
this.tags = [];
this.logPath = logPath;
this.paiJobDetailUrl = paiJobDetailUrl;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export class PAIJobInfoCollector {
if (response.body.jobStatus.appTrackingUrl) {
paiTrialJob.url = response.body.jobStatus.appTrackingUrl;
} else {
paiTrialJob.url = paiTrialJob.logPath;
paiTrialJob.url = paiTrialJob.paiJobDetailUrl;
}
}
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,16 @@ class PAIK8STrainingService extends PAITrainingService {
const trialWorkingFolder: string = path.join(this.expRootDir, 'trials', trialJobId);
const paiJobName: string = `nni_exp_${this.experimentId}_trial_${trialJobId}`;
const logPath: string = path.join(this.paiTrialConfig.nniManagerNFSMountPath, this.experimentId, trialJobId);
const paiJobDetailUrl: string = `${this.protocol}://${this.paiClusterConfig.host}/job-detail.html?username=${this.paiClusterConfig.userName}&jobName=${paiJobName}`;
const trialJobDetail: PAITrialJobDetail = new PAITrialJobDetail(
trialJobId,
'WAITING',
paiJobName,
Date.now(),
trialWorkingFolder,
form,
logPath);
logPath,
paiJobDetailUrl);

this.trialJobsMap.set(trialJobId, trialJobDetail);
this.jobQueue.push(trialJobId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ class TrialDispatcher implements TrainingService {
liveTrialsCount++;
continue;
}
trial.url = environment.trackingUrl;
const environmentStatus = environment.status;

// any node exit, then make sure the whole trial stopped.
Expand Down

0 comments on commit c5e26ef

Please sign in to comment.