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
85447bb2
Unverified
Commit
85447bb2
authored
Aug 09, 2023
by
jiqing-feng
Committed by
GitHub
Aug 09, 2023
Browse files
rm useless condition since the previous condition contains it. (#25403)
parent
1564a81a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
8 deletions
+0
-8
src/transformers/trainer.py
src/transformers/trainer.py
+0
-8
No files found.
src/transformers/trainer.py
View file @
85447bb2
...
@@ -1086,14 +1086,6 @@ class Trainer:
...
@@ -1086,14 +1086,6 @@ class Trainer:
optimizer_kwargs
.
update
(
bnb_kwargs
)
optimizer_kwargs
.
update
(
bnb_kwargs
)
except
ImportError
:
except
ImportError
:
raise
ValueError
(
"Trainer tried to instantiate bnb optimizer but bnb is not installed!"
)
raise
ValueError
(
"Trainer tried to instantiate bnb optimizer but bnb is not installed!"
)
elif
args
.
optim
==
OptimizerNames
.
ADAMW_BNB
:
try
:
from
bitsandbytes.optim
import
Adam8bit
optimizer_cls
=
Adam8bit
optimizer_kwargs
.
update
(
adam_kwargs
)
except
ImportError
:
raise
ValueError
(
"Trainer tried to instantiate bnb Adam8bit but bnb is not installed!"
)
elif
args
.
optim
==
OptimizerNames
.
ADAMW_ANYPRECISION
:
elif
args
.
optim
==
OptimizerNames
.
ADAMW_ANYPRECISION
:
try
:
try
:
from
torchdistx.optimizers
import
AnyPrecisionAdamW
from
torchdistx.optimizers
import
AnyPrecisionAdamW
...
...
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