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
4739ce17
Commit
4739ce17
authored
Feb 04, 2021
by
Sylvain Gugger
Browse files
Fix test for sagemaker and TPU integrations
parent
21b3922e
Changes
1
Show 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 @
4739ce17
...
@@ -793,7 +793,7 @@ class Trainer:
...
@@ -793,7 +793,7 @@ class Trainer:
model
=
ShardedDDP
(
model
,
self
.
optimizer
)
model
=
ShardedDDP
(
model
,
self
.
optimizer
)
elif
is_sagemaker_distributed_available
():
elif
is_sagemaker_distributed_available
():
model
=
DDP
(
model
,
device_ids
=
[
dist
.
get_local_rank
()],
broadcast_buffers
=
False
)
model
=
DDP
(
model
,
device_ids
=
[
dist
.
get_local_rank
()],
broadcast_buffers
=
False
)
if
self
.
deepspeed
:
el
if
self
.
deepspeed
:
pass
# already initialized its own DDP earlier
pass
# already initialized its own DDP earlier
elif
self
.
args
.
local_rank
!=
-
1
:
elif
self
.
args
.
local_rank
!=
-
1
:
if
self
.
args
.
ddp_find_unused_parameters
is
not
None
:
if
self
.
args
.
ddp_find_unused_parameters
is
not
None
:
...
...
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