Fix dp print message (#2138)

This commit is contained in:
Lianmin Zheng
2024-11-23 01:22:26 -08:00
committed by GitHub
parent 60769be14d
commit 751c3a037c

View File

@@ -1388,8 +1388,8 @@ def run_scheduler_process(
pipe_writer,
):
# [For Router] if env var "DP_RANK" exist, set dp_rank to the value of the env var
if dp_rank is None:
dp_rank = int(os.getenv("DP_RANK", -1))
if dp_rank is None and "DP_RANK" in os.environ:
dp_rank = int(os["DP_RANK"])
if dp_rank is None:
configure_logger(server_args, prefix=f" TP{tp_rank}")