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
6645bd33
Unverified
Commit
6645bd33
authored
Jul 30, 2021
by
QuanluZhang
Committed by
GitHub
Jul 30, 2021
Browse files
fix multi-thread issue (#3899)
parent
703f6de5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
nni/retiarii/experiment/pytorch.py
nni/retiarii/experiment/pytorch.py
+5
-3
ts/nni_manager/core/nnimanager.ts
ts/nni_manager/core/nnimanager.ts
+2
-2
No files found.
nni/retiarii/experiment/pytorch.py
View file @
6645bd33
...
@@ -311,6 +311,11 @@ class RetiariiExperiment(Experiment):
...
@@ -311,6 +311,11 @@ class RetiariiExperiment(Experiment):
_logger
.
info
(
'Stopping experiment, please wait...'
)
_logger
.
info
(
'Stopping experiment, please wait...'
)
atexit
.
unregister
(
self
.
stop
)
atexit
.
unregister
(
self
.
stop
)
# stop strategy first
if
self
.
_dispatcher_thread
is
not
None
:
self
.
_dispatcher
.
stopping
=
True
self
.
_dispatcher_thread
.
join
(
timeout
=
1
)
if
self
.
id
is
not
None
:
if
self
.
id
is
not
None
:
nni
.
runtime
.
log
.
stop_experiment_log
(
self
.
id
)
nni
.
runtime
.
log
.
stop_experiment_log
(
self
.
id
)
if
self
.
_proc
is
not
None
:
if
self
.
_proc
is
not
None
:
...
@@ -326,9 +331,6 @@ class RetiariiExperiment(Experiment):
...
@@ -326,9 +331,6 @@ class RetiariiExperiment(Experiment):
if
self
.
_pipe
is
not
None
:
if
self
.
_pipe
is
not
None
:
self
.
_pipe
.
close
()
self
.
_pipe
.
close
()
if
self
.
_dispatcher_thread
is
not
None
:
self
.
_dispatcher
.
stopping
=
True
self
.
_dispatcher_thread
.
join
(
timeout
=
1
)
self
.
id
=
None
self
.
id
=
None
self
.
port
=
None
self
.
port
=
None
...
...
ts/nni_manager/core/nnimanager.ts
View file @
6645bd33
...
@@ -639,8 +639,6 @@ class NNIManager implements Manager {
...
@@ -639,8 +639,6 @@ class NNIManager implements Manager {
this
.
trialConcurrencyChange
=
requestTrialNum
;
this
.
trialConcurrencyChange
=
requestTrialNum
;
}
}
this
.
requestTrialJobs
(
requestTrialNum
);
// check maxtrialnum and maxduration here
// check maxtrialnum and maxduration here
// NO_MORE_TRIAL is more like a subset of RUNNING, because during RUNNING tuner
// NO_MORE_TRIAL is more like a subset of RUNNING, because during RUNNING tuner
// might tell nnimanager that this is no more trials. In NO_MORE_TRIAL state, the experiment is viewed
// might tell nnimanager that this is no more trials. In NO_MORE_TRIAL state, the experiment is viewed
...
@@ -665,6 +663,8 @@ class NNIManager implements Manager {
...
@@ -665,6 +663,8 @@ class NNIManager implements Manager {
}
}
}
}
}
else
{
}
else
{
this
.
requestTrialJobs
(
requestTrialNum
);
if
(
this
.
status
.
status
===
'
DONE
'
)
{
if
(
this
.
status
.
status
===
'
DONE
'
)
{
delete
this
.
experimentProfile
.
endTime
;
delete
this
.
experimentProfile
.
endTime
;
await
this
.
storeExperimentProfile
();
await
this
.
storeExperimentProfile
();
...
...
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