From 18e34632d88fad0277824b09ad0694b474e368b9 Mon Sep 17 00:00:00 2001 From: Robert Caulk Date: Mon, 25 Mar 2024 09:21:32 +0100 Subject: [PATCH] Update PyTorchModelTrainer.py The n_epochs should be defined using the `max` not the `min` function. --- 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 371a953e7..a91513dcb 100644 --- a/freqtrade/freqai/torch/PyTorchModelTrainer.py +++ b/freqtrade/freqai/torch/PyTorchModelTrainer.py @@ -152,7 +152,7 @@ class PyTorchModelTrainer(PyTorchTrainerInterface): """ assert isinstance(self.n_steps, int), "Either `n_steps` or `n_epochs` should be set." n_batches = n_obs // self.batch_size - n_epochs = min(self.n_steps // n_batches, 1) + n_epochs = max(self.n_steps // n_batches, 1) if n_epochs <= 10: logger.warning( f"Setting low n_epochs: {n_epochs}. "