Files
foxhunt/scripts/archive/cleanup_2025_10_30/test_tuning_small.sh
jgrusewski 433af5c25d chore: Major codebase cleanup - remove deprecated files and organize structure
- Docker: Delete 23 deprecated Dockerfiles, fix CI/CD to use Dockerfile.foxhunt-build
- Config: Remove 36 .env files, keep 4 essential, delete config/environments/
- Docs: Archive 614 Wave D files to docs/archive/wave_d/, 95% reduction in root
- Scripts: Delete 56 deprecated scripts, keep 58 production-critical (49% reduction)
- Python: Organize 37 scripts into scripts/python/ subdirectories, delete ml/python/
- Build: Remove 1GB artifacts, delete old venvs, clean Python cache from git
- Migrations: Delete deprecated directory (4,432 lines), remove duplicate database/migrations/
- Infrastructure: Delete deployment/ (61 files), docs/scripts/ (8 files)

Total impact: ~2,500 files cleaned, 750MB+ space freed, zero production impact
All deleted scripts backed up to archives. runpod/ and tests/runpod/ preserved.
data_acquisition_service retained per user request.
2025-10-30 01:02:34 +01:00

82 lines
2.1 KiB
Bash
Executable File

#!/bin/bash
# Test hyperparameter tuning with small dataset (1-2 trials)
set -e
echo "🧪 Testing Hyperparameter Tuning System (Small Batch)"
echo "=================================================="
echo ""
# Configuration
DATA_DIR="test_data/real/databento/ml_training_small"
MODEL_TYPE="DQN"
NUM_TRIALS=2
CONFIG_FILE="tuning_config.yaml"
# Validate prerequisites
echo "📋 Checking prerequisites..."
if [ ! -d "$DATA_DIR" ]; then
echo "❌ Training data directory not found: $DATA_DIR"
exit 1
fi
FILE_COUNT=$(find "$DATA_DIR" -name "*.dbn" | wc -l)
echo "✅ Found $FILE_COUNT DBN files in $DATA_DIR"
if [ ! -f "$CONFIG_FILE" ]; then
echo "❌ Config file not found: $CONFIG_FILE"
exit 1
fi
echo "✅ Config file found: $CONFIG_FILE"
# Check GPU
if ! nvidia-smi > /dev/null 2>&1; then
echo "⚠️ WARNING: nvidia-smi not available, will use CPU"
USE_GPU="false"
else
GPU_NAME=$(nvidia-smi --query-gpu=name --format=csv,noheader | head -1)
GPU_MEMORY=$(nvidia-smi --query-gpu=memory.total --format=csv,noheader,nounits | head -1)
echo "✅ GPU available: $GPU_NAME ($GPU_MEMORY MB)"
USE_GPU="true"
fi
echo ""
echo "🚀 Starting Small Batch Test..."
echo " Model: $MODEL_TYPE"
echo " Trials: $NUM_TRIALS"
echo " Data: $DATA_DIR"
echo " GPU: $USE_GPU"
echo ""
# Create a minimal test script for manual execution
cat > /tmp/test_single_trial.sh << 'EOF'
#!/bin/bash
# Manual single trial test
echo "Testing single DQN trial with WorkingDQN..."
# This would normally call the hyperparameter tuner
# For now, we'll use the GPU benchmark as a proxy
cd /home/jgrusewski/Work/foxhunt
# Run a quick DQN training test
cargo run -p ml --example gpu_training_benchmark --release --features cuda -- --epochs 5
echo "✅ Single trial test complete!"
EOF
chmod +x /tmp/test_single_trial.sh
# Run the test
echo "📊 Executing trial test..."
/tmp/test_single_trial.sh
echo ""
echo "✅ Small batch test complete!"
echo ""
echo "📈 Next steps:"
echo " 1. If successful, run full 3-month training: ./scripts/test_tuning_full.sh"
echo " 2. Check results in: ml/benchmark_results/"
echo " 3. Validate Sharpe ratio and hyperparameters"