Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename DP_RANK to SGLANG_DP_RANK #2218

Merged
merged 1 commit into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions python/sglang/srt/managers/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down
4 changes: 2 additions & 2 deletions rust/py_src/sglang_router/launch_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Loading