Update vLLM precompiled wheel version and refactor various components for improved functionality and error handling. Changes include modifying the get_name method in DiffusionQuantizationConfig to use class-level attributes, enhancing metadata handling in StageEngineCoreClient, and adjusting the AsyncOmni class constructor for better parameter management. Additionally, improved error handling in omni_snapshot_download and optimized initial chunk size computation in talker2code2wav_async_chunk for dynamic load adaptation.
Signed-off-by: tzhouam <tzhouam@connect.ust.hk>
This commit is contained in:
1 parent
4f75cccacc
commit
034d579d77
7 files changed
+61
-42
No files matched your search
@@ -29,6 +29,7 @@ from vllm_omni.outputs import OmniRequestOutput
|
||||
if TYPE_CHECKING:
|
||||
from vllm.inputs.preprocess import InputPreprocessor
|
||||
from vllm.tokenizers import TokenizerLike
|
||||
from vllm.v1.engine import PauseMode
|
||||
|
||||
from vllm_omni.inputs.data import OmniPromptType, OmniSamplingParams
|
||||
|
||||
@@ -66,7 +67,7 @@ class AsyncOmni(EngineClient, OmniBase):
|
||||
... print(output)
|
||||
"""
|
||||
|
||||
def __init__(self, model: str, **kwargs: Any) -> None:
|
||||
def __init__(self, *args: Any, model: str = "", **kwargs: Any) -> None:
|
||||
OmniBase.__init__(self, model=model, **kwargs)
|
||||
self._pause_cond: asyncio.Condition = asyncio.Condition()
|
||||
self._paused: bool = False
|
||||
@@ -130,9 +131,17 @@ class AsyncOmni(EngineClient, OmniBase):
|
||||
async def generate(
|
||||
self,
|
||||
prompt: OmniPromptType,
|
||||
request_id: str,
|
||||
sampling_params_list: Sequence[OmniSamplingParams] | None = None,
|
||||
sampling_params: Any = None,
|
||||
request_id: str = "",
|
||||
*,
|
||||
prompt_text: str | None = None,
|
||||
lora_request: Any = None,
|
||||
tokenization_kwargs: dict[str, Any] | None = None,
|
||||
trace_headers: Any = None,
|
||||
priority: int = 0,
|
||||
data_parallel_rank: int | None = None,
|
||||
reasoning_ended: bool | None = None,
|
||||
sampling_params_list: Sequence[OmniSamplingParams] | None = None,
|
||||
output_modalities: list[str] | None = None,
|
||||
) -> AsyncGenerator[OmniRequestOutput, None]:
|
||||
"""Generate outputs for the given prompt asynchronously.
|
||||
@@ -226,6 +235,7 @@ class AsyncOmni(EngineClient, OmniBase):
|
||||
trace_headers: dict[str, str] | None = None,
|
||||
priority: int = 0,
|
||||
tokenization_kwargs: dict[str, Any] | None = None,
|
||||
reasoning_ended: bool | None = None,
|
||||
) -> AsyncGenerator[PoolingRequestOutput, None]:
|
||||
"""EngineClient.encode() stub.
|
||||
|
||||
@@ -396,6 +406,7 @@ class AsyncOmni(EngineClient, OmniBase):
|
||||
async def pause_generation(
|
||||
self,
|
||||
*,
|
||||
mode: PauseMode = "abort",
|
||||
wait_for_inflight_requests: bool = False,
|
||||
clear_cache: bool = True,
|
||||
) -> None:
|
||||
@@ -467,7 +478,7 @@ class AsyncOmni(EngineClient, OmniBase):
|
||||
logger.warning("[AsyncOmni] reset_prefix_cache not yet supported with Orchestrator process")
|
||||
return True
|
||||
|
||||
async def sleep(self, level: int = 1) -> None:
|
||||
async def sleep(self, level: int = 1, mode: PauseMode = "abort") -> None:
|
||||
"""Sleep all stages.
|
||||
|
||||
Best-effort: unsupported stages will emit a TODO result.
|
||||
@@ -584,7 +595,7 @@ class AsyncOmni(EngineClient, OmniBase):
|
||||
|
||||
# ==================== Shutdown ====================
|
||||
|
||||
def shutdown(self) -> None:
|
||||
def shutdown(self, timeout: float | None = None) -> None:
|
||||
"""Shutdown the engine."""
|
||||
if self.final_output_task is not None:
|
||||
self.final_output_task.cancel()
|
||||
|
||||
@@ -53,6 +53,11 @@ def omni_snapshot_download(model_id: str) -> str:
|
||||
)
|
||||
except huggingface_hub.errors.RepositoryNotFoundError:
|
||||
logger.warning("Repository not found for '%s'.", model_id)
|
||||
except PermissionError:
|
||||
logger.warning(
|
||||
"Permission denied when downloading '%s'. Assuming the model is already cached locally.",
|
||||
model_id,
|
||||
)
|
||||
|
||||
return model_id
|
||||
|
||||
|
||||
Reference in new issue
Block a user