Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
nelson-liu committed Apr 6, 2021
1 parent eeb7877 commit 10daafb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transformers/trainer_pt_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
if is_torch_tpu_available():
import torch_xla.core.xla_model as xm

if version.parse(torch.__version__) <= version.parse("1.4.1"):
if version.parse(torch.__version__) <= version.parse("1.4.1") or version.parse(torch.__version__) > version.parse("1.7.0"):
SAVE_STATE_WARNING = ""
else:
from torch.optim.lr_scheduler import SAVE_STATE_WARNING
Expand Down

0 comments on commit 10daafb

Please sign in to comment.