Skip to content

Commit

Permalink
Address ruff issues
Browse files Browse the repository at this point in the history
  • Loading branch information
blaz-r committed Feb 5, 2024
1 parent 369a06c commit d434ac3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/anomalib/models/image/efficient_ad/lightning_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,8 @@ def configure_optimizers(self) -> torch.optim.Optimizer:
)

if self.trainer.max_epochs < 0 and self.trainer.max_steps < 0:
raise ValueError("A finite number of steps or epochs must be defined")
msg = "A finite number of steps or epochs must be defined"
raise ValueError(msg)

# lightning stops training when either 'max_steps' or 'max_epochs' is reached (earliest),
# so actual training steps need to be determined here
Expand Down

0 comments on commit d434ac3

Please sign in to comment.