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
25f9c789
Unverified
Commit
25f9c789
authored
Nov 19, 2024
by
youkaichao
Committed by
GitHub
Nov 19, 2024
Browse files
[misc][plugin] improve plugin loading (#10443)
Signed-off-by:
youkaichao
<
youkaichao@gmail.com
>
parent
5390d666
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
vllm/plugins/__init__.py
vllm/plugins/__init__.py
+7
-0
No files found.
vllm/plugins/__init__.py
View file @
25f9c789
...
...
@@ -9,12 +9,19 @@ if TYPE_CHECKING:
logger
=
logging
.
getLogger
(
__name__
)
# make sure one process only loads plugins once
plugins_loaded
=
False
def
load_general_plugins
():
"""WARNING: plugins can be loaded for multiple times in different
processes. They should be designed in a way that they can be loaded
multiple times without causing issues.
"""
global
plugins_loaded
if
plugins_loaded
:
return
plugins_loaded
=
True
import
sys
if
sys
.
version_info
<
(
3
,
10
):
from
importlib_metadata
import
entry_points
...
...
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