Files
foxhunt/services/ml_training_service
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
..

ml_training_service

Model training orchestration and lifecycle management for DQN, PPO, TFT, Mamba2, TLOB, and Liquid models with progress tracking and artifact storage.

Key Types

  • MlTrainingServiceImpl -- main gRPC service
  • JobTracker -- training job state machine
  • CheckpointManager -- model artifact persistence

Features

  • minimal (default) -- minimal ML feature set for financial models
  • gpu -- SIMD GPU acceleration (requires CUDA)
  • mock-data -- mock training data (testing, bypasses database)

Configuration

  • GRPC_PORT -- gRPC listen port
  • DATABASE_URL -- PostgreSQL for job metadata and training history
  • Prometheus metrics on port 9094

Testing

SQLX_OFFLINE=true cargo test -p ml_training_service --lib