mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-02-05 22:00:25 +00:00
pytorch - mypy fixes
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user