runtime fix
This commit is contained in:
@@ -137,10 +137,33 @@
|
||||
"entry_state": {},
|
||||
"exit_state": {}
|
||||
}
|
||||
},
|
||||
{
|
||||
"annotation_id": "b01fe6b2-7724-495e-ab01-3f3d3aa0da5d",
|
||||
"symbol": "ETH/USDT",
|
||||
"timeframe": "1s",
|
||||
"entry": {
|
||||
"timestamp": "2025-11-22 13:22:23",
|
||||
"price": 2727.52,
|
||||
"index": 53
|
||||
},
|
||||
"exit": {
|
||||
"timestamp": "2025-11-22 13:31:18",
|
||||
"price": 2717.9,
|
||||
"index": 104
|
||||
},
|
||||
"direction": "SHORT",
|
||||
"profit_loss_pct": 0.3527013550771357,
|
||||
"notes": "",
|
||||
"created_at": "2025-11-22T15:31:43.939943",
|
||||
"market_context": {
|
||||
"entry_state": {},
|
||||
"exit_state": {}
|
||||
}
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"total_annotations": 6,
|
||||
"last_updated": "2025-11-22T15:19:15.521679"
|
||||
"total_annotations": 7,
|
||||
"last_updated": "2025-11-22T15:31:43.940190"
|
||||
}
|
||||
}
|
||||
@@ -631,24 +631,33 @@ class AnnotationDashboard:
|
||||
self.training_adapter.orchestrator = self.orchestrator
|
||||
logger.info("TradingOrchestrator initialized")
|
||||
|
||||
# Load the specific model
|
||||
# Check if the specific model is already initialized
|
||||
if model_name == 'Transformer':
|
||||
logger.info("Loading Transformer model...")
|
||||
self.orchestrator.load_transformer_model()
|
||||
self.loaded_models['Transformer'] = self.orchestrator.primary_transformer_trainer
|
||||
logger.info("Checking Transformer model...")
|
||||
if self.orchestrator.primary_transformer:
|
||||
self.loaded_models['Transformer'] = self.orchestrator.primary_transformer
|
||||
logger.info("Transformer model loaded successfully")
|
||||
else:
|
||||
logger.warning("Transformer model not initialized in orchestrator")
|
||||
return
|
||||
|
||||
elif model_name == 'CNN':
|
||||
logger.info("Loading CNN model...")
|
||||
self.orchestrator.load_cnn_model()
|
||||
logger.info("Checking CNN model...")
|
||||
if self.orchestrator.cnn_model:
|
||||
self.loaded_models['CNN'] = self.orchestrator.cnn_model
|
||||
logger.info("CNN model loaded successfully")
|
||||
else:
|
||||
logger.warning("CNN model not initialized in orchestrator")
|
||||
return
|
||||
|
||||
elif model_name == 'DQN':
|
||||
logger.info("Loading DQN model...")
|
||||
self.orchestrator.load_dqn_model()
|
||||
self.loaded_models['DQN'] = self.orchestrator.dqn_agent
|
||||
logger.info("Checking DQN model...")
|
||||
if self.orchestrator.rl_agent:
|
||||
self.loaded_models['DQN'] = self.orchestrator.rl_agent
|
||||
logger.info("DQN model loaded successfully")
|
||||
else:
|
||||
logger.warning("DQN model not initialized in orchestrator")
|
||||
return
|
||||
|
||||
else:
|
||||
logger.warning(f"Unknown model name: {model_name}")
|
||||
|
||||
Reference in New Issue
Block a user