From d61f512e200c214d285aaff5775c54c46987d343 Mon Sep 17 00:00:00 2001 From: Yinon Polak Date: Sat, 15 Jul 2023 14:43:05 +0300 Subject: [PATCH] pytorch - trainer - clean code --- 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 1692b4acf..7a8857994 100644 --- a/freqtrade/freqai/torch/PyTorchModelTrainer.py +++ b/freqtrade/freqai/torch/PyTorchModelTrainer.py @@ -86,7 +86,7 @@ class PyTorchModelTrainer(PyTorchTrainerInterface): ) batch_counter = 0 - for epoch in range(n_epochs): + for _ in range(n_epochs): for _, batch_data in enumerate(data_loaders_dictionary["train"]): xb, yb = batch_data xb = xb.to(self.device) @@ -171,7 +171,7 @@ class PyTorchModelTrainer(PyTorchTrainerInterface): """ - Saving any nn.Module state_dict - Saving model_meta_data, this dict should contain any additional data that the - user needs to store. e.g class_names for classification models. + user needs to store. e.g. class_names for classification models. """ torch.save({