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
zhaoyu6
sglang
Commits
d4fc1a70
"docs/source/ko/sagemaker.mdx" did not exist on "c0f99b4d2ec73090595914dde4c16da207e21d73"
Unverified
Commit
d4fc1a70
authored
Nov 28, 2024
by
Lianmin Zheng
Committed by
GitHub
Nov 28, 2024
Browse files
Crash the server correctly during error (#2231)
parent
db674e3d
Changes
46
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
13 deletions
+13
-13
test/srt/test_torch_compile.py
test/srt/test_torch_compile.py
+2
-2
test/srt/test_torch_compile_moe.py
test/srt/test_torch_compile_moe.py
+2
-2
test/srt/test_torchao.py
test/srt/test_torchao.py
+2
-2
test/srt/test_triton_attention_backend.py
test/srt/test_triton_attention_backend.py
+2
-2
test/srt/test_update_weights.py
test/srt/test_update_weights.py
+2
-2
test/srt/test_vision_openai_server.py
test/srt/test_vision_openai_server.py
+3
-3
No files found.
test/srt/test_torch_compile.py
View file @
d4fc1a70
...
@@ -4,7 +4,7 @@ from types import SimpleNamespace
...
@@ -4,7 +4,7 @@ from types import SimpleNamespace
import
requests
import
requests
from
sglang.srt.utils
import
kill_
child_
process
from
sglang.srt.utils
import
kill_process
_tree
from
sglang.test.run_eval
import
run_eval
from
sglang.test.run_eval
import
run_eval
from
sglang.test.test_utils
import
(
from
sglang.test.test_utils
import
(
DEFAULT_MODEL_NAME_FOR_TEST
,
DEFAULT_MODEL_NAME_FOR_TEST
,
...
@@ -28,7 +28,7 @@ class TestTorchCompile(unittest.TestCase):
...
@@ -28,7 +28,7 @@ class TestTorchCompile(unittest.TestCase):
@
classmethod
@
classmethod
def
tearDownClass
(
cls
):
def
tearDownClass
(
cls
):
kill_
child_
process
(
cls
.
process
.
pid
,
include_self
=
True
)
kill_process
_tree
(
cls
.
process
.
pid
)
def
test_mmlu
(
self
):
def
test_mmlu
(
self
):
args
=
SimpleNamespace
(
args
=
SimpleNamespace
(
...
...
test/srt/test_torch_compile_moe.py
View file @
d4fc1a70
...
@@ -4,7 +4,7 @@ from types import SimpleNamespace
...
@@ -4,7 +4,7 @@ from types import SimpleNamespace
import
requests
import
requests
from
sglang.srt.utils
import
kill_
child_
process
from
sglang.srt.utils
import
kill_process
_tree
from
sglang.test.run_eval
import
run_eval
from
sglang.test.run_eval
import
run_eval
from
sglang.test.test_utils
import
(
from
sglang.test.test_utils
import
(
DEFAULT_SMALL_MOE_MODEL_NAME_FOR_TEST
,
DEFAULT_SMALL_MOE_MODEL_NAME_FOR_TEST
,
...
@@ -28,7 +28,7 @@ class TestTorchCompile(unittest.TestCase):
...
@@ -28,7 +28,7 @@ class TestTorchCompile(unittest.TestCase):
@
classmethod
@
classmethod
def
tearDownClass
(
cls
):
def
tearDownClass
(
cls
):
kill_
child_
process
(
cls
.
process
.
pid
,
include_self
=
True
)
kill_process
_tree
(
cls
.
process
.
pid
)
def
test_mmlu
(
self
):
def
test_mmlu
(
self
):
args
=
SimpleNamespace
(
args
=
SimpleNamespace
(
...
...
test/srt/test_torchao.py
View file @
d4fc1a70
...
@@ -3,7 +3,7 @@ from types import SimpleNamespace
...
@@ -3,7 +3,7 @@ from types import SimpleNamespace
import
requests
import
requests
from
sglang.srt.utils
import
kill_
child_
process
from
sglang.srt.utils
import
kill_process
_tree
from
sglang.test.run_eval
import
run_eval
from
sglang.test.run_eval
import
run_eval
from
sglang.test.test_utils
import
(
from
sglang.test.test_utils
import
(
DEFAULT_MODEL_NAME_FOR_TEST
,
DEFAULT_MODEL_NAME_FOR_TEST
,
...
@@ -27,7 +27,7 @@ class TestTorchAO(unittest.TestCase):
...
@@ -27,7 +27,7 @@ class TestTorchAO(unittest.TestCase):
@
classmethod
@
classmethod
def
tearDownClass
(
cls
):
def
tearDownClass
(
cls
):
kill_
child_
process
(
cls
.
process
.
pid
,
include_self
=
True
)
kill_process
_tree
(
cls
.
process
.
pid
)
def
test_mmlu
(
self
):
def
test_mmlu
(
self
):
args
=
SimpleNamespace
(
args
=
SimpleNamespace
(
...
...
test/srt/test_triton_attention_backend.py
View file @
d4fc1a70
...
@@ -6,7 +6,7 @@ python3 -m unittest test_triton_attention_backend.TestTritonAttnBackend.test_mml
...
@@ -6,7 +6,7 @@ python3 -m unittest test_triton_attention_backend.TestTritonAttnBackend.test_mml
import
unittest
import
unittest
from
types
import
SimpleNamespace
from
types
import
SimpleNamespace
from
sglang.srt.utils
import
kill_
child_
process
from
sglang.srt.utils
import
kill_process
_tree
from
sglang.test.run_eval
import
run_eval
from
sglang.test.run_eval
import
run_eval
from
sglang.test.test_utils
import
(
from
sglang.test.test_utils
import
(
DEFAULT_MODEL_NAME_FOR_TEST
,
DEFAULT_MODEL_NAME_FOR_TEST
,
...
@@ -54,7 +54,7 @@ class TestTritonAttnBackend(unittest.TestCase):
...
@@ -54,7 +54,7 @@ class TestTritonAttnBackend(unittest.TestCase):
metrics
=
run_eval
(
args
)
metrics
=
run_eval
(
args
)
self
.
assertGreaterEqual
(
metrics
[
"score"
],
0.65
)
self
.
assertGreaterEqual
(
metrics
[
"score"
],
0.65
)
finally
:
finally
:
kill_
child_
process
(
process
.
pid
,
include_self
=
True
)
kill_process
_tree
(
process
.
pid
)
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
...
...
test/srt/test_update_weights.py
View file @
d4fc1a70
...
@@ -3,7 +3,7 @@ import unittest
...
@@ -3,7 +3,7 @@ import unittest
import
requests
import
requests
from
sglang.srt.utils
import
kill_
child_
process
from
sglang.srt.utils
import
kill_process
_tree
from
sglang.test.test_utils
import
(
from
sglang.test.test_utils
import
(
DEFAULT_SMALL_MODEL_NAME_FOR_TEST
,
DEFAULT_SMALL_MODEL_NAME_FOR_TEST
,
DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH
,
DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH
,
...
@@ -23,7 +23,7 @@ class TestUpdateWeights(unittest.TestCase):
...
@@ -23,7 +23,7 @@ class TestUpdateWeights(unittest.TestCase):
@
classmethod
@
classmethod
def
tearDownClass
(
cls
):
def
tearDownClass
(
cls
):
kill_
child_
process
(
cls
.
process
.
pid
,
include_self
=
True
)
kill_process
_tree
(
cls
.
process
.
pid
)
def
run_decode
(
self
):
def
run_decode
(
self
):
response
=
requests
.
post
(
response
=
requests
.
post
(
...
...
test/srt/test_vision_openai_server.py
View file @
d4fc1a70
...
@@ -17,7 +17,7 @@ import requests
...
@@ -17,7 +17,7 @@ import requests
from
decord
import
VideoReader
,
cpu
from
decord
import
VideoReader
,
cpu
from
PIL
import
Image
from
PIL
import
Image
from
sglang.srt.utils
import
kill_
child_
process
from
sglang.srt.utils
import
kill_process
_tree
from
sglang.test.test_utils
import
(
from
sglang.test.test_utils
import
(
DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH
,
DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH
,
DEFAULT_URL_FOR_TEST
,
DEFAULT_URL_FOR_TEST
,
...
@@ -46,7 +46,7 @@ class TestOpenAIVisionServer(unittest.TestCase):
...
@@ -46,7 +46,7 @@ class TestOpenAIVisionServer(unittest.TestCase):
@
classmethod
@
classmethod
def
tearDownClass
(
cls
):
def
tearDownClass
(
cls
):
kill_
child_
process
(
cls
.
process
.
pid
,
include_self
=
True
)
kill_process
_tree
(
cls
.
process
.
pid
)
def
test_chat_completion
(
self
):
def
test_chat_completion
(
self
):
client
=
openai
.
Client
(
api_key
=
self
.
api_key
,
base_url
=
self
.
base_url
)
client
=
openai
.
Client
(
api_key
=
self
.
api_key
,
base_url
=
self
.
base_url
)
...
@@ -387,7 +387,7 @@ class TestQWen2VLServerContextLengthIssue(unittest.TestCase):
...
@@ -387,7 +387,7 @@ class TestQWen2VLServerContextLengthIssue(unittest.TestCase):
@
classmethod
@
classmethod
def
tearDownClass
(
cls
):
def
tearDownClass
(
cls
):
kill_
child_
process
(
cls
.
process
.
pid
,
include_self
=
True
)
kill_process
_tree
(
cls
.
process
.
pid
)
def
test_chat_completion
(
self
):
def
test_chat_completion
(
self
):
client
=
openai
.
Client
(
api_key
=
self
.
api_key
,
base_url
=
self
.
base_url
)
client
=
openai
.
Client
(
api_key
=
self
.
api_key
,
base_url
=
self
.
base_url
)
...
...
Prev
1
2
3
Next
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