Files
foxhunt/services/ml_training_service/tuning_config_optimized.yaml
jgrusewski 04d8802c94 refactor: remove 8 always-on use_ booleans — features are mandatory
Remove use_double_dqn, use_dueling, use_per, use_branching,
use_distributional, use_noisy_nets, use_huber_loss, and use_cql
from DQNConfig, DQNHyperparameters, and DqnParams structs.

These features are always enabled (Rainbow DQN standard). The boolean
flags were dead code — every constructor set them to true, and the
only code paths that set them to false were in tests that disabled
features for simplicity. With the fields removed, the features are
unconditionally active, eliminating ~490 lines of dead configuration.

Key changes:
- Struct field declarations removed from 3 core config structs
- Conditional branches (if use_X { ... } else { ... }) simplified:
  dueling/branching/PER network creation is now unconditional
- Checkpoint metadata hardcodes "true" for backward compatibility
- Hyperopt search space index 11 (use_branching) fixed at 1.0
- TOML/YAML config files cleaned of removed fields
- Tests that toggled these flags updated or rewritten

45 files changed, -487 net lines. Zero new test failures.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 09:45:54 +01:00

177 lines
4.6 KiB
YAML

# Hyperparameter Tuning Configuration for Foxhunt ML Models - Agent 49 Optimized
# Defines focused search spaces based on Agent 49 specifications
# Global tuning settings
global:
optimization_direction: maximize # maximize sharpe_ratio
pruning_enabled: true
median_pruner:
n_startup_trials: 5 # No pruning for first 5 trials (establish baseline)
n_warmup_steps: 10 # Wait 10 epochs before starting to prune
interval_steps: 5 # Check for pruning every 5 epochs
sampler: TPE # Tree-structured Parzen Estimator (supports Bayesian optimization)
# Model-specific search spaces (Agent 49 Specifications)
models:
# DQN: Deep Q-Network for Reinforcement Learning
DQN:
# Agent 49 specified parameters
learning_rate:
type: categorical
choices: [0.00001, 0.0001, 0.001] # [1e-5, 1e-4, 1e-3]
batch_size:
type: categorical
choices: [64, 128, 256]
gamma:
type: categorical
choices: [0.95, 0.99, 0.999]
# Additional DQN-specific parameters (for completeness)
epochs:
type: int
low: 100
high: 300
step: 50
replay_buffer_size:
type: categorical
choices: [50000, 100000]
epsilon_start:
type: float
low: 0.95
high: 1.0
step: 0.05
epsilon_end:
type: float
low: 0.01
high: 0.05
step: 0.01
epsilon_decay_steps:
type: int
low: 5000
high: 10000
step: 1000
target_update_frequency:
type: categorical
choices: [500, 1000]
use_prioritized_replay:
type: categorical
choices: [true, false]
# PPO: Proximal Policy Optimization
PPO:
# Agent 49 specified parameters
learning_rate:
type: categorical
choices: [0.00003, 0.0001, 0.0003] # [3e-5, 1e-4, 3e-4]
entropy_coef:
type: categorical
choices: [0.01, 0.05, 0.1]
clip_ratio:
type: categorical
choices: [0.1, 0.2, 0.3]
# Additional PPO-specific parameters (for completeness)
epochs:
type: int
low: 100
high: 300
step: 50
batch_size:
type: categorical
choices: [128, 256, 512]
value_loss_coef:
type: categorical
choices: [0.5, 1.0]
rollout_steps:
type: categorical
choices: [512, 1024, 2048]
minibatch_size:
type: categorical
choices: [64, 128, 256]
gae_lambda:
type: categorical
choices: [0.95, 0.97, 0.99]
# MAMBA-2: State Space Model
MAMBA_2:
# Agent 49 specified parameters
learning_rate:
type: categorical
choices: [0.00001, 0.0001, 0.001] # [1e-5, 1e-4, 1e-3]
state_dim:
type: categorical
choices: [16, 32, 64] # State size in Agent 49 spec
num_layers:
type: categorical
choices: [4, 6, 8] # Layers in Agent 49 spec
# Additional MAMBA-2 parameters (for completeness)
epochs:
type: int
low: 50
high: 150
step: 25
batch_size:
type: categorical
choices: [64, 128, 256]
hidden_dim:
type: categorical
choices: [128, 256, 512]
dt_min:
type: float
low: 0.0001
high: 0.001
log: true
dt_max:
type: float
low: 0.01
high: 0.1
log: true
use_cuda_kernels:
type: categorical
choices: [true, false]
# TFT: Temporal Fusion Transformer
TFT:
# Agent 49 specified parameters
learning_rate:
type: categorical
choices: [0.00001, 0.0001, 0.001] # [1e-5, 1e-4, 1e-3]
num_heads:
type: categorical
choices: [4, 8, 16] # Attention heads in Agent 49 spec
hidden_dim:
type: categorical
choices: [128, 256, 512] # Hidden dim in Agent 49 spec
# Additional TFT parameters (for completeness)
epochs:
type: int
low: 50
high: 150
step: 25
batch_size:
type: categorical
choices: [64, 128, 256]
num_layers:
type: categorical
choices: [3, 4, 6]
lookback_window:
type: categorical
choices: [30, 50, 100]
forecast_horizon:
type: categorical
choices: [5, 10, 20]
dropout_rate:
type: categorical
choices: [0.1, 0.2, 0.3]
# Search space sizes (for reporting):
# DQN: 3 (lr) * 3 (batch) * 3 (gamma) = 27 combinations (grid) + continuous params
# PPO: 3 (lr) * 3 (entropy) * 3 (clip) = 27 combinations (grid) + continuous params
# MAMBA-2: 3 (lr) * 3 (state) * 3 (layers) = 27 combinations (grid) + continuous params
# TFT: 3 (lr) * 3 (heads) * 3 (hidden) = 27 combinations (grid) + continuous params
#
# Total grid combinations per model: 27
# Recommended trials per model: 50-100 (TPE sampler explores beyond grid)