Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Update PL to 1.3.8 #531

Merged
merged 27 commits into from
Jul 13, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix yet another test
  • Loading branch information
melanibe committed Jul 6, 2021
commit 5061ae64e1d8adb92edbcfb1f0c299f7c60da5a5
4 changes: 2 additions & 2 deletions InnerEye/ML/lightning_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import numpy as np
import torch
import torch.nn.functional as F
from pytorch_lightning import metrics
import torchmetrics as metrics
from pytorch_lightning.metrics import Metric
from pytorch_lightning.metrics.functional import accuracy, auc, auroc, precision_recall_curve, roc
from torch.nn import ModuleList
Expand Down Expand Up @@ -68,7 +68,7 @@ def has_predictions(self) -> bool:
Returns True if the present object stores at least 1 prediction (self.update has been called at least once),
or False if no predictions are stored.
"""
return len(self.y_pred) > 0 # type: ignore
return self.n_obs > 0 # type: ignore


class Accuracy05(metrics.Accuracy):
Expand Down