Reverts buggy change from commit 9cd2a9f7 that removed division by n_particles.
PSO evaluates ALL particles per iteration, so must divide remaining budget by
swarm size. Without this, 50 trial request became 962 trials (19.2x overrun).
Root cause: Lines 320-328 in ml/src/hyperopt/optimizer.rs were missing
.saturating_div(self.n_particles) which led to max_iters being set directly
to remaining_trials instead of (remaining_trials / n_particles).
Impact:
- Runpod pod nk5q3xxmb8x40i executed 104+ trials instead of 50
- Cost overrun: $0.55+ instead of $0.08 (6.9x)
- Time overrun: 133+ minutes instead of 15-20 minutes
- Affects all models: DQN, PPO, MAMBA-2, TFT
Validation:
- Local test with 10 trials: Correctly executed 2 trials (2 initial + 0 PSO)
- Budget calculation now logs: 'X remaining trials ÷ Y particles = Z max iters'
Fixes #hyperopt-trial-overflow