revision, pending fixes
This commit is contained in:
@@ -1843,7 +1843,7 @@ class TradingOrchestrator:
|
||||
dashboard=None
|
||||
)
|
||||
|
||||
logger.info("✅ Enhanced training system initialized successfully")
|
||||
logger.info("Enhanced training system initialized successfully")
|
||||
|
||||
# Auto-start training by default
|
||||
logger.info("🚀 Auto-starting enhanced real-time training...")
|
||||
@@ -2204,21 +2204,12 @@ class TradingOrchestrator:
|
||||
return float(data_stream.current_price)
|
||||
except Exception as e:
|
||||
logger.debug(f"Could not get price from universal adapter: {e}")
|
||||
# Fallback to default prices
|
||||
default_prices = {
|
||||
'ETH/USDT': 2500.0,
|
||||
'BTC/USDT': 108000.0
|
||||
}
|
||||
return default_prices.get(symbol, 1000.0)
|
||||
# TODO(Guideline: no synthetic fallback) Provide a real-time or cached market price here instead of hardcoding.
|
||||
raise RuntimeError("Current price unavailable; per guidelines do not substitute synthetic values.")
|
||||
except Exception as e:
|
||||
logger.error(f"Error getting current price for {symbol}: {e}")
|
||||
# Return default price based on symbol
|
||||
if 'ETH' in symbol:
|
||||
return 2500.0
|
||||
elif 'BTC' in symbol:
|
||||
return 108000.0
|
||||
else:
|
||||
return 1000.0
|
||||
raise RuntimeError("Current price unavailable; per guidelines do not substitute synthetic values.")
|
||||
|
||||
# SINGLE-USE FUNCTION - Called only once in codebase
|
||||
def _generate_fallback_prediction(self, symbol: str) -> Dict[str, Any]:
|
||||
@@ -2443,7 +2434,7 @@ class TradingOrchestrator:
|
||||
if df is not None and not df.empty:
|
||||
loaded_data[f"{symbol}_{timeframe}"] = df
|
||||
total_candles += len(df)
|
||||
logger.info(f"✅ Loaded {len(df)} {timeframe} candles for {symbol}")
|
||||
logger.info(f"Loaded {len(df)} {timeframe} candles for {symbol}")
|
||||
|
||||
# Store in data provider's historical cache for quick access
|
||||
cache_key = f"{symbol}_{timeframe}_300"
|
||||
@@ -2500,7 +2491,7 @@ class TradingOrchestrator:
|
||||
logger.info("Initializing Decision Fusion with multi-symbol features...")
|
||||
self._initialize_decision_with_provider_data(symbol_features)
|
||||
|
||||
logger.info("✅ All models initialized with data provider's normalized historical data")
|
||||
logger.info("All models initialized with data provider's normalized historical data")
|
||||
|
||||
except Exception as e:
|
||||
logger.error(f"Error initializing models with historical data: {e}")
|
||||
@@ -2720,7 +2711,7 @@ class TradingOrchestrator:
|
||||
logger.error(f"Error in chained inference step {step}: {e}")
|
||||
break
|
||||
|
||||
logger.info(f"✅ Chained inference completed: {len(predictions)} predictions generated")
|
||||
logger.info(f"Chained inference completed: {len(predictions)} predictions generated")
|
||||
return predictions
|
||||
|
||||
except Exception as e:
|
||||
|
Reference in New Issue
Block a user