Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
nni
Commits
f908be2c
Unverified
Commit
f908be2c
authored
Dec 03, 2021
by
Zhenhua Han
Committed by
GitHub
Dec 03, 2021
Browse files
[retiarii] use fixed seeds for unit test of CGO engine (#4361)
parent
1abaf627
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
test/ut/retiarii/test_cgo_engine.py
test/ut/retiarii/test_cgo_engine.py
+3
-0
No files found.
test/ut/retiarii/test_cgo_engine.py
View file @
f908be2c
...
...
@@ -5,6 +5,7 @@ import unittest
import
time
import
torch
import
torch.nn
as
nn
from
pytorch_lightning.utilities.seed
import
seed_everything
from
pathlib
import
Path
...
...
@@ -138,6 +139,8 @@ def _reset():
nni
.
retiarii
.
integration_api
.
_advisor
=
None
nni
.
retiarii
.
execution
.
api
.
_execution_engine
=
None
seed_everything
(
42
)
def
_new_trainer
():
transform
=
transforms
.
Compose
([
transforms
.
ToTensor
(),
transforms
.
Normalize
((
0.1307
,),
(
0.3081
,))])
...
...
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