"vscode:/vscode.git/clone" did not exist on "183763effecb80b47ccfe6963424e7fd269b94b7"
Unverified Commit 58b259a5 authored by fishyds's avatar fishyds Committed by GitHub
Browse files

[PAI training service] show more error message when submitting job failed (#974)

* Show more error msg when submitting PAI job failed
parent 1112256b
......@@ -291,9 +291,11 @@ class PAITrainingService implements TrainingService {
};
request(submitJobRequest, (error: Error, response: request.Response, body: any) => {
if (error || response.statusCode >= 400) {
this.log.error(`PAI Training service: Submit trial ${trialJobId} to PAI Cluster failed!`);
const errorMessage : string = error ? error.message :
`Submit trial ${trialJobId} failed, http code:${response.statusCode}, http body: ${response.body}`;
this.log.error(errorMessage);
trialJobDetail.status = 'FAILED';
deferred.reject(error ? error.message : 'Submit trial failed, http code: ' + response.statusCode);
deferred.reject(new Error(errorMessage));
} else {
trialJobDetail.submitTime = Date.now();
deferred.resolve(trialJobDetail);
......
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