From 430f5f289bce7608bd6fde8f26cde743d3ebbb73 Mon Sep 17 00:00:00 2001 From: Ashwin Vaidya Date: Sun, 18 Feb 2024 14:35:31 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A8Fix=20predict=5Fstep=20in=20Anomaly?= =?UTF-8?q?Module=20(#1746)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit hotfix --- src/anomalib/models/components/base/anomaly_module.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/anomalib/models/components/base/anomaly_module.py b/src/anomalib/models/components/base/anomaly_module.py index 29e6b6f3d5..3bfbe2e3ea 100644 --- a/src/anomalib/models/components/base/anomaly_module.py +++ b/src/anomalib/models/components/base/anomaly_module.py @@ -87,9 +87,9 @@ def predict_step( Return: Predicted output """ - del batch_idx, dataloader_idx # These variables are not used. + del dataloader_idx # These variables are not used. - return self.validation_step(batch) + return self.validation_step(batch, batch_idx) def test_step(self, batch: dict[str, str | torch.Tensor], batch_idx: int, *args, **kwargs) -> STEP_OUTPUT: """Calls validation_step for anomaly map/score calculation.