Skip to content

Commit

Permalink
🚨Fix predict_step in AnomalyModule (#1746)
Browse files Browse the repository at this point in the history
hotfix
  • Loading branch information
ashwinvaidya17 authored Feb 18, 2024
1 parent da38a4a commit 430f5f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/anomalib/models/components/base/anomaly_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 430f5f2

Please sign in to comment.