Files
foxhunt/archive/scripts/deploy_tft_hyperopt.sh
jgrusewski 2df1ea92e1 feat(ml): WAVE 29 DQN Codebase Cleanup & Refactoring Campaign
BREAKING CHANGES:
- Removed orphaned dqn.rs monolithic trainer (4,975 lines)
- Removed orphaned dqn_ensemble.rs module (816 lines)
- Removed orphaned tft.rs and tft_complete_int8_integration_test.rs
- TFT trainer split into modular directory structure

DQN Module Refactoring:
- Split trainers/dqn.rs into modular structure (config.rs, statistics.rs, trainer.rs)
- Fixed hyperopt 39D search space (continuous params only)
- Boolean flags (use_dueling, use_double_dqn, use_per, use_noisy_nets) are now FIXED architectural decisions
- use_distributional defaults to false (Candle BUG #36 - scatter_add gradient issues)

Clean Module Structure:
- ml/src/trainers/dqn/ directory with proper mod.rs exports
- ml/src/trainers/tft/ directory with config.rs, types.rs, model.rs, trainer.rs, tests.rs
- All P0 features validated: TD-error clamping, batch diversity, LR scheduler, priority staleness

Documentation:
- Added comprehensive docs in docs/codebase-cleanup/
- ADR-001 for DQN refactoring decisions
- Rainbow DQN component matrix and quick reference guides

Build Status: Compiles with zero errors

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 23:46:13 +01:00

33 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
set -e
echo "========================================="
echo "TFT Hyperopt Deployment"
echo "========================================="
echo ""
# Set PYTHONPATH
export PYTHONPATH="/home/jgrusewski/Work/foxhunt:$PYTHONPATH"
# Activate venv
source .venv/bin/activate
# Deploy TFT hyperopt with optimal batch size for RTX 4090 (24GB VRAM)
# Higher batch sizes possible due to increased memory (128 → 192)
python3 scripts/runpod_deploy.py \
--gpu-type "RTX 4090" \
--image "jgrusewski/foxhunt-hyperopt:latest" \
--command "hyperopt_tft_demo --parquet-file /runpod-volume/test_data/ES_FUT_180d.parquet --trials 50 --epochs 100 --batch-size-min 16 --batch-size-max 192 --base-dir /runpod-volume/ml_training/tft_hyperopt --early-stopping-patience 10"
echo ""
echo "✅ TFT hyperopt deployment initiated"
echo "Monitor logs: python3 scripts/python/runpod/monitor_logs.py <pod_id>"
echo "Expected duration: 30-40 hours (faster with RTX 4090)"
echo "Expected cost: \$17.70-\$23.60 @ \$0.59/hr (RTX 4090 24GB)"
echo ""
echo "Success Criteria:"
echo " - Validation loss decreasing"
echo " - Attention weights converging"
echo " - Quantile predictions balanced (0.1, 0.5, 0.9)"
echo " - Final backtest: > 10% return, Sharpe > 1.5"