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

View File

@@ -1215,10 +1215,10 @@ class ChartManager {
// Merge with existing data
this.mergeChartData(timeframe, newData, direction);
console.log(` Loaded ${newData.timestamps.length} new candles for ${timeframe}`);
console.log(` Loaded ${newData.timestamps.length} new candles for ${timeframe}`);
window.showSuccess(`Loaded ${newData.timestamps.length} more candles`);
} else {
console.warn(` No more data available for ${timeframe} ${direction}`);
console.warn(` No more data available for ${timeframe} ${direction}`);
console.warn('Full result:', result);
window.showWarning('No more historical data available');
}
@@ -1312,7 +1312,7 @@ class ChartManager {
*/
async recalculatePivots(timeframe, data) {
try {
console.log(`🔄 Recalculating pivots for ${timeframe} with ${data.timestamps.length} candles...`);
console.log(` Recalculating pivots for ${timeframe} with ${data.timestamps.length} candles...`);
const response = await fetch('/api/recalculate-pivots', {
method: 'POST',
@@ -1338,7 +1338,7 @@ class ChartManager {
const chart = this.charts[timeframe];
if (chart && chart.data) {
chart.data.pivot_markers = result.pivot_markers;
console.log(` Pivots recalculated: ${Object.keys(result.pivot_markers).length} pivot candles`);
console.log(` Pivots recalculated: ${Object.keys(result.pivot_markers).length} pivot candles`);
// Redraw the chart with updated pivots
this.redrawChartWithPivots(timeframe, chart.data);

View File

@@ -113,7 +113,7 @@
if (data.loading) {
// Models still loading - show loading message and poll
modelSelect.innerHTML = '<option value="">🔄 Loading models...</option>';
modelSelect.innerHTML = '<option value=""> Loading models...</option>';
// Start polling if not already polling
if (!modelLoadingPollInterval) {
@@ -132,7 +132,7 @@
if (data.success && data.models.length > 0) {
// Show success notification
if (window.showSuccess) {
window.showSuccess(` ${data.models.length} models loaded and ready for training`);
window.showSuccess(` ${data.models.length} models loaded and ready for training`);
}
data.models.forEach(model => {
@@ -142,7 +142,7 @@
modelSelect.appendChild(option);
});
console.log(` Models loaded: ${data.models.join(', ')}`);
console.log(` Models loaded: ${data.models.join(', ')}`);
} else {
const option = document.createElement('option');
option.value = '';
@@ -157,12 +157,12 @@
// Don't stop polling on network errors - keep trying
if (!modelLoadingPollInterval) {
modelSelect.innerHTML = '<option value="">⚠️ Connection error, retrying...</option>';
modelSelect.innerHTML = '<option value=""> Connection error, retrying...</option>';
// Start polling to retry
modelLoadingPollInterval = setInterval(loadAvailableModels, 3000); // Poll every 3 seconds
} else {
// Already polling, just update the message
modelSelect.innerHTML = '<option value="">🔄 Retrying...</option>';
modelSelect.innerHTML = '<option value=""> Retrying...</option>';
}
});
}