Skip to content

Commit

Permalink
align with pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
chuneuny-emily committed Apr 11, 2024
1 parent 0af9749 commit 2f782d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/otx/algo/strategies/xpu_single.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def setup_optimizers(self, trainer: pl.Trainer) -> None:
msg = "XPU strategy doesn't support multiple optimizers"
raise RuntimeError(msg)
if trainer.task != "SEMANTIC_SEGMENTATION":
if len(self.optimizers) == 1:
if len(self.optimizers) == 1: # type: ignore[has-type]
model, optimizer = torch.xpu.optimize(trainer.model, optimizer=self.optimizers[0]) # type: ignore[has-type]
self.optimizers = [optimizer]
self.model = model
Expand Down

0 comments on commit 2f782d3

Please sign in to comment.