Files
foxhunt/services/ml_training_service/README.md
jgrusewski 8b81138262 docs: rewrite outdated READMEs and add web-gateway docs
Rewrite 7 crate READMEs to reflect current architecture: correct
model types (DQN/PPO/TFT/Mamba2), AtomicKillSwitch, real
EnsembleConfig source from ml, actual data crate purpose,
web-dashboard project details, ml_training_service ports.

Fix 5 api_gateway/TLI docs: strip swarm agent framing, update
service endpoints to api_gateway:50050, remove deleted dashboard
references and hardcoded paths.

Add missing web-gateway/README.md documenting 24 REST endpoints,
WebSocket support, JWT auth, and 3-tier rate limiting.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 18:39:12 +01:00

1.7 KiB

ml_training_service

Model training orchestration and lifecycle management for the Foxhunt HFT trading system. Manages training jobs for DQN, PPO, TFT, Mamba2, TLOB, and Liquid models with progress tracking, resource allocation, and model artifact storage.

Building

# Default (minimal features)
cargo build --release -p ml_training_service

# With GPU acceleration (requires CUDA)
cargo build --release -p ml_training_service --features gpu

# With mock training data (testing only, bypasses database)
cargo build --release -p ml_training_service --features mock-data

Features

Feature Default Description
minimal Yes Minimal ML feature set for financial models
gpu No SIMD GPU acceleration (requires CUDA)
debug No Additional debug logging
mock-data No Use mock training data instead of PostgreSQL

Configuration

The gRPC listen port is set via the GRPC_PORT environment variable. Prometheus metrics are exposed on port 9094.

PostgreSQL (via sqlx) is used for job metadata, training history, and state management. Set the connection string with DATABASE_URL.

Running

GRPC_PORT=50053 DATABASE_URL="postgresql://user:pass@localhost:5432/foxhunt_training" \
  ./target/release/ml_training_service serve

Testing

# Unit tests (offline, no database required)
SQLX_OFFLINE=true cargo test -p ml_training_service --lib

# Integration tests (requires running PostgreSQL)
cargo test -p ml_training_service