Files
foxhunt/test_dqn_evaluation.sh
jgrusewski 3853988af7 feat(hyperopt): Complete DQN hyperopt analysis and PSO optimizer fix
- Fixed PSO budget calculation bug in ml/src/hyperopt/optimizer.rs
  - Root cause: Division by n_particles in sequential execution
  - Now correctly calculates max_iters = remaining_trials (no division)
  - Result: 50 trials complete instead of 23 (100% vs 46%)

- Added comprehensive DQN hyperopt results analysis
  - 39/50 trials analyzed across 2 RunPod deployments
  - Best hyperparameters identified: LR 4.89e-5 (ultra-low)
  - Created DQN_HYPEROPT_RESULTS_SUMMARY.md with expert validation

- GitLab CI/CD pipeline operational (48 lines fixed)
  - Fixed YAML syntax errors (unquoted colons)
  - All 7 jobs validated and working

- Warning cleanup complete (136 → 0 warnings)
  - Removed 143 lines dead code
  - Fixed visibility, unused imports, Debug traits

- Archived Wave D reports to docs/archive/
  - 8 early stopping reports moved
  - Root directory cleaned up

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-02 21:49:07 +01:00

65 lines
1.8 KiB
Bash
Executable File

#!/bin/bash
# Test script for DQN evaluation orchestrator
set -e # Exit on error
echo "=================================================="
echo "DQN Evaluation Orchestrator - Architecture Fix Test"
echo "=================================================="
echo ""
# Check if model file exists
MODEL_PATH="/tmp/dqn_final_model.safetensors"
DATA_PATH="test_data/ES_FUT_unseen.parquet"
if [ ! -f "$MODEL_PATH" ]; then
echo "❌ ERROR: Model file not found: $MODEL_PATH"
echo ""
echo "Please train the DQN model first:"
echo " cargo run -p ml --example train_dqn --release --features cuda"
exit 1
fi
if [ ! -f "$DATA_PATH" ]; then
echo "❌ ERROR: Test data not found: $DATA_PATH"
echo ""
echo "Please ensure test data exists:"
echo " ls -lh test_data/"
exit 1
fi
echo "✅ Prerequisites check passed"
echo " Model: $MODEL_PATH"
echo " Data: $DATA_PATH"
echo ""
# Run evaluation
echo "Running DQN evaluation..."
echo "Command: cargo run -p ml --example evaluate_dqn_main_orchestrator --release --features cuda -- \\"
echo " --model-path $MODEL_PATH \\"
echo " --parquet-file $DATA_PATH \\"
echo " --warmup-bars 50"
echo ""
cargo run -p ml --example evaluate_dqn_main_orchestrator --release --features cuda -- \
--model-path "$MODEL_PATH" \
--parquet-file "$DATA_PATH" \
--warmup-bars 50
EXIT_CODE=$?
echo ""
if [ $EXIT_CODE -eq 0 ]; then
echo "✅ Evaluation completed successfully!"
echo ""
echo "Expected output:"
echo " - ✅ DQN checkpoint loaded successfully (8 tensors)"
echo " - Model architecture: 225 → [128, 64, 32] → 3"
echo " - Action distribution (BUY/SELL/HOLD percentages)"
echo " - Latency statistics (P50, P95, P99)"
echo " - Production readiness check"
else
echo "❌ Evaluation failed with exit code: $EXIT_CODE"
exit $EXIT_CODE
fi