predictions display
This commit is contained in:
@@ -2525,7 +2525,17 @@ class AnnotationDashboard:
|
||||
if transformer_preds:
|
||||
# Convert any remaining tensors to Python types before JSON serialization
|
||||
transformer_pred = transformer_preds[-1].copy()
|
||||
|
||||
# CRITICAL: Log prediction structure to debug missing predicted_candle
|
||||
logger.debug(f"Transformer prediction keys: {list(transformer_pred.keys())}")
|
||||
if 'predicted_candle' in transformer_pred:
|
||||
logger.debug(f"predicted_candle timeframes: {list(transformer_pred['predicted_candle'].keys()) if isinstance(transformer_pred['predicted_candle'], dict) else 'not a dict'}")
|
||||
|
||||
predictions['transformer'] = self._serialize_prediction(transformer_pred)
|
||||
|
||||
# Verify predicted_candle is preserved after serialization
|
||||
if 'predicted_candle' not in predictions['transformer'] and 'predicted_candle' in transformer_pred:
|
||||
logger.warning("predicted_candle was lost during serialization!")
|
||||
|
||||
if predictions:
|
||||
response['prediction'] = predictions
|
||||
|
||||
Reference in New Issue
Block a user