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
86fc0d79
Unverified
Commit
86fc0d79
authored
Oct 27, 2024
by
Lianmin Zheng
Committed by
GitHub
Oct 27, 2024
Browse files
Add a watch dog thread (#1816)
parent
1be853ee
Changes
34
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
14 additions
and
14 deletions
+14
-14
test/srt/test_mla.py
test/srt/test_mla.py
+1
-1
test/srt/test_mla_fp8.py
test/srt/test_mla_fp8.py
+1
-1
test/srt/test_moe_eval_accuracy_large.py
test/srt/test_moe_eval_accuracy_large.py
+1
-1
test/srt/test_nightly_gsm8k_eval.py
test/srt/test_nightly_gsm8k_eval.py
+1
-1
test/srt/test_openai_server.py
test/srt/test_openai_server.py
+1
-1
test/srt/test_pytorch_sampling_backend.py
test/srt/test_pytorch_sampling_backend.py
+1
-1
test/srt/test_retract_decode.py
test/srt/test_retract_decode.py
+1
-1
test/srt/test_skip_tokenizer_init.py
test/srt/test_skip_tokenizer_init.py
+1
-1
test/srt/test_srt_endpoint.py
test/srt/test_srt_endpoint.py
+1
-1
test/srt/test_torch_compile.py
test/srt/test_torch_compile.py
+1
-1
test/srt/test_torchao.py
test/srt/test_torchao.py
+1
-1
test/srt/test_triton_attn_backend.py
test/srt/test_triton_attn_backend.py
+1
-1
test/srt/test_update_weights.py
test/srt/test_update_weights.py
+1
-1
test/srt/test_vision_openai_server.py
test/srt/test_vision_openai_server.py
+1
-1
No files found.
test/srt/test_mla.py
View file @
86fc0d79
...
@@ -25,7 +25,7 @@ class TestMLA(unittest.TestCase):
...
@@ -25,7 +25,7 @@ class TestMLA(unittest.TestCase):
@
classmethod
@
classmethod
def
tearDownClass
(
cls
):
def
tearDownClass
(
cls
):
kill_child_process
(
cls
.
process
.
pid
)
kill_child_process
(
cls
.
process
.
pid
,
include_self
=
True
)
def
test_mmlu
(
self
):
def
test_mmlu
(
self
):
args
=
SimpleNamespace
(
args
=
SimpleNamespace
(
...
...
test/srt/test_mla_fp8.py
View file @
86fc0d79
...
@@ -31,7 +31,7 @@ class TestMLA(unittest.TestCase):
...
@@ -31,7 +31,7 @@ class TestMLA(unittest.TestCase):
@
classmethod
@
classmethod
def
tearDownClass
(
cls
):
def
tearDownClass
(
cls
):
kill_child_process
(
cls
.
process
.
pid
)
kill_child_process
(
cls
.
process
.
pid
,
include_self
=
True
)
def
test_mgsm_en
(
self
):
def
test_mgsm_en
(
self
):
args
=
SimpleNamespace
(
args
=
SimpleNamespace
(
...
...
test/srt/test_moe_eval_accuracy_large.py
View file @
86fc0d79
...
@@ -35,7 +35,7 @@ class TestMoEEvalAccuracyLarge(unittest.TestCase):
...
@@ -35,7 +35,7 @@ class TestMoEEvalAccuracyLarge(unittest.TestCase):
@
classmethod
@
classmethod
def
tearDownClass
(
cls
):
def
tearDownClass
(
cls
):
kill_child_process
(
cls
.
process
.
pid
)
kill_child_process
(
cls
.
process
.
pid
,
include_self
=
True
)
def
test_mmlu
(
self
):
def
test_mmlu
(
self
):
args
=
SimpleNamespace
(
args
=
SimpleNamespace
(
...
...
test/srt/test_nightly_gsm8k_eval.py
View file @
86fc0d79
...
@@ -36,7 +36,7 @@ class TestEvalAccuracyLarge(unittest.TestCase):
...
@@ -36,7 +36,7 @@ class TestEvalAccuracyLarge(unittest.TestCase):
def
tearDown
(
self
):
def
tearDown
(
self
):
if
self
.
process
:
if
self
.
process
:
kill_child_process
(
self
.
process
.
pid
)
kill_child_process
(
self
.
process
.
pid
,
include_self
=
True
)
def
launch_server
(
self
,
model
,
is_fp8
,
is_tp2
):
def
launch_server
(
self
,
model
,
is_fp8
,
is_tp2
):
other_args
=
[
"--log-level-http"
,
"warning"
,
"--trust-remote-code"
]
other_args
=
[
"--log-level-http"
,
"warning"
,
"--trust-remote-code"
]
...
...
test/srt/test_openai_server.py
View file @
86fc0d79
...
@@ -31,7 +31,7 @@ class TestOpenAIServer(unittest.TestCase):
...
@@ -31,7 +31,7 @@ class TestOpenAIServer(unittest.TestCase):
@
classmethod
@
classmethod
def
tearDownClass
(
cls
):
def
tearDownClass
(
cls
):
kill_child_process
(
cls
.
process
.
pid
)
kill_child_process
(
cls
.
process
.
pid
,
include_self
=
True
)
def
run_completion
(
def
run_completion
(
self
,
echo
,
logprobs
,
use_list_input
,
parallel_sample_num
,
token_input
self
,
echo
,
logprobs
,
use_list_input
,
parallel_sample_num
,
token_input
...
...
test/srt/test_pytorch_sampling_backend.py
View file @
86fc0d79
...
@@ -27,7 +27,7 @@ class TestPyTorchSamplingBackend(unittest.TestCase):
...
@@ -27,7 +27,7 @@ class TestPyTorchSamplingBackend(unittest.TestCase):
@
classmethod
@
classmethod
def
tearDownClass
(
cls
):
def
tearDownClass
(
cls
):
kill_child_process
(
cls
.
process
.
pid
)
kill_child_process
(
cls
.
process
.
pid
,
include_self
=
True
)
def
test_mmlu
(
self
):
def
test_mmlu
(
self
):
args
=
SimpleNamespace
(
args
=
SimpleNamespace
(
...
...
test/srt/test_retract_decode.py
View file @
86fc0d79
...
@@ -22,7 +22,7 @@ class TestRetractDecode(unittest.TestCase):
...
@@ -22,7 +22,7 @@ class TestRetractDecode(unittest.TestCase):
@
classmethod
@
classmethod
def
tearDownClass
(
cls
):
def
tearDownClass
(
cls
):
kill_child_process
(
cls
.
process
.
pid
)
kill_child_process
(
cls
.
process
.
pid
,
include_self
=
True
)
def
test_mmlu
(
self
):
def
test_mmlu
(
self
):
args
=
SimpleNamespace
(
args
=
SimpleNamespace
(
...
...
test/srt/test_skip_tokenizer_init.py
View file @
86fc0d79
...
@@ -26,7 +26,7 @@ class TestSkipTokenizerInit(unittest.TestCase):
...
@@ -26,7 +26,7 @@ class TestSkipTokenizerInit(unittest.TestCase):
@
classmethod
@
classmethod
def
tearDownClass
(
cls
):
def
tearDownClass
(
cls
):
kill_child_process
(
cls
.
process
.
pid
)
kill_child_process
(
cls
.
process
.
pid
,
include_self
=
True
)
def
run_decode
(
self
,
return_logprob
=
False
,
top_logprobs_num
=
0
,
n
=
1
):
def
run_decode
(
self
,
return_logprob
=
False
,
top_logprobs_num
=
0
,
n
=
1
):
max_new_tokens
=
32
max_new_tokens
=
32
...
...
test/srt/test_srt_endpoint.py
View file @
86fc0d79
...
@@ -27,7 +27,7 @@ class TestSRTEndpoint(unittest.TestCase):
...
@@ -27,7 +27,7 @@ class TestSRTEndpoint(unittest.TestCase):
@
classmethod
@
classmethod
def
tearDownClass
(
cls
):
def
tearDownClass
(
cls
):
kill_child_process
(
cls
.
process
.
pid
)
kill_child_process
(
cls
.
process
.
pid
,
include_self
=
True
)
def
run_decode
(
def
run_decode
(
self
,
self
,
...
...
test/srt/test_torch_compile.py
View file @
86fc0d79
...
@@ -27,7 +27,7 @@ class TestTorchCompile(unittest.TestCase):
...
@@ -27,7 +27,7 @@ class TestTorchCompile(unittest.TestCase):
@
classmethod
@
classmethod
def
tearDownClass
(
cls
):
def
tearDownClass
(
cls
):
kill_child_process
(
cls
.
process
.
pid
)
kill_child_process
(
cls
.
process
.
pid
,
include_self
=
True
)
def
test_mmlu
(
self
):
def
test_mmlu
(
self
):
args
=
SimpleNamespace
(
args
=
SimpleNamespace
(
...
...
test/srt/test_torchao.py
View file @
86fc0d79
...
@@ -27,7 +27,7 @@ class TestTorchCompile(unittest.TestCase):
...
@@ -27,7 +27,7 @@ class TestTorchCompile(unittest.TestCase):
@
classmethod
@
classmethod
def
tearDownClass
(
cls
):
def
tearDownClass
(
cls
):
kill_child_process
(
cls
.
process
.
pid
)
kill_child_process
(
cls
.
process
.
pid
,
include_self
=
True
)
def
test_mmlu
(
self
):
def
test_mmlu
(
self
):
args
=
SimpleNamespace
(
args
=
SimpleNamespace
(
...
...
test/srt/test_triton_attn_backend.py
View file @
86fc0d79
...
@@ -50,7 +50,7 @@ class TestTritonAttnBackend(unittest.TestCase):
...
@@ -50,7 +50,7 @@ class TestTritonAttnBackend(unittest.TestCase):
metrics
=
run_eval
(
args
)
metrics
=
run_eval
(
args
)
assert
metrics
[
"score"
]
>=
0.65
assert
metrics
[
"score"
]
>=
0.65
finally
:
finally
:
kill_child_process
(
process
.
pid
)
kill_child_process
(
process
.
pid
,
include_self
=
True
)
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
...
...
test/srt/test_update_weights.py
View file @
86fc0d79
...
@@ -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
)
kill_child_process
(
cls
.
process
.
pid
,
include_self
=
True
)
def
run_decode
(
self
):
def
run_decode
(
self
):
response
=
requests
.
post
(
response
=
requests
.
post
(
...
...
test/srt/test_vision_openai_server.py
View file @
86fc0d79
...
@@ -45,7 +45,7 @@ class TestOpenAIVisionServer(unittest.TestCase):
...
@@ -45,7 +45,7 @@ class TestOpenAIVisionServer(unittest.TestCase):
@
classmethod
@
classmethod
def
tearDownClass
(
cls
):
def
tearDownClass
(
cls
):
kill_child_process
(
cls
.
process
.
pid
)
kill_child_process
(
cls
.
process
.
pid
,
include_self
=
True
)
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
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