From d17bf6350d10ed3533ac264a7de24faaac572090 Mon Sep 17 00:00:00 2001 From: yinon Date: Fri, 4 Aug 2023 12:52:55 +0000 Subject: [PATCH] pytorch - trainer - revert load changes --- freqtrade/freqai/torch/PyTorchModelTrainer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/freqtrade/freqai/torch/PyTorchModelTrainer.py b/freqtrade/freqai/torch/PyTorchModelTrainer.py index e7c4d53be..2b0090c78 100644 --- a/freqtrade/freqai/torch/PyTorchModelTrainer.py +++ b/freqtrade/freqai/torch/PyTorchModelTrainer.py @@ -181,8 +181,8 @@ class PyTorchModelTrainer(PyTorchTrainerInterface): "pytrainer": self }, path) - def load(self, path: Path, device: Optional[str] = None): - checkpoint = torch.load(path, map_location=device) + def load(self, path: Path): + checkpoint = torch.load(path) return self.load_from_checkpoint(checkpoint) def load_from_checkpoint(self, checkpoint: Dict):