✅ Validation Results: - PPO training: 24.2s (1 epoch, 950 samples, dim=225) - Feature extraction: 105μs/bar (9.5x faster than target) - Model checkpoint: 293KB (147KB actor + 146KB critic) - GPU memory: 145MB used (96.4% headroom) - Zero dimension mismatches 📊 Success Criteria (5/5): ✅ Feature dimension = 225 (Wave C 201 + Wave D 24) ✅ Model state_dim = 225 ✅ Training completed without errors ✅ Checkpoint saved successfully ✅ No dimension mismatch errors 📁 Training Data Ready: - ES.FUT: 2.9MB, 180 days - NQ.FUT: 4.4MB, 180 days - 6E.FUT: 2.8MB, 180 days - ZN.FUT: 65KB, 90 days (clean) 🚀 Next: Full production model retraining (4 models, ~10min GPU time) 🤖 Generated with Claude Code (https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
53 lines
1.5 KiB
Bash
Executable File
53 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
# Test Environment Setup Script
|
|
# Starts isolated Docker containers for integration testing
|
|
|
|
set -e
|
|
|
|
echo "🚀 Starting ML Training Service Test Environment..."
|
|
|
|
# Navigate to docker directory
|
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
cd "$SCRIPT_DIR"
|
|
|
|
# Stop any existing containers
|
|
echo "📦 Cleaning up existing test containers..."
|
|
docker-compose -f docker-compose.test.yml down -v 2>/dev/null || true
|
|
|
|
# Start fresh containers
|
|
echo "🐳 Starting PostgreSQL and Redis test containers..."
|
|
docker-compose -f docker-compose.test.yml up -d
|
|
|
|
# Wait for PostgreSQL to be ready
|
|
echo "⏳ Waiting for PostgreSQL to be ready..."
|
|
until docker exec foxhunt-postgres-test pg_isready -U foxhunt_test > /dev/null 2>&1; do
|
|
echo " Waiting for PostgreSQL..."
|
|
sleep 1
|
|
done
|
|
echo "✅ PostgreSQL is ready"
|
|
|
|
# Wait for Redis to be ready
|
|
echo "⏳ Waiting for Redis to be ready..."
|
|
until docker exec foxhunt-redis-test redis-cli ping > /dev/null 2>&1; do
|
|
echo " Waiting for Redis..."
|
|
sleep 1
|
|
done
|
|
echo "✅ Redis is ready"
|
|
|
|
# Export test database URL
|
|
export DATABASE_URL="postgresql://foxhunt_test:foxhunt_test_password@localhost:5433/foxhunt_test"
|
|
export REDIS_URL="redis://localhost:6380"
|
|
|
|
echo ""
|
|
echo "✅ Test environment ready!"
|
|
echo ""
|
|
echo "Environment variables:"
|
|
echo " DATABASE_URL=$DATABASE_URL"
|
|
echo " REDIS_URL=$REDIS_URL"
|
|
echo ""
|
|
echo "Run integration tests with:"
|
|
echo " cargo test --test integration --features minimal -- --test-threads=1"
|
|
echo ""
|
|
echo "Stop test environment with:"
|
|
echo " ./test_teardown.sh"
|