Skip to content
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
4 changes: 3 additions & 1 deletion grpc_servicer/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ classifiers = [

[project.optional-dependencies]
vllm = ["vllm>=0.19.0", "pyzmq>=25.0.0", "msgspec>=0.18.0"]
sglang = ["sglang>=0.5.10"]
# 0.5.13 is the first release with the shmem load snapshots that replaced
# the WatchLoadUpdateReq piggyback path (removed upstream in v0.5.14).
sglang = ["sglang>=0.5.13"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Enforce the SGLang floor outside extras

This dependency floor only applies when users install smg-grpc-servicer[sglang]; the repo's source install paths still install grpc_servicer/ without that extra after SGLang is already present (for example scripts/ci_install_sglang.sh pins sglang[all]==0.5.12.post1, and scripts/installation/install-smg.sh force-reinstalls the servicer source into engine images). In those environments, dp_size>1 with total_tokens/total_requests still needs the WatchLoadUpdateReq feed that was removed, because pre-0.5.13 SGLang's data-parallel controller consumes only that request rather than shmem snapshots, so the new code silently runs with stale DP load state instead of enforcing the unsupported version.

Useful? React with 👍 / 👎.

@junliu-mde junliu-mde Jun 27, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks it's better to bump sglang version in CI?

# smg-grpc-proto>=0.4.7 is the first release that ships mlx_engine_pb2;
# without this floor, installing [mlx] against an older proto build would
# crash at import time when smg_grpc_servicer.mlx.server runs.
Expand Down
12 changes: 0 additions & 12 deletions grpc_servicer/smg_grpc_servicer/sglang/request_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
ProfileReqOutput,
TokenizedEmbeddingReqInput,
TokenizedGenerateReqInput,
WatchLoadUpdateReq,
)
from sglang.srt.observability.req_time_stats import (
APIServerReqTimeStats,
Expand Down Expand Up @@ -764,17 +763,6 @@ async def cleanup(request_id):

cleanup_tasks.append(asyncio.create_task(cleanup(rid)))

# Forward load info to DataParallelController for token-aware balancing.
# Mirrors TokenizerManager._handle_batch_output logic: when dp_size > 1,
# each scheduler piggybacks its load (num_reqs, num_tokens) on batch output.
# Without this, DPBudget stays at zero and total_tokens/total_requests
# policies degenerate to always picking rank 0.
if self.server_args.dp_size > 1 and batch_out.load is not None:
try:
await self._send_to_scheduler(WatchLoadUpdateReq(loads=[batch_out.load]))
except Exception as e:
logger.warning("Failed to forward DP load update: %s", e)

# Execute all queue.put() operations in parallel
if put_tasks:
await asyncio.gather(*put_tasks, return_exceptions=True)
Expand Down
Loading