cleanup
This commit is contained in:
52
test_orchestrator_fix.py
Normal file
52
test_orchestrator_fix.py
Normal file
@ -0,0 +1,52 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Test script to verify orchestrator fix
|
||||
"""
|
||||
|
||||
import logging
|
||||
import os
|
||||
|
||||
# Fix OpenMP library conflicts
|
||||
os.environ['KMP_DUPLICATE_LIB_OK'] = 'TRUE'
|
||||
os.environ['OMP_NUM_THREADS'] = '4'
|
||||
|
||||
# Fix matplotlib backend
|
||||
import matplotlib
|
||||
matplotlib.use('Agg')
|
||||
|
||||
# Set up logging
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
def test_orchestrator():
|
||||
"""Test orchestrator initialization"""
|
||||
try:
|
||||
logger.info("Testing orchestrator initialization...")
|
||||
|
||||
# Import required modules
|
||||
from core.standardized_data_provider import StandardizedDataProvider
|
||||
from core.orchestrator import TradingOrchestrator
|
||||
|
||||
logger.info("Imports successful")
|
||||
|
||||
# Create data provider
|
||||
data_provider = StandardizedDataProvider()
|
||||
logger.info("StandardizedDataProvider created")
|
||||
|
||||
# Create orchestrator
|
||||
orchestrator = TradingOrchestrator(data_provider, enhanced_rl_training=True)
|
||||
logger.info("TradingOrchestrator created successfully!")
|
||||
|
||||
# Test basic functionality
|
||||
status = orchestrator.get_queue_status()
|
||||
logger.info(f"Queue status: {status}")
|
||||
|
||||
logger.info("✅ Orchestrator test completed successfully!")
|
||||
|
||||
except Exception as e:
|
||||
logger.error(f"❌ Orchestrator test failed: {e}")
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_orchestrator()
|
Reference in New Issue
Block a user