We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi Folks,
I stumbled over this issue while playing around with anomlib
See this issue in anomalib: openvinotoolkit/anomalib#2531
To keep it short continuously calling compute on BinaryPrecisionRecallCurve(Metric) grows the self.preds and self.target indefinitely.
compute
BinaryPrecisionRecallCurve(Metric)
self.preds
self.target
This eventually leads to a memory overflow.
the following code resolves the issue by clearing the preds and targets after concatenating them to the state
def compute(self) -> tuple[Tensor, Tensor, Tensor]: """Compute metric.""" if self.thresholds is None: if not self.preds or not self.target: return torch.tensor([]), torch.tensor([]), torch.tensor([]) state = (torch.cat(self.preds), torch.cat(self.target)) self.preds.clear() self.target.clear() else: state = self.confmat self.confmat.zero_() precision, recall, thresholds = _binary_precision_recall_curve_compute(state, self.thresholds) return precision, recall, thresholds if thresholds is not None else torch.tensor([])
Cheers
The text was updated successfully, but these errors were encountered:
Hi! thanks for your contribution!, great first issue!
Sorry, something went wrong.
@Borda I would be interested in working on this
rittik9
Successfully merging a pull request may close this issue.
Hi Folks,
I stumbled over this issue while playing around with anomlib
🐛 Bug
See this issue in anomalib:
openvinotoolkit/anomalib#2531
To keep it short continuously calling
compute
onBinaryPrecisionRecallCurve(Metric)
grows theself.preds
andself.target
indefinitely.This eventually leads to a memory overflow.
the following code resolves the issue by clearing the preds and targets after concatenating them to the state
Cheers
The text was updated successfully, but these errors were encountered: