improved data structure
This commit is contained in:
@@ -161,7 +161,7 @@ class RealTrainingAdapter:
|
||||
session = self.training_sessions[training_id]
|
||||
|
||||
try:
|
||||
logger.info(f"🎯 Executing REAL training for {model_name}")
|
||||
logger.info(f"Executing REAL training for {model_name}")
|
||||
logger.info(f" Training ID: {training_id}")
|
||||
logger.info(f" Test cases: {len(test_cases)}")
|
||||
|
||||
@@ -299,8 +299,8 @@ class RealTrainingAdapter:
|
||||
"""
|
||||
training_data = []
|
||||
|
||||
logger.info(f"📦 Preparing training data from {len(test_cases)} test cases...")
|
||||
logger.info(f" Negative sampling: ±{negative_samples_window} candles around signals")
|
||||
logger.info(f"Preparing training data from {len(test_cases)} test cases...")
|
||||
logger.info(f" Negative sampling: +/-{negative_samples_window} candles around signals")
|
||||
logger.info(f" Training repetitions: {training_repetitions}x per sample")
|
||||
|
||||
for i, test_case in enumerate(test_cases):
|
||||
@@ -316,7 +316,7 @@ class RealTrainingAdapter:
|
||||
market_state = test_case.get('market_state', {})
|
||||
|
||||
if not market_state:
|
||||
logger.info(f" 📡 Fetching market state dynamically for test case {i+1}...")
|
||||
logger.info(f" Fetching market state dynamically for test case {i+1}...")
|
||||
market_state = self._fetch_market_state_for_test_case(test_case)
|
||||
|
||||
if not market_state:
|
||||
@@ -350,7 +350,7 @@ class RealTrainingAdapter:
|
||||
)
|
||||
|
||||
training_data.extend(hold_samples)
|
||||
logger.debug(f" 📊 Added {len(hold_samples)} HOLD samples (during position)")
|
||||
logger.debug(f" Added {len(hold_samples)} HOLD samples (during position)")
|
||||
|
||||
# Create EXIT sample (where model SHOULD exit trade)
|
||||
exit_timestamp = test_case.get('annotation_metadata', {}).get('exit_timestamp')
|
||||
@@ -1023,7 +1023,7 @@ class RealTrainingAdapter:
|
||||
if not trainer:
|
||||
raise Exception("Transformer trainer not available in orchestrator")
|
||||
|
||||
logger.info(f"🎯 Using orchestrator's TradingTransformerTrainer")
|
||||
logger.info(f"Using orchestrator's TradingTransformerTrainer")
|
||||
logger.info(f" Trainer type: {type(trainer).__name__}")
|
||||
|
||||
# Use the trainer's train_step method for individual samples
|
||||
|
||||
@@ -330,7 +330,7 @@ class AnnotationDashboard:
|
||||
import threading
|
||||
refresh_thread = threading.Thread(target=refresh_recent_data, daemon=True)
|
||||
refresh_thread.start()
|
||||
logger.info("📊 One-time background data refresh scheduled")
|
||||
logger.info("One-time background data refresh scheduled")
|
||||
|
||||
def _get_pivot_markers_for_timeframe(self, symbol: str, timeframe: str, df: pd.DataFrame) -> dict:
|
||||
"""
|
||||
@@ -578,7 +578,7 @@ class AnnotationDashboard:
|
||||
limit = data.get('limit', 2500) # Default 2500 candles for training
|
||||
direction = data.get('direction', 'latest') # 'latest', 'before', or 'after'
|
||||
|
||||
logger.info(f"📊 Chart data request: {symbol} {timeframes} direction={direction} limit={limit}")
|
||||
logger.info(f"Chart data request: {symbol} {timeframes} direction={direction} limit={limit}")
|
||||
if start_time_str:
|
||||
logger.info(f" start_time: {start_time_str}")
|
||||
if end_time_str:
|
||||
|
||||
Reference in New Issue
Block a user