Fix all is_torch_tpu_available issues (#17936)
* Fix all is_torch_tpu_available
This commit is contained in:
@@ -30,7 +30,7 @@ from transformers.trainer_utils import PredictionOutput
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
if is_torch_tpu_available():
|
||||
if is_torch_tpu_available(check_device=False):
|
||||
import torch_xla.core.xla_model as xm
|
||||
import torch_xla.debug.metrics as met
|
||||
|
||||
|
||||
Reference in New Issue
Block a user