debug: Add debug output to track result callback data flow
- Add debug prints in combined_result_callback to see received data - Add debug prints in update_inference_results to track GUI updates - Fix tuple order in terminal formatting to match actual (probability, result) format - This will help identify why results show in terminal but not in GUI
This commit is contained in:
parent
1b3bed1f31
commit
6245e25a33
@ -136,6 +136,10 @@ class DeploymentWorker(QThread):
|
|||||||
|
|
||||||
# Set up both GUI and terminal result callbacks
|
# Set up both GUI and terminal result callbacks
|
||||||
def combined_result_callback(result_dict):
|
def combined_result_callback(result_dict):
|
||||||
|
# Debug print to see what we're receiving
|
||||||
|
print(f"🔍 DEBUG: Received result_dict in callback: {result_dict}")
|
||||||
|
print(f"🔍 DEBUG: Stage results: {result_dict.get('stage_results', {})}")
|
||||||
|
|
||||||
# Send to GUI terminal and results display
|
# Send to GUI terminal and results display
|
||||||
terminal_output = self._format_terminal_results(result_dict)
|
terminal_output = self._format_terminal_results(result_dict)
|
||||||
self.terminal_output.emit(terminal_output)
|
self.terminal_output.emit(terminal_output)
|
||||||
@ -185,8 +189,8 @@ class DeploymentWorker(QThread):
|
|||||||
output_lines.append(f" 📊 Stage: {stage_id}")
|
output_lines.append(f" 📊 Stage: {stage_id}")
|
||||||
|
|
||||||
if isinstance(result, tuple) and len(result) == 2:
|
if isinstance(result, tuple) and len(result) == 2:
|
||||||
# Handle tuple results (result_string, probability)
|
# Handle tuple results (probability, result_string) - matching actual format
|
||||||
result_string, probability = result
|
probability, result_string = result
|
||||||
output_lines.append(f" ✅ Result: {result_string}")
|
output_lines.append(f" ✅ Result: {result_string}")
|
||||||
output_lines.append(f" 📈 Probability: {probability:.3f}")
|
output_lines.append(f" 📈 Probability: {probability:.3f}")
|
||||||
|
|
||||||
@ -770,6 +774,9 @@ Stage Configurations:
|
|||||||
import json
|
import json
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
|
# Debug: Print what we received
|
||||||
|
print(f"🔍 GUI DEBUG: update_inference_results called with: {result_dict}")
|
||||||
|
|
||||||
# Format the results for display
|
# Format the results for display
|
||||||
timestamp = datetime.fromtimestamp(result_dict.get('timestamp', 0)).strftime("%H:%M:%S.%f")[:-3]
|
timestamp = datetime.fromtimestamp(result_dict.get('timestamp', 0)).strftime("%H:%M:%S.%f")[:-3]
|
||||||
stage_results = result_dict.get('stage_results', {})
|
stage_results = result_dict.get('stage_results', {})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user