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
a6f37f88
"tools/git@developer.sourcefind.cn:gaoqiong/migraphx.git" did not exist on "9dc0b779a25a929cd59e1f914abf6aa9c33b278f"
Unverified
Commit
a6f37f88
authored
Jun 23, 2023
by
Sourab Mangrulkar
Committed by
GitHub
Jun 23, 2023
Browse files
fixes issue when saving fsdp via accelerate's FSDP plugin (#24446)
parent
2898fd39
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 @
a6f37f88
...
...
@@ -2322,7 +2322,7 @@ class Trainer:
torch
.
save
(
self
.
scaler
.
state_dict
(),
os
.
path
.
join
(
output_dir
,
SCALER_NAME
))
elif
self
.
args
.
should_save
and
not
self
.
is_deepspeed_enabled
:
# deepspeed.save_checkpoint above saves model/optim/sched
if
self
.
fsdp
:
if
self
.
fsdp
and
not
self
.
is_fsdp_enabled
:
torch
.
save
(
full_osd
,
os
.
path
.
join
(
output_dir
,
OPTIMIZER_NAME
))
else
:
torch
.
save
(
self
.
optimizer
.
state_dict
(),
os
.
path
.
join
(
output_dir
,
OPTIMIZER_NAME
))
...
...
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