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
d1d5ebb1
Unverified
Commit
d1d5ebb1
authored
May 11, 2022
by
Shijie Wu
Committed by
GitHub
May 11, 2022
Browse files
Remove duplicated os.path.join (#17192)
parent
a10f6183
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 @
d1d5ebb1
...
...
@@ -1808,7 +1808,7 @@ class Trainer:
local_rank
=
xm
.
get_local_ordinal
()
if
is_torch_tpu_available
()
else
self
.
args
.
local_rank
if
local_rank
!=
-
1
:
rng_file
=
os
.
path
.
join
(
checkpoint
,
f
"rng_state_
{
local_rank
}
.pth"
)
if
not
os
.
path
.
isfile
(
os
.
path
.
join
(
checkpoint
,
rng_file
)
)
:
if
not
os
.
path
.
isfile
(
rng_file
):
logger
.
info
(
f
"Didn't find an RNG file for process
{
local_rank
}
, if you are resuming a training that "
"wasn't launched in a distributed fashion, reproducibility is not guaranteed."
...
...
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