[Refactor] Clean up code by removing unnecessary lines and adding missing imports in async_omni_llm.py, omni_stage.py, omni.py, and api_server.py

Signed-off-by: tzhouam <tzhouam@connect.ust.hk>
This commit is contained in:
tzhouam committed 2026-02-05 11:02:03 +00:00
1 parent 24b04f58a0
commit 41e22e2770
4 files changed
+3 -9

No files matched your search

+1 -4
View File
@@ -164,10 +164,7 @@ class AsyncOmniLLM(AsyncLLM):
pass pass
# Use profiler_config from vllm_config (new way, aligned with vllm v1) # Use profiler_config from vllm_config (new way, aligned with vllm v1)
if ( if vllm_config.profiler_config.profiler == "torch" and not vllm_config.profiler_config.ignore_frontend:
vllm_config.profiler_config.profiler == "torch"
and not vllm_config.profiler_config.ignore_frontend
):
profiler_dir = vllm_config.profiler_config.torch_profiler_dir profiler_dir = vllm_config.profiler_config.torch_profiler_dir
logger.info( logger.info(
"Torch profiler enabled. AsyncOmniLLM CPU traces will be collected under %s", "Torch profiler enabled. AsyncOmniLLM CPU traces will be collected under %s",
+1
View File
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project # SPDX-FileCopyrightText: Copyright contributors to the vLLM project
import json
import multiprocessing as mp import multiprocessing as mp
import os import os
import time import time
-5
View File
@@ -626,7 +626,6 @@ def _stage_worker(
for device_id in devices_to_lock: for device_id in devices_to_lock:
lock_file = f"/tmp/vllm_omni_device_{device_id}_init.lock" lock_file = f"/tmp/vllm_omni_device_{device_id}_init.lock"
lock_acquired = False lock_acquired = False
next_wait_log = wait_start + 5.0
while not lock_acquired: while not lock_acquired:
try: try:
@@ -655,7 +654,6 @@ def _stage_worker(
) )
break break
# Wait a bit before retrying # Wait a bit before retrying
_time.sleep(0.1) _time.sleep(0.1)
except OSError as e: except OSError as e:
@@ -1173,8 +1171,6 @@ async def _stage_worker_async(
for device_id in devices_to_lock: for device_id in devices_to_lock:
lock_file = f"/tmp/vllm_omni_device_{device_id}_init.lock" lock_file = f"/tmp/vllm_omni_device_{device_id}_init.lock"
lock_acquired = False lock_acquired = False
next_wait_log = wait_start + 5.0
while not lock_acquired: while not lock_acquired:
try: try:
# Open or create the lock file # Open or create the lock file
@@ -1203,7 +1199,6 @@ async def _stage_worker_async(
) )
break break
# Wait a bit before retrying # Wait a bit before retrying
_time.sleep(0.1) _time.sleep(0.1)
except OSError as e: except OSError as e:
@@ -2,6 +2,7 @@
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project # SPDX-FileCopyrightText: Copyright contributors to the vLLM project
import base64 import base64
import io import io
import json
import multiprocessing import multiprocessing
import multiprocessing.forkserver as forkserver import multiprocessing.forkserver as forkserver
import os import os