File tree 2 files changed +11
-2
lines changed
2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 62
62
is_accelerate_available ,
63
63
is_apex_available ,
64
64
is_sagemaker_mp_enabled ,
65
- is_torch_xla_available ,
66
65
logging ,
67
66
)
68
67
73
72
from .configuration import INCConfig
74
73
75
74
75
+ if is_transformers_version (">=" , "4.39.0" ):
76
+ from transformers .utils import is_torch_xla_available
77
+ else :
78
+ from transformers .utils import is_torch_tpu_available as is_torch_xla_available
79
+
80
+
76
81
if is_accelerate_available ():
77
82
from accelerate import __version__ as accelerate_version
78
83
from accelerate import skip_first_batches
Original file line number Diff line number Diff line change 80
80
is_accelerate_available ,
81
81
is_apex_available ,
82
82
is_sagemaker_mp_enabled ,
83
- is_torch_xla_available ,
84
83
logging ,
85
84
)
86
85
101
100
)
102
101
103
102
103
+ if is_transformers_version (">=" , "4.39.0" ):
104
+ from transformers .utils import is_torch_xla_available
105
+ else :
106
+ from transformers .utils import is_torch_tpu_available as is_torch_xla_available
107
+
104
108
if is_accelerate_available ():
105
109
from accelerate import __version__ as accelerate_version
106
110
from accelerate import skip_first_batches
You can’t perform that action at this time.
0 commit comments