-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Hotfix for v1.7.1 #2692
Hotfix for v1.7.1 #2692
Changes from 7 commits
a2aa7aa
7c942a7
fc9494b
3b3e4a1
ba26c20
b74fae7
21eae57
8d7ffbf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,8 +83,8 @@ export class AMLEnvironmentService extends EnvironmentService { | |
public async refreshEnvironmentsStatus(environments: EnvironmentInformation[]): Promise<void> { | ||
environments.forEach(async (environment) => { | ||
const amlClient = (environment as AMLEnvironmentInformation).amlClient; | ||
if (!amlClient) { | ||
throw new Error('AML client not initialized!'); | ||
if (!amlClient) { | ||
return Promise.reject('AML client not initialized!'); | ||
} | ||
const status = await amlClient.updateStatus(environment.status); | ||
switch (status.toUpperCase()) { | ||
|
@@ -98,8 +98,7 @@ export class AMLEnvironmentService extends EnvironmentService { | |
environment.setFinalStatus('SUCCEEDED'); | ||
break; | ||
case 'FAILED': | ||
environment.setFinalStatus('FAILED'); | ||
break; | ||
return Promise.reject(`AML: job ${environment.jobId} is failed!`); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. besides returning reject, do we need to set final status here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. don't need to set status for environment here. when return Promise.reject, the experiment become There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. got it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. well, the status is not visible so far. But if we expose it to webui in future, it would be a hole. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. agree There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. updated. |
||
case 'STOPPED': | ||
case 'STOPPING': | ||
environment.setFinalStatus('USER_CANCELED'); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -121,9 +121,11 @@ export class OpenPaiEnvironmentService extends EnvironmentService { | |
// RUNNING status is set by runner, and ignore waiting status | ||
break; | ||
case 'SUCCEEDED': | ||
case 'FAILED': | ||
environment.setFinalStatus(jobResponse.state); | ||
break; | ||
case 'FAILED': | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add a break above Failed, so that succeeded env won't fail experiment. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. updated. |
||
deferred.reject(`OpenPAI: job ${environment.jobId} is failed!`); | ||
break; | ||
case 'STOPPED': | ||
case 'STOPPING': | ||
environment.setFinalStatus('USER_CANCELED'); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, why throw error doesn't work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no try catch outside the function, throw this error directly will not be shown in web ui.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you try it? there are a lot of throw error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I tried it. If we only use throw Error without catch, the error information will only shown in
nnictl log stderr
instead of webui.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
throw new Error
here should work withouttry catch
because there is acatch
in nnimanager and this promise is called from nnimanager. It works in other training service. Would you please check why it is not working?