Skip to content

Commit 8d626dd

Browse files
committed
Ran run_code_style.sh fmt
1 parent 82a647e commit 8d626dd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ignite/contrib/metrics/ExpectedCalibrationError.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import torch
2-
from ignite.metrics import Metric
2+
33
from ignite.exceptions import NotComputableError
4+
from ignite.metrics import Metric
5+
46

57
class ExpectedCalibrationError(Metric):
68
def __init__(self, num_bins=10, device=None):
@@ -26,7 +28,9 @@ def update(self, output):
2628

2729
def compute(self):
2830
if self.confidences.numel() == 0:
29-
raise NotComputableError("ExpectedCalibrationError must have at least one example before it can be computed.")
31+
raise NotComputableError(
32+
"ExpectedCalibrationError must have at least one example before it can be computed."
33+
)
3034

3135
bin_edges = torch.linspace(0, 1, self.num_bins + 1, device=self.device)
3236

0 commit comments

Comments
 (0)