Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
66b809cc
Commit
66b809cc
authored
Feb 08, 2025
by
zhuwenwen
Browse files
Merge tag 'v0.7.2' into v0.7.2-dev
parents
37b63c24
0408efc6
Changes
1000
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
47 additions
and
5 deletions
+47
-5
tests/spec_decode/e2e/test_integration.py
tests/spec_decode/e2e/test_integration.py
+1
-0
tests/spec_decode/e2e/test_integration_dist_tp2.py
tests/spec_decode/e2e/test_integration_dist_tp2.py
+1
-0
tests/spec_decode/e2e/test_integration_dist_tp4.py
tests/spec_decode/e2e/test_integration_dist_tp4.py
+1
-0
tests/spec_decode/e2e/test_logprobs.py
tests/spec_decode/e2e/test_logprobs.py
+2
-0
tests/spec_decode/e2e/test_medusa_correctness.py
tests/spec_decode/e2e/test_medusa_correctness.py
+1
-0
tests/spec_decode/e2e/test_mlp_correctness.py
tests/spec_decode/e2e/test_mlp_correctness.py
+1
-0
tests/spec_decode/e2e/test_multistep_correctness.py
tests/spec_decode/e2e/test_multistep_correctness.py
+1
-0
tests/spec_decode/e2e/test_ngram_correctness.py
tests/spec_decode/e2e/test_ngram_correctness.py
+1
-0
tests/spec_decode/e2e/test_seed.py
tests/spec_decode/e2e/test_seed.py
+2
-0
tests/spec_decode/test_batch_expansion.py
tests/spec_decode/test_batch_expansion.py
+2
-0
tests/spec_decode/test_dynamic_spec_decode.py
tests/spec_decode/test_dynamic_spec_decode.py
+2
-0
tests/spec_decode/test_metrics.py
tests/spec_decode/test_metrics.py
+2
-0
tests/spec_decode/test_multi_step_worker.py
tests/spec_decode/test_multi_step_worker.py
+2
-0
tests/spec_decode/test_ngram_worker.py
tests/spec_decode/test_ngram_worker.py
+2
-0
tests/spec_decode/test_scorer.py
tests/spec_decode/test_scorer.py
+2
-0
tests/spec_decode/test_spec_decode_worker.py
tests/spec_decode/test_spec_decode_worker.py
+2
-0
tests/spec_decode/test_utils.py
tests/spec_decode/test_utils.py
+2
-0
tests/spec_decode/utils.py
tests/spec_decode/utils.py
+2
-0
tests/standalone_tests/lazy_imports.py
tests/standalone_tests/lazy_imports.py
+16
-5
tests/tensorizer_loader/conftest.py
tests/tensorizer_loader/conftest.py
+2
-0
No files found.
Too many changes to show.
To preserve performance only
1000 of 1000+
files are displayed.
Plain diff
Email patch
tests/spec_decode/e2e/test_integration.py
View file @
66b809cc
# SPDX-License-Identifier: Apache-2.0
"""Tests which cover integration of the speculative decoding framework with
"""Tests which cover integration of the speculative decoding framework with
other features, e.g. cuda graphs.
other features, e.g. cuda graphs.
"""
"""
...
...
tests/spec_decode/e2e/test_integration_dist_tp2.py
View file @
66b809cc
# SPDX-License-Identifier: Apache-2.0
"""Tests which cover integration of the speculative decoding framework with
"""Tests which cover integration of the speculative decoding framework with
tensor parallelism.
tensor parallelism.
"""
"""
...
...
tests/spec_decode/e2e/test_integration_dist_tp4.py
View file @
66b809cc
# SPDX-License-Identifier: Apache-2.0
"""Tests which cover integration of the speculative decoding framework with
"""Tests which cover integration of the speculative decoding framework with
tensor parallelism.
tensor parallelism.
"""
"""
...
...
tests/spec_decode/e2e/test_logprobs.py
View file @
66b809cc
# SPDX-License-Identifier: Apache-2.0
from
itertools
import
cycle
from
itertools
import
cycle
import
pytest
import
pytest
...
...
tests/spec_decode/e2e/test_medusa_correctness.py
View file @
66b809cc
# SPDX-License-Identifier: Apache-2.0
"""This docstring details important information on the testing methodology.
"""This docstring details important information on the testing methodology.
Most of the tests rely on "greedy equality", where we expect the output of
Most of the tests rely on "greedy equality", where we expect the output of
...
...
tests/spec_decode/e2e/test_mlp_correctness.py
View file @
66b809cc
# SPDX-License-Identifier: Apache-2.0
"""This docstring details important information on the testing methodology.
"""This docstring details important information on the testing methodology.
Most of the tests rely on "greedy equality", where we expect the output of
Most of the tests rely on "greedy equality", where we expect the output of
...
...
tests/spec_decode/e2e/test_multistep_correctness.py
View file @
66b809cc
# SPDX-License-Identifier: Apache-2.0
"""The tests in this file verify end-to-end speculative decoding correctness.
"""The tests in this file verify end-to-end speculative decoding correctness.
This docstring details important information on the testing methodology.
This docstring details important information on the testing methodology.
...
...
tests/spec_decode/e2e/test_ngram_correctness.py
View file @
66b809cc
# SPDX-License-Identifier: Apache-2.0
"""This docstring details important information on the testing methodology.
"""This docstring details important information on the testing methodology.
Most of the tests rely on "greedy equality", where we expect the output of
Most of the tests rely on "greedy equality", where we expect the output of
...
...
tests/spec_decode/e2e/test_seed.py
View file @
66b809cc
# SPDX-License-Identifier: Apache-2.0
import
pytest
import
pytest
import
os
import
os
...
...
tests/spec_decode/test_batch_expansion.py
View file @
66b809cc
# SPDX-License-Identifier: Apache-2.0
from
typing
import
List
from
typing
import
List
import
pytest
import
pytest
...
...
tests/spec_decode/test_dynamic_spec_decode.py
View file @
66b809cc
# SPDX-License-Identifier: Apache-2.0
from
unittest.mock
import
MagicMock
,
patch
from
unittest.mock
import
MagicMock
,
patch
import
pytest
import
pytest
...
...
tests/spec_decode/test_metrics.py
View file @
66b809cc
# SPDX-License-Identifier: Apache-2.0
import
math
import
math
from
unittest.mock
import
MagicMock
from
unittest.mock
import
MagicMock
...
...
tests/spec_decode/test_multi_step_worker.py
View file @
66b809cc
# SPDX-License-Identifier: Apache-2.0
import
random
import
random
from
typing
import
Dict
,
List
from
typing
import
Dict
,
List
from
unittest.mock
import
MagicMock
from
unittest.mock
import
MagicMock
...
...
tests/spec_decode/test_ngram_worker.py
View file @
66b809cc
# SPDX-License-Identifier: Apache-2.0
import
torch
import
torch
import
os
import
os
...
...
tests/spec_decode/test_scorer.py
View file @
66b809cc
# SPDX-License-Identifier: Apache-2.0
import
random
import
random
from
typing
import
List
from
typing
import
List
...
...
tests/spec_decode/test_spec_decode_worker.py
View file @
66b809cc
# SPDX-License-Identifier: Apache-2.0
import
random
import
random
from
collections
import
defaultdict
from
collections
import
defaultdict
from
types
import
SimpleNamespace
from
types
import
SimpleNamespace
...
...
tests/spec_decode/test_utils.py
View file @
66b809cc
# SPDX-License-Identifier: Apache-2.0
from
unittest.mock
import
MagicMock
from
unittest.mock
import
MagicMock
import
pytest
import
pytest
...
...
tests/spec_decode/utils.py
View file @
66b809cc
# SPDX-License-Identifier: Apache-2.0
from
itertools
import
count
from
itertools
import
count
from
typing
import
Callable
,
Dict
,
List
,
Optional
from
typing
import
Callable
,
Dict
,
List
,
Optional
from
typing
import
Sequence
as
GenericSequence
from
typing
import
Sequence
as
GenericSequence
...
...
tests/standalone_tests/lazy_
torch_compile
.py
→
tests/standalone_tests/lazy_
imports
.py
View file @
66b809cc
# SPDX-License-Identifier: Apache-2.0
# Description: Test the lazy import module
# Description: Test the lazy import module
# The utility function cannot be placed in `vllm.utils`
# The utility function cannot be placed in `vllm.utils`
# this needs to be a standalone script
# this needs to be a standalone script
...
@@ -6,7 +8,17 @@ from contextlib import nullcontext
...
@@ -6,7 +8,17 @@ from contextlib import nullcontext
from
vllm_test_utils
import
BlameResult
,
blame
from
vllm_test_utils
import
BlameResult
,
blame
module_name
=
"torch._inductor.async_compile"
# List of modules that should not be imported too early.
# Lazy import `torch._inductor.async_compile` to avoid creating
# too many processes before we set the number of compiler threads.
# Lazy import `cv2` to avoid bothering users who only use text models.
# `cv2` can easily mess up the environment.
module_names
=
[
"torch._inductor.async_compile"
,
"cv2"
]
def
any_module_imported
():
return
any
(
module_name
in
sys
.
modules
for
module_name
in
module_names
)
# In CI, we only check finally if the module is imported.
# In CI, we only check finally if the module is imported.
# If it is indeed imported, we can rerun the test with `use_blame=True`,
# If it is indeed imported, we can rerun the test with `use_blame=True`,
...
@@ -14,8 +26,7 @@ module_name = "torch._inductor.async_compile"
...
@@ -14,8 +26,7 @@ module_name = "torch._inductor.async_compile"
# and help find the root cause.
# and help find the root cause.
# We don't run it in CI by default because it is slow.
# We don't run it in CI by default because it is slow.
use_blame
=
False
use_blame
=
False
context
=
blame
(
context
=
blame
(
any_module_imported
)
if
use_blame
else
nullcontext
()
lambda
:
module_name
in
sys
.
modules
)
if
use_blame
else
nullcontext
()
with
context
as
result
:
with
context
as
result
:
import
vllm
# noqa
import
vllm
# noqa
...
@@ -23,6 +34,6 @@ if use_blame:
...
@@ -23,6 +34,6 @@ if use_blame:
assert
isinstance
(
result
,
BlameResult
)
assert
isinstance
(
result
,
BlameResult
)
print
(
f
"the first import location is:
\n
{
result
.
trace_stack
}
"
)
print
(
f
"the first import location is:
\n
{
result
.
trace_stack
}
"
)
assert
module_name
not
in
sys
.
modules
,
(
assert
not
any_module_imported
()
,
(
f
"
M
odule
{
module_name
}
is
imported. To see the first"
f
"
Some the m
odule
s in
{
module_name
s
}
are
imported. To see the first"
f
" import location, run the test with `use_blame=True`."
)
f
" import location, run the test with `use_blame=True`."
)
tests/tensorizer_loader/conftest.py
View file @
66b809cc
# SPDX-License-Identifier: Apache-2.0
import
functools
import
functools
import
gc
import
gc
from
typing
import
Callable
,
TypeVar
from
typing
import
Callable
,
TypeVar
...
...
Prev
1
…
18
19
20
21
22
23
24
25
26
…
50
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