diff --git a/python/sglang/srt/utils/common.py b/python/sglang/srt/utils/common.py index f181dafa5..0ac752b93 100644 --- a/python/sglang/srt/utils/common.py +++ b/python/sglang/srt/utils/common.py @@ -2714,7 +2714,10 @@ class BumpAllocator: def log_info_on_rank0(logger, msg): from sglang.srt.distributed import get_tensor_model_parallel_rank - if torch.distributed.is_initialized() and get_tensor_model_parallel_rank() == 0: + try: + if torch.distributed.is_initialized() and get_tensor_model_parallel_rank() == 0: + logger.info(msg) + except: logger.info(msg)