ETS integration and UI
This commit is contained in:
@ -1912,6 +1912,22 @@ class CleanTradingDashboard:
|
||||
logger.warning(f"Error getting COB snapshot for {symbol}: {e}")
|
||||
return None
|
||||
|
||||
def _get_enhanced_training_stats(self) -> Dict[str, Any]:
|
||||
"""Get enhanced training statistics from the training system and orchestrator"""
|
||||
try:
|
||||
# First try to get stats from orchestrator (preferred - has integration data)
|
||||
if self.orchestrator and hasattr(self.orchestrator, 'get_enhanced_training_stats'):
|
||||
return self.orchestrator.get_enhanced_training_stats()
|
||||
|
||||
# Fallback to training system directly
|
||||
if hasattr(self, 'training_system') and self.training_system:
|
||||
return self.training_system.get_training_statistics()
|
||||
|
||||
return {}
|
||||
except Exception as e:
|
||||
logger.debug(f"Error getting enhanced training stats: {e}")
|
||||
return {}
|
||||
|
||||
def _get_training_metrics(self) -> Dict:
|
||||
"""Get training metrics from unified orchestrator - using orchestrator as SSOT"""
|
||||
try:
|
||||
@ -1945,6 +1961,9 @@ class CleanTradingDashboard:
|
||||
latest_predictions = self._get_latest_model_predictions()
|
||||
cnn_prediction = self._get_cnn_pivot_prediction()
|
||||
|
||||
# Get enhanced training statistics if available
|
||||
enhanced_training_stats = self._get_enhanced_training_stats()
|
||||
|
||||
# Helper function to safely calculate improvement percentage
|
||||
def safe_improvement_calc(initial, current, default_improvement=0.0):
|
||||
try:
|
||||
@ -2346,6 +2365,9 @@ class CleanTradingDashboard:
|
||||
'decision_model_active': decision_active
|
||||
}
|
||||
|
||||
# Add enhanced training statistics
|
||||
metrics['enhanced_training_stats'] = enhanced_training_stats
|
||||
|
||||
return metrics
|
||||
|
||||
except Exception as e:
|
||||
|
Reference in New Issue
Block a user