feat: training pipeline for all 10 ML ensemble models

- Add standalone training binaries: TGGN, KAN, xLSTM, Diffusion (DBN data)
- Update Dockerfile.training: 6 → 16 binaries (all 10 models + hyperopt + baseline)
- Expand train.sh: 4 → 10 models, fix registry URL and GPU pool nodeSelector
- Add GPU overlay manifests for trading-service and ml-training-service
- Create training data PVC and upload pod manifests
- Expand web-gateway model validation: 4 → 10 types (training + tune routes)
- Extend dashboard: 10 model cards grouped by category (RL/Temporal/Graph/Generative)
- Add training image build job to Gitea CI workflow
- Update GPU taint controller to exclude inference pool from tainting
- Fix job-template nodeSelector: gpu → gpu-training

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jgrusewski
2026-02-24 20:47:50 +01:00
parent e45bda9412
commit 5fb84a02f0
19 changed files with 3602 additions and 35 deletions

View File

@@ -11,7 +11,7 @@ set -euo pipefail
# Presets:
# quick-test - fast sanity check (max-steps=500, requires --model)
# single-model - full training run for one model (requires --model)
# full-ensemble - trains all 4 models (dqn ppo tft mamba2) in parallel
# full-ensemble - trains all 10 models sequentially (dqn ppo tft mamba2 tggn tlob liquid kan xlstm diffusion)
# hyperopt - hyperparameter optimisation (requires --model, uses --trials)
# ---------------------------------------------------------------------------
@@ -22,19 +22,25 @@ MAX_STEPS=2000
TIMEOUT=3600
DATA_DIR="/data/futures-baseline"
NAMESPACE="foxhunt"
IMAGE="rg.nl-ams.scw.cloud/foxhunt/training:latest"
IMAGE="rg.fr-par.scw.cloud/foxhunt/training:latest"
MODEL=""
PRESET=""
TIMESTAMP="$(date +%s)"
ALL_MODELS=(dqn ppo tft mamba2)
ALL_MODELS=(dqn ppo tft mamba2 tggn tlob liquid kan xlstm diffusion)
# --- Model-to-binary mapping ----------------------------------------------
declare -A MODEL_BINARY=(
[dqn]=train_dqn
[dqn]=train_dqn_es_fut
[ppo]=train_ppo_parquet
[tft]=hyperopt_tft_demo
[mamba2]=hyperopt_mamba2_demo
[tft]=train_tft_dbn
[mamba2]=train_mamba2_dbn
[tggn]=train_tggn_dbn
[tlob]=train_tlob
[liquid]=train_liquid_dbn
[kan]=train_kan_dbn
[xlstm]=train_xlstm_dbn
[diffusion]=train_diffusion_dbn
)
# --- Helpers --------------------------------------------------------------
@@ -45,11 +51,11 @@ Usage: ./infra/scripts/train.sh <preset> [OPTIONS]
Presets:
quick-test Fast sanity check (requires --model, max-steps=500)
single-model Full training run (requires --model)
full-ensemble Trains dqn, ppo, tft, mamba2 in parallel Jobs
full-ensemble Trains all 10 models sequentially (dqn ppo tft mamba2 tggn tlob liquid kan xlstm diffusion)
hyperopt Hyperparameter search (requires --model, uses --trials)
Options:
--model MODEL Model name: dqn | ppo | tft | mamba2
--model MODEL Model name: dqn | ppo | tft | mamba2 | tggn | tlob | liquid | kan | xlstm | diffusion
--symbol SYMBOL Trading symbol (default: ES.FUT)
--trials N Hyperopt trial count (default: 20)
--max-steps N Max steps per epoch (default: 2000)
@@ -152,7 +158,7 @@ spec:
spec:
restartPolicy: Never
nodeSelector:
k8s.scaleway.com/pool-name: gpu
k8s.scaleway.com/pool-name: gpu-training
tolerations:
- key: nvidia.com/gpu
operator: Exists
@@ -218,6 +224,8 @@ case "$PRESET" in
full-ensemble)
for m in "${ALL_MODELS[@]}"; do
submit_job "$m"
echo " Waiting for ${m} to complete before next model..."
kubectl -n "${NAMESPACE}" wait --for=condition=complete "job/train-${m}-${TIMESTAMP}" --timeout="${TIMEOUT}s" 2>/dev/null || true
done
;;
esac