"...git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "f1a32203aa806a49f69ff0d439b6b9af80b86230"
Unverified Commit 6645bd33 authored by QuanluZhang's avatar QuanluZhang Committed by GitHub
Browse files

fix multi-thread issue (#3899)

parent 703f6de5
......@@ -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
......
......@@ -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();
......
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