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
ee67e7ad
"docs/vscode:/vscode.git/clone" did not exist on "7af7d7ce05271118e595d4c01c40a72741121a64"
Unverified
Commit
ee67e7ad
authored
Jul 26, 2022
by
Carolyn Wang
Committed by
GitHub
Jul 26, 2022
Browse files
patch for smddp import (#18244)
* add import * format
parent
68097dcc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
src/transformers/training_args.py
src/transformers/training_args.py
+2
-0
No files found.
src/transformers/training_args.py
View file @
ee67e7ad
...
...
@@ -1333,6 +1333,8 @@ class TrainingArguments:
device
=
torch
.
device
(
"cuda"
,
local_rank
)
self
.
_n_gpu
=
1
elif
is_sagemaker_dp_enabled
():
import
smdistributed.dataparallel.torch.torch_smddp
# noqa: F401
dist
.
init_process_group
(
backend
=
"smddp"
)
self
.
local_rank
=
int
(
os
.
getenv
(
"SMDATAPARALLEL_LOCAL_RANK"
))
device
=
torch
.
device
(
"cuda"
,
self
.
local_rank
)
...
...
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