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
e314c19a
Unverified
Commit
e314c19a
authored
Feb 15, 2022
by
muzhi1991
Committed by
GitHub
Feb 14, 2022
Browse files
fix bug for the log of RNG states are not properly loaded exception. (#15638)
Co-authored-by:
muz
<
muzhi1991@limuzhideMBP-2.lan
>
parent
2e11a043
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/trainer.py
src/transformers/trainer.py
+1
-1
No files found.
src/transformers/trainer.py
View file @
e314c19a
...
...
@@ -1638,7 +1638,7 @@ class Trainer:
try
:
torch
.
cuda
.
random
.
set_rng_state_all
(
checkpoint_rng_state
[
"cuda"
])
except
Exception
as
e
:
logger
.
info
r
(
logger
.
info
(
f
"Didn't manage to set back the RNG states of the GPU because of the following error:
\n
{
e
}
"
"
\n
This won't yield the same results as if the training had not been interrupted."
)
...
...
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