Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
19f33b32
"docs/vscode:/vscode.git/clone" did not exist on "a937e1b594da34b35ea9a090dc3ada57df12df49"
Unverified
Commit
19f33b32
authored
Nov 26, 2024
by
Yudi Xue
Committed by
GitHub
Nov 26, 2024
Browse files
add sglang version to get_server_info (#2206)
parent
30ce5b59
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
python/sglang/srt/server.py
python/sglang/srt/server.py
+2
-0
test/srt/test_srt_endpoint.py
test/srt/test_srt_endpoint.py
+3
-0
No files found.
python/sglang/srt/server.py
View file @
19f33b32
...
@@ -86,6 +86,7 @@ from sglang.srt.utils import (
...
@@ -86,6 +86,7 @@ from sglang.srt.utils import (
set_ulimit
,
set_ulimit
,
)
)
from
sglang.utils
import
get_exception_traceback
from
sglang.utils
import
get_exception_traceback
from
sglang.version
import
__version__
logger
=
logging
.
getLogger
(
__name__
)
logger
=
logging
.
getLogger
(
__name__
)
...
@@ -527,6 +528,7 @@ async def _get_server_info():
...
@@ -527,6 +528,7 @@ async def _get_server_info():
**
dataclasses
.
asdict
(
tokenizer_manager
.
server_args
),
# server args
**
dataclasses
.
asdict
(
tokenizer_manager
.
server_args
),
# server args
"memory_pool_size"
:
await
tokenizer_manager
.
get_memory_pool_size
(),
# memory pool size
"memory_pool_size"
:
await
tokenizer_manager
.
get_memory_pool_size
(),
# memory pool size
"max_total_num_tokens"
:
_max_total_num_tokens
,
# max total num tokens
"max_total_num_tokens"
:
_max_total_num_tokens
,
# max total num tokens
"version"
:
__version__
,
}
}
...
...
test/srt/test_srt_endpoint.py
View file @
19f33b32
...
@@ -226,6 +226,9 @@ class TestSRTEndpoint(unittest.TestCase):
...
@@ -226,6 +226,9 @@ class TestSRTEndpoint(unittest.TestCase):
attention_backend
=
response_json
[
"attention_backend"
]
attention_backend
=
response_json
[
"attention_backend"
]
self
.
assertIsInstance
(
attention_backend
,
str
)
self
.
assertIsInstance
(
attention_backend
,
str
)
version
=
response_json
[
"version"
]
self
.
assertIsInstance
(
version
,
str
)
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
unittest
.
main
()
unittest
.
main
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment