From ffcba45b1bda92a2d71b7a4d40254e2d0c352aa6 Mon Sep 17 00:00:00 2001 From: Yinon Polak Date: Thu, 13 Jul 2023 21:36:14 +0300 Subject: [PATCH] pytorch - mypy fixes --- freqtrade/freqai/torch/PyTorchModelTrainer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/freqai/torch/PyTorchModelTrainer.py b/freqtrade/freqai/torch/PyTorchModelTrainer.py index e6691f3db..e6638d4fd 100644 --- a/freqtrade/freqai/torch/PyTorchModelTrainer.py +++ b/freqtrade/freqai/torch/PyTorchModelTrainer.py @@ -176,7 +176,7 @@ class PyTorchModelTrainer(PyTorchTrainerInterface): "pytrainer": self }, path) - def load(self, path: Path, device: str = None): + def load(self, path: Path, device: Optional[str] = None): checkpoint = torch.load(path, map_location=device) return self.load_from_checkpoint(checkpoint)