cleanup: Remove debug output after successful fix verification

- Remove all debug print statements from deployment dialog
- Remove debug output from workflow orchestrator and inference pipeline
- Remove test signal emissions and unused imports
- Code is now clean and production-ready
- Results are successfully flowing from inference to GUI display
This commit is contained in:
Masonmason 2025-07-23 22:50:34 +08:00
parent 18ec31738a
commit 0e8d75c85c
3 changed files with 0 additions and 32 deletions

View File

@ -485,10 +485,7 @@ class InferencePipeline:
# Call result callback # Call result callback
if self.result_callback: if self.result_callback:
print(f"🔍 PIPELINE DEBUG: Calling result_callback with: {current_data}")
self.result_callback(current_data) self.result_callback(current_data)
else:
print(f"🔍 PIPELINE DEBUG: No result_callback set!")
except queue.Full: except queue.Full:
# Drop oldest and add new # Drop oldest and add new

View File

@ -61,7 +61,6 @@ class WorkflowOrchestrator:
# Set the result callback on the pipeline - always set this regardless of result_handler # Set the result callback on the pipeline - always set this regardless of result_handler
# The handle_result method will decide what to do with the results # The handle_result method will decide what to do with the results
self.pipeline.set_result_callback(self.handle_result) self.pipeline.set_result_callback(self.handle_result)
print(f"🔍 ORCHESTRATOR DEBUG: Set result callback on pipeline")
# Start the pipeline # Start the pipeline
self.pipeline.initialize() self.pipeline.initialize()
@ -160,9 +159,6 @@ class WorkflowOrchestrator:
""" """
Callback function to handle results from the pipeline. Callback function to handle results from the pipeline.
""" """
print(f"🔍 ORCHESTRATOR DEBUG: handle_result called with: {result_data}")
print(f"🔍 ORCHESTRATOR DEBUG: result_callback is: {self.result_callback}")
try: try:
# Convert PipelineData to a dictionary for serialization # Convert PipelineData to a dictionary for serialization
result_dict = { result_dict = {
@ -182,10 +178,7 @@ class WorkflowOrchestrator:
# Always call the result callback if set (for GUI updates) # Always call the result callback if set (for GUI updates)
if self.result_callback: if self.result_callback:
print(f"🔍 ORCHESTRATOR DEBUG: Calling result_callback with: {result_dict}")
self.result_callback(result_dict) self.result_callback(result_dict)
else:
print(f"🔍 ORCHESTRATOR DEBUG: No result_callback set in orchestrator!")
except Exception as e: except Exception as e:
print(f"❌ Error handling result: {e}") print(f"❌ Error handling result: {e}")

View File

@ -23,7 +23,6 @@ import sys
import json import json
import threading import threading
import traceback import traceback
import time
from typing import Dict, Any, List, Optional from typing import Dict, Any, List, Optional
from PyQt5.QtWidgets import ( from PyQt5.QtWidgets import (
QDialog, QVBoxLayout, QHBoxLayout, QLabel, QTextEdit, QPushButton, QDialog, QVBoxLayout, QHBoxLayout, QLabel, QTextEdit, QPushButton,
@ -137,10 +136,6 @@ 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)
@ -149,18 +144,6 @@ class DeploymentWorker(QThread):
self.orchestrator.set_result_callback(combined_result_callback) self.orchestrator.set_result_callback(combined_result_callback)
# Test emit a sample result to verify GUI connection
test_result = {
'pipeline_id': 'test_pipeline',
'timestamp': time.time(),
'stage_results': {
'test_stage': (-0.5, 'Test Result')
},
'metadata': {}
}
print("🔍 DEBUG: Emitting test result to verify GUI connection")
self.result_updated.emit(test_result)
self.terminal_output.emit("🧪 TEST: This is a test terminal message")
self.orchestrator.start() self.orchestrator.start()
@ -675,8 +658,6 @@ Stage Configurations:
self.deployment_worker.result_updated.connect(self.update_inference_results) self.deployment_worker.result_updated.connect(self.update_inference_results)
self.deployment_worker.terminal_output.connect(self.update_terminal_output) self.deployment_worker.terminal_output.connect(self.update_terminal_output)
# Test the signal connections
print("🔍 DEBUG: Signal connections established")
self.deployment_worker.start() self.deployment_worker.start()
@ -792,9 +773,6 @@ 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', {})