Skip to content

Commit

Permalink
Merge pull request EleutherAI#194 from EleutherAI/fix-calibration-update
Browse files Browse the repository at this point in the history
Fix swapped labels and probs in calibration error metric update
  • Loading branch information
AlexTMallen committed Apr 16, 2023
2 parents 7b4a00c + fdaeea1 commit 633cda0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions elk/calibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ def update(self, labels: Tensor, probs: Tensor) -> "CalibrationError":
assert labels.shape == probs.shape
assert torch.is_floating_point(probs)

self.labels.append(probs)
self.pred_probs.append(labels)
self.labels.append(labels)
self.pred_probs.append(probs)
return self

def compute(self, p: int = 2) -> CalibrationEstimate:
Expand Down

0 comments on commit 633cda0

Please sign in to comment.