Unverified Commit 2a02185c authored by Lianmin Zheng's avatar Lianmin Zheng Committed by GitHub
Browse files

Rename DP_RANK to SGLANG_DP_RANK (#2218)

parent fed4c694
......@@ -1409,9 +1409,9 @@ def run_scheduler_process(
if get_bool_env_var("SGLANG_SET_CPU_AFFINITY"):
set_gpu_proc_affinity(server_args.tp_size, server_args.nnodes, gpu_id)
# [For Router] if env var "DP_RANK" exist, set dp_rank to the value of the env var
if dp_rank is None and "DP_RANK" in os.environ:
dp_rank = int(os.environ["DP_RANK"])
# [For Router] if env var "SGLANG_DP_RANK" exist, set dp_rank to the value of the env var
if dp_rank is None and "SGLANG_DP_RANK" in os.environ:
dp_rank = int(os.environ["SGLANG_DP_RANK"])
if dp_rank is None:
configure_logger(server_args, prefix=f" TP{tp_rank}")
......
......@@ -38,8 +38,8 @@ def setup_logger():
def run_server(server_args, dp_rank):
os.setpgrp() # Create new process group
# Set DP_RANK environment variable
os.environ["DP_RANK"] = str(dp_rank)
# Set SGLANG_DP_RANK environment variable
os.environ["SGLANG_DP_RANK"] = str(dp_rank)
launch_server(server_args)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment