From 2dec66edade295fd7c263d6ae5e24f1f64ce2b94 Mon Sep 17 00:00:00 2001 From: Masonmason Date: Wed, 23 Jul 2025 22:43:06 +0800 Subject: [PATCH] debug: Add callback chain debugging to InferencePipeline and WorkflowOrchestrator - Add debug output in InferencePipeline result callback to see if it's called - Add debug output in WorkflowOrchestrator handle_result to trace callback flow - This will help identify exactly where the callback chain is breaking - Previous test showed GUI can receive signals but callbacks aren't triggered --- cluster4npu_ui/core/functions/InferencePipeline.py | 3 +++ cluster4npu_ui/core/functions/workflow_orchestrator.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/cluster4npu_ui/core/functions/InferencePipeline.py b/cluster4npu_ui/core/functions/InferencePipeline.py index 760f672..f73618f 100644 --- a/cluster4npu_ui/core/functions/InferencePipeline.py +++ b/cluster4npu_ui/core/functions/InferencePipeline.py @@ -485,7 +485,10 @@ class InferencePipeline: # Call result callback if self.result_callback: + print(f"🔍 PIPELINE DEBUG: Calling result_callback with: {current_data}") self.result_callback(current_data) + else: + print(f"🔍 PIPELINE DEBUG: No result_callback set!") except queue.Full: # Drop oldest and add new diff --git a/cluster4npu_ui/core/functions/workflow_orchestrator.py b/cluster4npu_ui/core/functions/workflow_orchestrator.py index ef8821c..3175fc3 100644 --- a/cluster4npu_ui/core/functions/workflow_orchestrator.py +++ b/cluster4npu_ui/core/functions/workflow_orchestrator.py @@ -159,6 +159,9 @@ class WorkflowOrchestrator: """ 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}") + if self.result_handler: try: # Convert PipelineData to a dictionary for serialization