--epochs
π¦ AthenaAI is an AI-powered ensemble machine-learning trading bot for PocketOption, built on BinaryOptionsToolsV2 β Get it on GitLab
π¬ Need help? Join the Chipa Discord Β· β‘ Go no-code with ChipaEditor
Number of full passes over the training set for the neural model (PyTorch MLP).
| Type | int |
| Default | 30 |
| Maps to | TrainerConfig.nn_epochs |
| Read in | train.py β src/training/trainer.py (Trainer._train_nn()) β src/training/torch_model.py (TorchMLPClassifier.fit()) |
What it does
_train_nn() constructs TorchMLPClassifier(epochs=cfg.nn_epochs, ...). In fit() (src/training/torch_model.py), the training loop runs for epoch in range(self.epochs), each epoch iterating a shuffled DataLoader over the scaled training features with cross-entropy loss and the AdamW optimizer. Progress is logged on epoch 1 and every 5th epoch:
MLP epoch 5/30 loss=0.6893 acc=53.2%
There is no early stopping or validation-based scheduling β the model trains for exactly this many epochs. Overfitting is mitigated structurally instead: dropout 0.2 after every hidden layer and AdamW weight decay 1e-5 (both fixed, not CLI-exposed). After training, the modelβs holdout accuracy (on the --test-split set it never saw) becomes its vote weight in the ensemble, so an overfit net is down-weighted rather than trusted.
Choosing a value
- 30 is a reasonable default for the default
128,64network on hundreds of thousands of samples. - Watch the logged in-training accuracy: if loss is still falling at the last epoch, more epochs (e.g.
--epochs 60) may help β but judge by the holdout accuracy line (MLP holdout accuracy: ...), not the training one. - Training time scales linearly with epochs; on CPU this is the dominant cost of the whole run.
- Because there is no early stopping, very high epoch counts mostly buy overfitting; the ensemble weighting limits the damage but wastes time.
Examples
python train.py --epochs 60 --hidden 256,128,64 --lr 5e-4
python train.py --cpu --epochs 50Interactions
--no-nnβ makes this flag a no-op.--lr,--batch-size,--hiddenβ the other MLP hyperparameters.
See also
π¬ Unsure how this interacts with the rest of the configuration? Ask in the Chipa Discord β or prototype strategies no-code with ChipaEditor.