Skip to content

Commit 3073be2

Browse files
committed
fix: mypy errors
1 parent 7413318 commit 3073be2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

embeddings/pipeline/hps_pipeline.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class TorchGarbageCollectorOptunaCallback(OptunaCallback):
3939
def _cleanup() -> None:
4040
gc.collect()
4141
if torch.cuda.is_available():
42-
torch.cuda.empty_cache() # type: ignore
42+
torch.cuda.empty_cache()
4343

4444
def __call__(self, study: Study, trial: optuna.trial.FrozenTrial) -> None:
4545
TorchGarbageCollectorOptunaCallback._cleanup()

embeddings/task/lightning_task/lightning_task.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def fit(
9393
self.trainer.fit(self.model, data)
9494
except Exception as e:
9595
del self.trainer
96-
torch.cuda.empty_cache() # type: ignore
96+
torch.cuda.empty_cache()
9797
raise e
9898

9999
@abc.abstractmethod

0 commit comments

Comments
 (0)