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
c6c66584
Unverified
Commit
c6c66584
authored
May 02, 2023
by
Wing Lian
Committed by
GitHub
May 02, 2023
Browse files
Fix check for backword_pos (#23075)
parent
f31a510b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
src/transformers/trainer.py
src/transformers/trainer.py
+3
-1
No files found.
src/transformers/trainer.py
View file @
c6c66584
...
@@ -458,7 +458,9 @@ class Trainer:
...
@@ -458,7 +458,9 @@ class Trainer:
self
.
fsdp
=
ShardingStrategy
.
NO_SHARD
self
.
fsdp
=
ShardingStrategy
.
NO_SHARD
self
.
backward_prefetch
=
BackwardPrefetch
.
BACKWARD_PRE
self
.
backward_prefetch
=
BackwardPrefetch
.
BACKWARD_PRE
if
"backward_prefetch"
in
self
.
args
.
fsdp_config
and
"backward_pos"
not
in
self
.
backward_prefetch
:
if
"backward_prefetch"
in
self
.
args
.
fsdp_config
and
"backward_pos"
in
self
.
args
.
fsdp_config
.
get
(
"backward_prefetch"
,
[]
):
self
.
backward_prefetch
=
BackwardPrefetch
.
BACKWARD_POST
self
.
backward_prefetch
=
BackwardPrefetch
.
BACKWARD_POST
self
.
forward_prefetch
=
False
self
.
forward_prefetch
=
False
...
...
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