wip training and inference stats
This commit is contained in:
@ -1203,8 +1203,20 @@ class CleanTradingDashboard:
|
||||
# Find overlap point - where live data starts
|
||||
live_start = df_live.index[0]
|
||||
|
||||
# FIXED: Normalize timezone for comparison
|
||||
# Convert both to UTC timezone-naive for safe comparison
|
||||
if hasattr(live_start, 'tz') and live_start.tz is not None:
|
||||
live_start = live_start.tz_localize(None)
|
||||
|
||||
# Normalize historical index timezone
|
||||
if hasattr(df_historical.index, 'tz') and df_historical.index.tz is not None:
|
||||
df_historical_normalized = df_historical.copy()
|
||||
df_historical_normalized.index = df_historical_normalized.index.tz_localize(None)
|
||||
else:
|
||||
df_historical_normalized = df_historical
|
||||
|
||||
# Keep historical data up to live data start
|
||||
df_historical_clean = df_historical[df_historical.index < live_start]
|
||||
df_historical_clean = df_historical_normalized[df_historical_normalized.index < live_start]
|
||||
|
||||
# Combine: historical (older) + live (newer)
|
||||
df_main = pd.concat([df_historical_clean, df_live]).tail(180)
|
||||
|
Reference in New Issue
Block a user