From 836d7b885a0b91aabbce30a80833236fdafac9b0 Mon Sep 17 00:00:00 2001 From: yinon Date: Fri, 4 Aug 2023 12:50:01 +0000 Subject: [PATCH] pytorch - trainer - set default usage of n_epochs instead of max_iters --- 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 7a8857994..dc34e8907 100644 --- a/freqtrade/freqai/torch/PyTorchModelTrainer.py +++ b/freqtrade/freqai/torch/PyTorchModelTrainer.py @@ -50,8 +50,8 @@ class PyTorchModelTrainer(PyTorchTrainerInterface): self.criterion = criterion self.model_meta_data = model_meta_data self.device = device - self.max_iters: int = kwargs.get("max_iters", 100) - self.n_epochs: Optional[int] = kwargs.get("n_epochs", None) + self.max_iters: int = kwargs.get("max_iters", None) + self.n_epochs: Optional[int] = kwargs.get("n_epochs", 10) if not self.max_iters and not self.n_epochs: raise Exception("Either `max_iters` or `n_epochs` should be set.")