From b8f5df7cf6d611f28dd2912d79d9bae1cee5031c Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 24 Mar 2026 20:10:49 +0100 Subject: [PATCH] chore: remove unnecessary child method (it does the same thing than the parent). --- freqtrade/freqai/torch/PyTorchModelTrainer.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/freqtrade/freqai/torch/PyTorchModelTrainer.py b/freqtrade/freqai/torch/PyTorchModelTrainer.py index 92e9effdd..1c12f15fd 100644 --- a/freqtrade/freqai/torch/PyTorchModelTrainer.py +++ b/freqtrade/freqai/torch/PyTorchModelTrainer.py @@ -179,16 +179,12 @@ class PyTorchModelTrainer(PyTorchTrainerInterface): path, ) - def load(self, path: Path): - checkpoint = torch.load(path) - return self.load_from_checkpoint(checkpoint) - def load_from_checkpoint(self, checkpoint: dict): """ when using continual_learning, DataDrawer will load the dictionary (containing state dicts and model_meta_data) by calling torch.load(path). you can access this dict from any class that inherits IFreqaiModel by calling - get_init_model method. + the get_init_model method. """ self.model.load_state_dict(checkpoint["model_state_dict"]) self.optimizer.load_state_dict(checkpoint["optimizer_state_dict"])