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
2298e69b
Unverified
Commit
2298e69b
authored
Nov 18, 2024
by
youkaichao
Committed by
GitHub
Nov 18, 2024
Browse files
[ci][bugfix] fix kernel tests (#10431)
Signed-off-by:
youkaichao
<
youkaichao@gmail.com
>
parent
a03ea407
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
vllm/plugins/__init__.py
vllm/plugins/__init__.py
+13
-10
No files found.
vllm/plugins/__init__.py
View file @
2298e69b
...
@@ -6,9 +6,6 @@ import vllm.envs as envs
...
@@ -6,9 +6,6 @@ import vllm.envs as envs
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
from
vllm.config
import
CompilationConfig
,
VllmConfig
from
vllm.config
import
CompilationConfig
,
VllmConfig
else
:
CompilationConfig
=
None
VllmConfig
=
None
logger
=
logging
.
getLogger
(
__name__
)
logger
=
logging
.
getLogger
(
__name__
)
...
@@ -50,23 +47,23 @@ def load_general_plugins():
...
@@ -50,23 +47,23 @@ def load_general_plugins():
logger
.
exception
(
"Failed to load plugin %s"
,
plugin
.
name
)
logger
.
exception
(
"Failed to load plugin %s"
,
plugin
.
name
)
_compilation_config
:
Optional
[
CompilationConfig
]
=
None
_compilation_config
:
Optional
[
"
CompilationConfig
"
]
=
None
def
set_compilation_config
(
config
:
Optional
[
CompilationConfig
]):
def
set_compilation_config
(
config
:
Optional
[
"
CompilationConfig
"
]):
global
_compilation_config
global
_compilation_config
_compilation_config
=
config
_compilation_config
=
config
def
get_compilation_config
()
->
Optional
[
CompilationConfig
]:
def
get_compilation_config
()
->
Optional
[
"
CompilationConfig
"
]:
return
_compilation_config
return
_compilation_config
_current_vllm_config
:
Optional
[
VllmConfig
]
=
None
_current_vllm_config
:
Optional
[
"
VllmConfig
"
]
=
None
@
contextmanager
@
contextmanager
def
set_current_vllm_config
(
vllm_config
:
VllmConfig
):
def
set_current_vllm_config
(
vllm_config
:
"
VllmConfig
"
):
"""
"""
Temporarily set the current VLLM config.
Temporarily set the current VLLM config.
Used during model initialization.
Used during model initialization.
...
@@ -87,6 +84,12 @@ def set_current_vllm_config(vllm_config: VllmConfig):
...
@@ -87,6 +84,12 @@ def set_current_vllm_config(vllm_config: VllmConfig):
_current_vllm_config
=
old_vllm_config
_current_vllm_config
=
old_vllm_config
def
get_current_vllm_config
()
->
VllmConfig
:
def
get_current_vllm_config
()
->
"VllmConfig"
:
assert
_current_vllm_config
is
not
None
,
"Current VLLM config is not set."
if
_current_vllm_config
is
None
:
# in ci, usually when we test custom ops/modules directly,
# we don't set the vllm config. In that case, we set a default
# config.
logger
.
warning
(
"Current VLLM config is not set."
)
from
vllm.config
import
VllmConfig
return
VllmConfig
()
return
_current_vllm_config
return
_current_vllm_config
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