diff --git a/python/sglang/srt/disaggregation/prefill.py b/python/sglang/srt/disaggregation/prefill.py index 36f44bb10..a42cbe771 100644 --- a/python/sglang/srt/disaggregation/prefill.py +++ b/python/sglang/srt/disaggregation/prefill.py @@ -535,7 +535,7 @@ class SchedulerDisaggregationPrefillMixin: self.maybe_send_health_check_signal() - if self.current_scheduler_metrics_enabled: + if self.current_scheduler_metrics_enabled and batch.prefill_stats is not None: can_run_cuda_graph = getattr(result, "can_run_cuda_graph", False) self.log_prefill_stats( prefill_stats=batch.prefill_stats,