wip
This commit is contained in:
@@ -195,6 +195,9 @@ class CleanTradingDashboard:
|
||||
self.data_provider = data_provider or StandardizedDataProvider()
|
||||
self.trading_executor = trading_executor or TradingExecutor()
|
||||
|
||||
# Enable unified storage system for real-time training data
|
||||
self._enable_unified_storage_async()
|
||||
|
||||
# Initialize unified orchestrator with full ML capabilities
|
||||
if orchestrator is None:
|
||||
self.orchestrator = TradingOrchestrator(
|
||||
@@ -8338,6 +8341,40 @@ class CleanTradingDashboard:
|
||||
except Exception as e:
|
||||
logger.warning(f"Error in conservative signal cleanup: {e}")
|
||||
|
||||
def _enable_unified_storage_async(self):
|
||||
"""Enable unified storage system in background thread"""
|
||||
def enable_storage():
|
||||
try:
|
||||
import asyncio
|
||||
loop = asyncio.new_event_loop()
|
||||
asyncio.set_event_loop(loop)
|
||||
|
||||
# Enable unified storage
|
||||
success = loop.run_until_complete(
|
||||
self.data_provider.enable_unified_storage()
|
||||
)
|
||||
|
||||
if success:
|
||||
logger.info("✅ Unified storage system enabled for real-time training")
|
||||
|
||||
# Get initial statistics
|
||||
stats = self.data_provider.get_unified_storage_stats()
|
||||
if stats.get('initialized'):
|
||||
logger.info(f" Cache: {stats.get('cache', {}).get('cache_duration_seconds', 0)}s window")
|
||||
logger.info(f" Database: Connected and ready")
|
||||
logger.info(f" Ingestion: Pipeline active")
|
||||
else:
|
||||
logger.warning("⚠️ Unified storage initialization failed, using legacy data access")
|
||||
|
||||
except Exception as e:
|
||||
logger.warning(f"Could not enable unified storage: {e}")
|
||||
logger.info("Continuing with legacy data access methods")
|
||||
|
||||
# Start in background thread
|
||||
import threading
|
||||
storage_thread = threading.Thread(target=enable_storage, daemon=True)
|
||||
storage_thread.start()
|
||||
|
||||
def _initialize_enhanced_training_system(self):
|
||||
"""Initialize enhanced training system for model predictions"""
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user