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
dynamo
Commits
d58a6881
Unverified
Commit
d58a6881
authored
Mar 30, 2026
by
Ayush Agarwal
Committed by
GitHub
Mar 30, 2026
Browse files
fix: remove omni dependency from dynamo.vllm path (#7683)
Signed-off-by:
ayushag
<
ayushag@nvidia.com
>
parent
f6e5023b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
2 deletions
+39
-2
components/src/dynamo/vllm/main.py
components/src/dynamo/vllm/main.py
+1
-2
components/src/dynamo/vllm/tests/test_vllm_unit.py
components/src/dynamo/vllm/tests/test_vllm_unit.py
+38
-0
No files found.
components/src/dynamo/vllm/main.py
View file @
d58a6881
...
...
@@ -34,7 +34,6 @@ from dynamo.llm import (
)
from
dynamo.runtime
import
Endpoint
from
dynamo.runtime.logging
import
configure_dynamo_logging
from
dynamo.vllm.omni.args
import
OmniConfig
from
dynamo.vllm.worker_factory
import
WorkerFactory
from
.
import
envs
...
...
@@ -184,7 +183,7 @@ async def worker() -> None:
def
setup_metrics_collection
(
config
:
Config
|
OmniConfig
,
generate_endpoint
:
Endpoint
,
logger
:
logging
.
Logger
config
:
Config
,
generate_endpoint
:
Endpoint
,
logger
:
logging
.
Logger
)
->
None
:
"""Set up metrics collection for vLLM and LMCache metrics.
...
...
components/src/dynamo/vllm/tests/test_vllm_unit.py
View file @
d58a6881
...
...
@@ -6,6 +6,7 @@
import
json
import
re
import
socket
import
sys
import
warnings
from
pathlib
import
Path
from
types
import
SimpleNamespace
...
...
@@ -558,3 +559,40 @@ class TestEnsureSideChannelHost:
):
with
pytest
.
raises
(
RuntimeError
,
match
=
"Unable to determine"
):
ensure_side_channel_host
()
# --- vllm_omni optional dependency tests ---
class
TestVllmOmniOptionalDependency
:
def
test_dynamo_vllm_main_importable_without_vllm_omni
(
self
):
"""dynamo.vllm.main must import cleanly even when vllm_omni is absent.
Setting sys.modules["vllm_omni"] = None blocks ALL imports from the
vllm_omni package — Python always resolves the top-level package first,
so a None sentinel at the root raises ImportError for any submodule import.
"""
# Save and evict any already-cached vllm_omni and dynamo.vllm.omni modules
saved
=
{
k
:
sys
.
modules
.
pop
(
k
)
for
k
in
list
(
sys
.
modules
)
if
k
==
"vllm_omni"
or
k
.
startswith
(
"vllm_omni."
)
or
k
==
"dynamo.vllm.main"
or
k
.
startswith
(
"dynamo.vllm.omni"
)
}
# Explicitly block the top-level vllm_omni package regardless of prior imports
sys
.
modules
[
"vllm_omni"
]
=
None
# type: ignore[assignment]
try
:
import
dynamo.vllm.main
# noqa: F401
except
ImportError
as
e
:
pytest
.
fail
(
f
"dynamo.vllm.main has a hard dependency on vllm_omni:
{
e
}
"
)
finally
:
sys
.
modules
.
pop
(
"vllm_omni"
,
None
)
# Remove any modules imported during this test
for
mod
in
list
(
sys
.
modules
):
if
mod
==
"dynamo.vllm.main"
or
mod
.
startswith
(
"dynamo.vllm.omni"
):
sys
.
modules
.
pop
(
mod
,
None
)
# Restore original state
sys
.
modules
.
update
(
saved
)
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