Skip to content

Commit

Permalink
Merge pull request FlagAI-Open#360 from zhiyongLiu1114/master
Browse files Browse the repository at this point in the history
[FIX_BUG] when torch.__version__ >=2, sys should be imported
  • Loading branch information
ftgreat authored Jun 12, 2023
2 parents 128a809 + 2746a76 commit fa9b5a3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions flagai/mpu/grads.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
# repo: https://github.com/pytorch/pytorch

import torch
import sys
if torch.__version__ >= "2" and sys.platform != "win32":
from torch import inf
else:
Expand Down

0 comments on commit fa9b5a3

Please sign in to comment.