mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 10:12:23 +06:00
rm useless condition since the previous condition contains it. (#25403)
This commit is contained in:
parent
1564a81ac5
commit
85447bb22e
@ -1086,14 +1086,6 @@ class Trainer:
|
||||
optimizer_kwargs.update(bnb_kwargs)
|
||||
except ImportError:
|
||||
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:
|
||||
try:
|
||||
from torchdistx.optimizers import AnyPrecisionAdamW
|
||||
|
Loading…
Reference in New Issue
Block a user