diff --git a/crates/ml/src/hyperopt/adapters/dqn.rs b/crates/ml/src/hyperopt/adapters/dqn.rs index 6fe9ca82a..aa16731dc 100644 --- a/crates/ml/src/hyperopt/adapters/dqn.rs +++ b/crates/ml/src/hyperopt/adapters/dqn.rs @@ -2346,10 +2346,12 @@ impl HyperparameterOptimizable for DQNTrainer { min_replay_size: params.batch_size * 2, // Need at least 2x batch size epochs: self.epochs, checkpoint_frequency: (self.epochs / 5).max(1), // Save 5 checkpoints per trial, min 1 - // C4 FIX: Re-enable early stopping with adaptive plateau window. - // Previous issue: plateau_window=5 with 8 epochs triggered too often. - // Fix: adaptive window = max(epochs / 2, 3), giving enough learning time. - early_stopping_enabled: true, + // Disable early stopping for short hyperopt trials (≤12 epochs). + // Reason: early stopping returns penalty metrics + no backtest, causing + // ALL trials to hit FALLBACK OBJECTIVE. With 8 epochs (~90s per trial), + // it's cheaper to run all epochs and get real backtest metrics. + // Long training runs (train-best, 50 epochs) still use early stopping. + early_stopping_enabled: self.epochs > 12, q_value_floor: -5.0, min_loss_improvement_pct: 2.0, plateau_window: (self.epochs / 2).max(5),