Skip to content

Commit

Permalink
fix: mypy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
djaniak committed Nov 15, 2022
1 parent 7413318 commit 3073be2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion embeddings/pipeline/hps_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class TorchGarbageCollectorOptunaCallback(OptunaCallback):
def _cleanup() -> None:
gc.collect()
if torch.cuda.is_available():
torch.cuda.empty_cache() # type: ignore
torch.cuda.empty_cache()

def __call__(self, study: Study, trial: optuna.trial.FrozenTrial) -> None:
TorchGarbageCollectorOptunaCallback._cleanup()
Expand Down
2 changes: 1 addition & 1 deletion embeddings/task/lightning_task/lightning_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def fit(
self.trainer.fit(self.model, data)
except Exception as e:
del self.trainer
torch.cuda.empty_cache() # type: ignore
torch.cuda.empty_cache()
raise e

@abc.abstractmethod
Expand Down

0 comments on commit 3073be2

Please sign in to comment.