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
"...git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "f1a32203aa806a49f69ff0d439b6b9af80b86230"
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
Hide 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
...
...
@@ -310,6 +310,11 @@ class RetiariiExperiment(Experiment):
"""
_logger
.
info
(
'Stopping experiment, please wait...'
)
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
:
nni
.
runtime
.
log
.
stop_experiment_log
(
self
.
id
)
...
...
@@ -326,9 +331,6 @@ class RetiariiExperiment(Experiment):
if
self
.
_pipe
is
not
None
:
self
.
_pipe
.
close
()
if
self
.
_dispatcher_thread
is
not
None
:
self
.
_dispatcher
.
stopping
=
True
self
.
_dispatcher_thread
.
join
(
timeout
=
1
)
self
.
id
=
None
self
.
port
=
None
...
...
ts/nni_manager/core/nnimanager.ts
View file @
6645bd33
...
...
@@ -639,8 +639,6 @@ class NNIManager implements Manager {
this
.
trialConcurrencyChange
=
requestTrialNum
;
}
this
.
requestTrialJobs
(
requestTrialNum
);
// check maxtrialnum and maxduration here
// 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
...
...
@@ -665,6 +663,8 @@ class NNIManager implements Manager {
}
}
}
else
{
this
.
requestTrialJobs
(
requestTrialNum
);
if
(
this
.
status
.
status
===
'
DONE
'
)
{
delete
this
.
experimentProfile
.
endTime
;
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