Repository navigation
feat support max_total_num_tokens in getserverinforesponse to keep align with get_server_info in HTTP server #817
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -489,6 +489,7 @@ message GetServerInfoResponse { | |
| // Server metadata | ||
| string server_type = 8; // "grpc" | ||
| google.protobuf.Timestamp start_time = 9; | ||
| int32 max_total_num_tokens = 10; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The schema now exposes Useful? React with 👍 / 👎. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This API change is not propagated to the repository's Go SDK. Useful? React with 👍 / 👎. |
||
|
|
||
| // Note: internal_states not provided in gRPC mode | ||
| // Scheduler-side metrics (memory usage, throughput) require | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -498,6 +498,7 @@ def make_serializable(obj): | |
| sglang_version=sglang.__version__, | ||
| server_type="grpc", | ||
| start_time=start_timestamp, | ||
| max_total_num_tokens=self.scheduler_info.get("max_total_num_tokens", 0), | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
If the scheduler bootstrap dict does not contain Useful? React with 👍 / 👎. |
||
| ) | ||
|
|
||
| async def GetLoads( | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The addition of
max_total_num_tokenstoGetServerInfoResponseis a good step towards aligning gRPC server information with the HTTP server. However, please ensure that the corresponding Python servicer'sGetServerInfomethod (ingrpc_servicer/smg_grpc_servicer/sglang/servicer.py) is updated to populate this new field with the correct value. Currently, gRPC clients will receive the default value (0), which might lead to incorrect information being reported.