Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
nni
Commits
0b864c7a
"git@developer.sourcefind.cn:gaoqiong/migraphx.git" did not exist on "a25058dea9eb84060a99897ef2d47804c16d1407"
Unverified
Commit
0b864c7a
authored
May 15, 2019
by
QuanluZhang
Committed by
GitHub
May 15, 2019
Browse files
fix bug of state transition (#1077)
parent
b19e36fd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
src/nni_manager/core/nnimanager.ts
src/nni_manager/core/nnimanager.ts
+5
-3
No files found.
src/nni_manager/core/nnimanager.ts
View file @
0b864c7a
...
@@ -372,7 +372,7 @@ class NNIManager implements Manager {
...
@@ -372,7 +372,7 @@ class NNIManager implements Manager {
private
async
periodicallyUpdateExecDuration
():
Promise
<
void
>
{
private
async
periodicallyUpdateExecDuration
():
Promise
<
void
>
{
let
count
:
number
=
1
;
let
count
:
number
=
1
;
while
(
this
.
status
.
status
!==
'
STOPPING
'
&&
this
.
status
.
status
!==
'
STOPPED
'
)
{
while
(
!
[
'
ERROR
'
,
'
STOPPING
'
,
'
STOPPED
'
].
includes
(
this
.
status
.
status
)
)
{
await
delay
(
1000
*
1
);
// 1 seconds
await
delay
(
1000
*
1
);
// 1 seconds
if
(
this
.
status
.
status
===
'
RUNNING
'
)
{
if
(
this
.
status
.
status
===
'
RUNNING
'
)
{
this
.
experimentProfile
.
execDuration
+=
1
;
this
.
experimentProfile
.
execDuration
+=
1
;
...
@@ -461,7 +461,7 @@ class NNIManager implements Manager {
...
@@ -461,7 +461,7 @@ class NNIManager implements Manager {
}
}
let
allFinishedTrialJobNum
:
number
=
this
.
currSubmittedTrialNum
;
let
allFinishedTrialJobNum
:
number
=
this
.
currSubmittedTrialNum
;
let
waitSubmittedToFinish
:
number
;
let
waitSubmittedToFinish
:
number
;
while
(
this
.
status
.
status
!==
'
STOPPING
'
&&
this
.
status
.
status
!==
'
STOPPED
'
)
{
while
(
!
[
'
ERROR
'
,
'
STOPPING
'
,
'
STOPPED
'
].
includes
(
this
.
status
.
status
)
)
{
const
finishedTrialJobNum
:
number
=
await
this
.
requestTrialJobsStatus
();
const
finishedTrialJobNum
:
number
=
await
this
.
requestTrialJobsStatus
();
allFinishedTrialJobNum
+=
finishedTrialJobNum
;
allFinishedTrialJobNum
+=
finishedTrialJobNum
;
...
@@ -671,7 +671,9 @@ class NNIManager implements Manager {
...
@@ -671,7 +671,9 @@ class NNIManager implements Manager {
'
ADD_HYPERPARAMETER
'
,
tunerCommand
.
trial_job_id
,
content
,
undefined
);
'
ADD_HYPERPARAMETER
'
,
tunerCommand
.
trial_job_id
,
content
,
undefined
);
break
;
break
;
case
NO_MORE_TRIAL_JOBS
:
case
NO_MORE_TRIAL_JOBS
:
if
(
!
[
'
ERROR
'
,
'
STOPPING
'
,
'
STOPPED
'
].
includes
(
this
.
status
.
status
))
{
this
.
setStatus
(
'
TUNER_NO_MORE_TRIAL
'
);
this
.
setStatus
(
'
TUNER_NO_MORE_TRIAL
'
);
}
break
;
break
;
case
KILL_TRIAL_JOB
:
case
KILL_TRIAL_JOB
:
this
.
log
.
info
(
`cancelTrialJob:
${
JSON
.
parse
(
content
)}
`
);
this
.
log
.
info
(
`cancelTrialJob:
${
JSON
.
parse
(
content
)}
`
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment