remove emojis from console

This commit is contained in:
Dobromir Popov
2025-10-25 16:35:08 +03:00
parent 5aa4925cff
commit b8f54e61fa
75 changed files with 828 additions and 828 deletions

View File

@@ -196,14 +196,14 @@ class AnnotationDashboard:
for attempt in range(max_retries):
try:
if attempt > 0:
logger.info(f"🔄 Retry attempt {attempt + 1}/{max_retries} for model loading...")
logger.info(f" Retry attempt {attempt + 1}/{max_retries} for model loading...")
time.sleep(retry_delay)
else:
logger.info("🔄 Starting async model loading...")
logger.info(" Starting async model loading...")
# Check if TradingOrchestrator is available
if not TradingOrchestrator:
logger.error(" TradingOrchestrator class not available")
logger.error(" TradingOrchestrator class not available")
self.models_loading = False
self.available_models = []
return
@@ -214,48 +214,48 @@ class AnnotationDashboard:
data_provider=self.data_provider,
enhanced_rl_training=True
)
logger.info(" Orchestrator created")
logger.info(" Orchestrator created")
# Initialize ML models
logger.info(" Initializing ML models...")
self.orchestrator._initialize_ml_models()
logger.info(" ML models initialized")
logger.info(" ML models initialized")
# Update training adapter with orchestrator
self.training_adapter.orchestrator = self.orchestrator
logger.info(" Training adapter updated")
logger.info(" Training adapter updated")
# Get available models from orchestrator
available = []
if hasattr(self.orchestrator, 'rl_agent') and self.orchestrator.rl_agent:
available.append('DQN')
logger.info(" DQN model available")
logger.info(" DQN model available")
if hasattr(self.orchestrator, 'cnn_model') and self.orchestrator.cnn_model:
available.append('CNN')
logger.info(" CNN model available")
logger.info(" CNN model available")
if hasattr(self.orchestrator, 'transformer_model') and self.orchestrator.transformer_model:
available.append('Transformer')
logger.info(" Transformer model available")
logger.info(" Transformer model available")
self.available_models = available
if available:
logger.info(f" Models loaded successfully: {', '.join(available)}")
logger.info(f" Models loaded successfully: {', '.join(available)}")
else:
logger.warning("⚠️ No models were initialized (this might be normal if models aren't configured)")
logger.warning(" No models were initialized (this might be normal if models aren't configured)")
self.models_loading = False
logger.info(" Async model loading complete")
logger.info(" Async model loading complete")
return # Success - exit retry loop
except Exception as e:
logger.error(f" Error loading models (attempt {attempt + 1}/{max_retries}): {e}")
logger.error(f" Error loading models (attempt {attempt + 1}/{max_retries}): {e}")
import traceback
logger.error(f"Traceback:\n{traceback.format_exc()}")
if attempt == max_retries - 1:
# Final attempt failed
logger.error(f" Model loading failed after {max_retries} attempts")
logger.error(f" Model loading failed after {max_retries} attempts")
self.models_loading = False
self.available_models = []
else:
@@ -264,7 +264,7 @@ class AnnotationDashboard:
# Start loading in background thread
thread = threading.Thread(target=load_models, daemon=True, name="ModelLoader")
thread.start()
logger.info(f"🚀 Model loading started in background thread (ID: {thread.ident}, Name: {thread.name})")
logger.info(f" Model loading started in background thread (ID: {thread.ident}, Name: {thread.name})")
logger.info(" UI remains responsive while models load...")
logger.info(" Will retry up to 3 times if loading fails")
@@ -284,7 +284,7 @@ class AnnotationDashboard:
)
if success:
logger.info(" ANNOTATE: Unified storage enabled for real-time data")
logger.info(" ANNOTATE: Unified storage enabled for real-time data")
# Get statistics
stats = self.data_provider.get_unified_storage_stats()
@@ -293,7 +293,7 @@ class AnnotationDashboard:
logger.info(" Historical data access: <100ms")
logger.info(" Annotation data: Available at any timestamp")
else:
logger.warning("⚠️ ANNOTATE: Unified storage not available, using cached data only")
logger.warning(" ANNOTATE: Unified storage not available, using cached data only")
except Exception as e:
logger.warning(f"ANNOTATE: Could not enable unified storage: {e}")
@@ -312,7 +312,7 @@ class AnnotationDashboard:
# Wait for app to fully start
time.sleep(5)
logger.info("🔄 Starting one-time background data refresh (fetching only recent missing data)")
logger.info(" Starting one-time background data refresh (fetching only recent missing data)")
# Disable startup mode to fetch fresh data
self.data_loader.disable_startup_mode()
@@ -321,7 +321,7 @@ class AnnotationDashboard:
logger.info("Using on-demand refresh for recent data")
self.data_provider.refresh_data_on_demand()
logger.info(" One-time background data refresh completed")
logger.info(" One-time background data refresh completed")
except Exception as e:
logger.error(f"Error in background data refresh: {e}")
@@ -488,9 +488,9 @@ class AnnotationDashboard:
<h1 class="text-center">📝 ANNOTATE - Manual Trade Annotation UI</h1>
<div class="alert alert-info">
<h4>System Status</h4>
<p> Annotation Manager: Active</p>
<p>⚠️ Data Provider: {'Available' if self.data_provider else 'Not Available (Standalone Mode)'}</p>
<p>⚠️ Trading Orchestrator: {'Available' if self.orchestrator else 'Not Available (Standalone Mode)'}</p>
<p> Annotation Manager: Active</p>
<p> Data Provider: {'Available' if self.data_provider else 'Not Available (Standalone Mode)'}</p>
<p> Trading Orchestrator: {'Available' if self.orchestrator else 'Not Available (Standalone Mode)'}</p>
</div>
<div class="row">
<div class="col-md-6">
@@ -537,7 +537,7 @@ class AnnotationDashboard:
'error': {'code': 'INVALID_REQUEST', 'message': 'Missing timeframe or timestamps'}
})
logger.info(f"🔄 Recalculating pivots for {symbol} {timeframe} with {len(timestamps)} candles")
logger.info(f" Recalculating pivots for {symbol} {timeframe} with {len(timestamps)} candles")
# Convert to DataFrame
df = pd.DataFrame({
@@ -552,7 +552,7 @@ class AnnotationDashboard:
# Recalculate pivot markers
pivot_markers = self._get_pivot_markers_for_timeframe(symbol, timeframe, df)
logger.info(f" Recalculated {len(pivot_markers)} pivot candles")
logger.info(f" Recalculated {len(pivot_markers)} pivot candles")
return jsonify({
'success': True,
@@ -614,7 +614,7 @@ class AnnotationDashboard:
)
if df is not None and not df.empty:
logger.info(f" {timeframe}: {len(df)} candles ({df.index[0]} to {df.index[-1]})")
logger.info(f" {timeframe}: {len(df)} candles ({df.index[0]} to {df.index[-1]})")
# Get pivot points for this timeframe
pivot_markers = self._get_pivot_markers_for_timeframe(symbol, timeframe, df)
@@ -630,7 +630,7 @@ class AnnotationDashboard:
'pivot_markers': pivot_markers # Optional: only present if pivots exist
}
else:
logger.warning(f" {timeframe}: No data returned")
logger.warning(f" {timeframe}: No data returned")
# Get pivot bounds for the symbol
pivot_bounds = None