wip training

This commit is contained in:
Dobromir Popov
2025-07-17 02:51:20 +03:00
parent c3010a6737
commit 6d55061e86
4 changed files with 940 additions and 0 deletions

View File

@ -80,6 +80,9 @@ except ImportError:
# Import RL COB trader for 1B parameter model integration
from core.realtime_rl_cob_trader import RealtimeRLCOBTrader, PredictionResult
# Import overnight training coordinator
from core.overnight_training_coordinator import OvernightTrainingCoordinator
# Single unified orchestrator with full ML capabilities
class CleanTradingDashboard:
@ -220,10 +223,58 @@ class CleanTradingDashboard:
if not self.trading_executor.simulation_mode:
threading.Thread(target=self._monitor_order_execution, daemon=True).start()
# Initialize overnight training coordinator
self.overnight_training_coordinator = OvernightTrainingCoordinator(
orchestrator=self.orchestrator,
data_provider=self.data_provider,
trading_executor=self.trading_executor,
dashboard=self
)
# Start training sessions if models are showing FRESH status
threading.Thread(target=self._delayed_training_check, daemon=True).start()
logger.debug("Clean Trading Dashboard initialized with HIGH-FREQUENCY COB integration and signal generation")
logger.info("🌙 Overnight Training Coordinator ready - call start_overnight_training() to begin")
def start_overnight_training(self):
"""Start the overnight training session"""
try:
if hasattr(self, 'overnight_training_coordinator'):
self.overnight_training_coordinator.start_overnight_training()
logger.info("🌙 OVERNIGHT TRAINING SESSION STARTED")
return True
else:
logger.error("Overnight training coordinator not available")
return False
except Exception as e:
logger.error(f"Error starting overnight training: {e}")
return False
def stop_overnight_training(self):
"""Stop the overnight training session"""
try:
if hasattr(self, 'overnight_training_coordinator'):
self.overnight_training_coordinator.stop_overnight_training()
logger.info("🌅 OVERNIGHT TRAINING SESSION STOPPED")
return True
else:
logger.error("Overnight training coordinator not available")
return False
except Exception as e:
logger.error(f"Error stopping overnight training: {e}")
return False
def get_training_performance_summary(self) -> Dict[str, Any]:
"""Get training performance summary"""
try:
if hasattr(self, 'overnight_training_coordinator'):
return self.overnight_training_coordinator.get_performance_summary()
else:
return {'error': 'Training coordinator not available'}
except Exception as e:
logger.error(f"Error getting training performance summary: {e}")
return {'error': str(e)}
def _get_universal_data_from_orchestrator(self) -> Optional[UniversalDataStream]:
"""Get universal data through orchestrator as per architecture."""