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
eeceadae
Unverified
Commit
eeceadae
authored
Jul 13, 2024
by
Woosuk Kwon
Committed by
GitHub
Jul 13, 2024
Browse files
[Misc] Add deprecation warning for beam search (#6402)
parent
babf52da
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
vllm/envs.py
vllm/envs.py
+5
-0
vllm/sampling_params.py
vllm/sampling_params.py
+12
-0
No files found.
vllm/envs.py
View file @
eeceadae
...
@@ -41,6 +41,7 @@ if TYPE_CHECKING:
...
@@ -41,6 +41,7 @@ if TYPE_CHECKING:
NVCC_THREADS
:
Optional
[
str
]
=
None
NVCC_THREADS
:
Optional
[
str
]
=
None
VLLM_USE_PRECOMPILED
:
bool
=
False
VLLM_USE_PRECOMPILED
:
bool
=
False
VLLM_INSTALL_PUNICA_KERNELS
:
bool
=
False
VLLM_INSTALL_PUNICA_KERNELS
:
bool
=
False
VLLM_NO_DEPRECATION_WARNING
:
bool
=
False
CMAKE_BUILD_TYPE
:
Optional
[
str
]
=
None
CMAKE_BUILD_TYPE
:
Optional
[
str
]
=
None
VERBOSE
:
bool
=
False
VERBOSE
:
bool
=
False
...
@@ -251,6 +252,10 @@ environment_variables: Dict[str, Callable[[], Any]] = {
...
@@ -251,6 +252,10 @@ environment_variables: Dict[str, Callable[[], Any]] = {
lambda
:
os
.
getenv
(
"VLLM_XLA_CACHE_PATH"
,
"~/.vllm/xla_cache/"
),
lambda
:
os
.
getenv
(
"VLLM_XLA_CACHE_PATH"
,
"~/.vllm/xla_cache/"
),
"VLLM_FUSED_MOE_CHUNK_SIZE"
:
"VLLM_FUSED_MOE_CHUNK_SIZE"
:
lambda
:
int
(
os
.
getenv
(
"VLLM_FUSED_MOE_CHUNK_SIZE"
,
"65536"
)),
lambda
:
int
(
os
.
getenv
(
"VLLM_FUSED_MOE_CHUNK_SIZE"
,
"65536"
)),
# If set, vllm will skip the deprecation warnings.
"VLLM_NO_DEPRECATION_WARNING"
:
lambda
:
bool
(
int
(
os
.
getenv
(
"VLLM_NO_DEPRECATION_WARNING"
,
"0"
))),
}
}
# end-env-vars-definition
# end-env-vars-definition
...
...
vllm/sampling_params.py
View file @
eeceadae
...
@@ -8,6 +8,11 @@ import torch
...
@@ -8,6 +8,11 @@ import torch
from
pydantic
import
Field
from
pydantic
import
Field
from
typing_extensions
import
Annotated
from
typing_extensions
import
Annotated
import
vllm.envs
as
envs
from
vllm.logger
import
init_logger
logger
=
init_logger
(
__name__
)
_SAMPLING_EPS
=
1e-5
_SAMPLING_EPS
=
1e-5
...
@@ -184,6 +189,13 @@ class SamplingParams:
...
@@ -184,6 +189,13 @@ class SamplingParams:
self
.
_verify_args
()
self
.
_verify_args
()
if
self
.
use_beam_search
:
if
self
.
use_beam_search
:
if
not
envs
.
VLLM_NO_DEPRECATION_WARNING
:
logger
.
warning
(
"[IMPORTANT] We plan to discontinue the support for beam "
"search in the next major release. Please refer to "
"https://github.com/vllm-project/vllm/issues/6226 for "
"more information. Set VLLM_NO_DEPRECATION_WARNING=1 to "
"suppress this warning."
)
self
.
_verify_beam_search
()
self
.
_verify_beam_search
()
else
:
else
:
self
.
_verify_non_beam_search
()
self
.
_verify_non_beam_search
()
...
...
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