We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a087210 commit d17f97dCopy full SHA for d17f97d
poutyne/framework/metrics/predefined/bincount.py
@@ -39,7 +39,12 @@
39
40
import torch
41
from torch import Tensor
42
-from torchmetrics.utilities.imports import _TORCH_GREATER_EQUAL_1_12, _XLA_AVAILABLE
+from torchmetrics.utilities.imports import _TORCH_GREATER_EQUAL_1_12
43
+
44
+try:
45
+ from torchmetrics.utilities.imports import _XLA_AVAILABLE
46
+except ImportError:
47
+ _XLA_AVAILABLE = False
48
49
50
def _bincount(x: Tensor, minlength: Optional[int] = None) -> Tensor:
0 commit comments