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
chenpangpang
transformers
Commits
664688b9
Unverified
Commit
664688b9
authored
Jul 01, 2022
by
Yih-Dar
Committed by
GitHub
Jul 01, 2022
Browse files
higher atol to avoid flaky trainer test failure (#17979)
Co-authored-by:
ydshieh
<
ydshieh@users.noreply.github.com
>
parent
8bb2c387
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
tests/trainer/test_trainer.py
tests/trainer/test_trainer.py
+4
-4
No files found.
tests/trainer/test_trainer.py
View file @
664688b9
...
...
@@ -1252,8 +1252,8 @@ class TrainerIntegrationTest(TestCasePlus, TrainerIntegrationCommon):
trainer
.
train
(
resume_from_checkpoint
=
os
.
path
.
join
(
tmp_dir
,
"checkpoint-15"
))
(
a1
,
b1
)
=
trainer
.
model
.
a
.
item
(),
trainer
.
model
.
b
.
item
()
self
.
assertAlmostEqual
(
a
,
a1
,
delta
=
1e-
8
)
self
.
assertAlmostEqual
(
b
,
b1
,
delta
=
1e-
8
)
self
.
assertAlmostEqual
(
a
,
a1
,
delta
=
1e-
5
)
self
.
assertAlmostEqual
(
b
,
b1
,
delta
=
1e-
5
)
with
self
.
subTest
(
"Test every epoch"
):
config
=
RegressionModelConfig
(
a
=
0
,
b
=
2
,
random_torch
=
random_torch
)
...
...
@@ -1277,8 +1277,8 @@ class TrainerIntegrationTest(TestCasePlus, TrainerIntegrationCommon):
trainer
.
train
(
resume_from_checkpoint
=
os
.
path
.
join
(
tmp_dir
,
checkpoint_dir
))
(
a1
,
b1
)
=
trainer
.
model
.
a
.
item
(),
trainer
.
model
.
b
.
item
()
self
.
assertAlmostEqual
(
a
,
a1
,
delta
=
1e-
8
)
self
.
assertAlmostEqual
(
b
,
b1
,
delta
=
1e-
8
)
self
.
assertAlmostEqual
(
a
,
a1
,
delta
=
1e-
5
)
self
.
assertAlmostEqual
(
b
,
b1
,
delta
=
1e-
5
)
@
slow
@
require_torch_non_multi_gpu
...
...
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