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
e954774e
Unverified
Commit
e954774e
authored
Oct 12, 2022
by
Yuge Zhang
Committed by
GitHub
Oct 12, 2022
Browse files
Fix the racing issue in RL strategy submit model (#5135)
parent
aa98462d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
nni/nas/strategy/_rl_impl.py
nni/nas/strategy/_rl_impl.py
+2
-2
No files found.
nni/nas/strategy/_rl_impl.py
View file @
e954774e
...
@@ -136,8 +136,8 @@ class ModelEvaluationEnv(gym.Env[ObservationType, int]):
...
@@ -136,8 +136,8 @@ class ModelEvaluationEnv(gym.Env[ObservationType, int]):
if
self
.
cur_step
==
self
.
num_steps
:
if
self
.
cur_step
==
self
.
num_steps
:
with
_thread_lock
:
with
_thread_lock
:
model
=
get_targeted_model
(
self
.
base_model
,
self
.
mutators
,
self
.
sample
)
model
=
get_targeted_model
(
self
.
base_model
,
self
.
mutators
,
self
.
sample
)
_logger
.
info
(
f
'New model created:
{
self
.
sample
}
'
)
_logger
.
info
(
f
'New model created:
{
self
.
sample
}
'
)
submit_models
(
model
)
submit_models
(
model
)
wait_models
(
model
)
wait_models
(
model
)
if
model
.
status
==
ModelStatus
.
Failed
:
if
model
.
status
==
ModelStatus
.
Failed
:
return
self
.
reset
(),
0.
,
False
,
{}
return
self
.
reset
(),
0.
,
False
,
{}
...
...
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