[Bugfix] Keep pipeline event-driven defaults local
Signed-off-by: Sy03 <1370724210@qq.com>
This commit is contained in:
1 parent
b1e10b0235
commit
be3ab91187
3 files changed
+9
-10
No files matched your search
@@ -14,7 +14,6 @@ import asyncio
|
|||||||
import concurrent.futures
|
import concurrent.futures
|
||||||
import copy
|
import copy
|
||||||
import json
|
import json
|
||||||
import os
|
|
||||||
import queue
|
import queue
|
||||||
import shutil
|
import shutil
|
||||||
import threading
|
import threading
|
||||||
@@ -72,7 +71,6 @@ from vllm_omni.engine.messages import (
|
|||||||
StageSubmissionMessage,
|
StageSubmissionMessage,
|
||||||
)
|
)
|
||||||
from vllm_omni.engine.orchestrator import (
|
from vllm_omni.engine.orchestrator import (
|
||||||
_EVENT_DRIVEN_ORCH_ENV,
|
|
||||||
Orchestrator,
|
Orchestrator,
|
||||||
_event_driven_orch_default_for_pipeline,
|
_event_driven_orch_default_for_pipeline,
|
||||||
)
|
)
|
||||||
@@ -237,12 +235,9 @@ class AsyncOmniEngine:
|
|||||||
pipeline_config.duplex_serving_adapter if pipeline_config is not None else None
|
pipeline_config.duplex_serving_adapter if pipeline_config is not None else None
|
||||||
)
|
)
|
||||||
self._duplex_control_enabled = bool(pipeline_config and pipeline_config.duplex_control_enabled)
|
self._duplex_control_enabled = bool(pipeline_config and pipeline_config.duplex_control_enabled)
|
||||||
if (
|
self._event_driven_orch_default = _event_driven_orch_default_for_pipeline(
|
||||||
_EVENT_DRIVEN_ORCH_ENV not in os.environ
|
pipeline_config.model_type if pipeline_config is not None else None
|
||||||
and pipeline_config is not None
|
)
|
||||||
and _event_driven_orch_default_for_pipeline(pipeline_config.model_type)
|
|
||||||
):
|
|
||||||
os.environ[_EVENT_DRIVEN_ORCH_ENV] = "1"
|
|
||||||
self.duplex_session_config = DuplexSessionRuntimeConfig()
|
self.duplex_session_config = DuplexSessionRuntimeConfig()
|
||||||
if deploy_config_path is not None:
|
if deploy_config_path is not None:
|
||||||
self.duplex_session_config = load_deploy_config(deploy_config_path).duplex_session
|
self.duplex_session_config = load_deploy_config(deploy_config_path).duplex_session
|
||||||
@@ -460,6 +455,7 @@ class AsyncOmniEngine:
|
|||||||
prom_metrics=self._prom_metrics,
|
prom_metrics=self._prom_metrics,
|
||||||
log_stats=self._log_stats,
|
log_stats=self._log_stats,
|
||||||
enable_orch_monitor=self._enable_orch_monitor,
|
enable_orch_monitor=self._enable_orch_monitor,
|
||||||
|
event_driven_orch_default=self._event_driven_orch_default,
|
||||||
duplex_runtime_extension=duplex_runtime_extension,
|
duplex_runtime_extension=duplex_runtime_extension,
|
||||||
enable_duplex_control=self._duplex_control_enabled,
|
enable_duplex_control=self._duplex_control_enabled,
|
||||||
duplex_session_config=self.duplex_session_config,
|
duplex_session_config=self.duplex_session_config,
|
||||||
|
|||||||
@@ -449,6 +449,7 @@ class Orchestrator:
|
|||||||
prom_metrics: Any = None,
|
prom_metrics: Any = None,
|
||||||
log_stats: bool = False,
|
log_stats: bool = False,
|
||||||
enable_orch_monitor: bool = False,
|
enable_orch_monitor: bool = False,
|
||||||
|
event_driven_orch_default: bool = False,
|
||||||
duplex_runtime_extension: DuplexRuntimeExtension | None = None,
|
duplex_runtime_extension: DuplexRuntimeExtension | None = None,
|
||||||
enable_duplex_control: bool = False,
|
enable_duplex_control: bool = False,
|
||||||
duplex_session_config: DuplexSessionRuntimeConfig | None = None,
|
duplex_session_config: DuplexSessionRuntimeConfig | None = None,
|
||||||
@@ -520,7 +521,7 @@ class Orchestrator:
|
|||||||
|
|
||||||
self._shutdown_event = asyncio.Event()
|
self._shutdown_event = asyncio.Event()
|
||||||
self._stages_shutdown = False
|
self._stages_shutdown = False
|
||||||
self._event_driven_orch = _event_driven_orch_enabled()
|
self._event_driven_orch = _event_driven_orch_enabled(default=event_driven_orch_default)
|
||||||
|
|
||||||
# Distributed membership (optional, injected by DistStageRuntime)
|
# Distributed membership (optional, injected by DistStageRuntime)
|
||||||
self._membership = membership_controller
|
self._membership = membership_controller
|
||||||
|
|||||||
@@ -943,7 +943,9 @@ class AsyncOmni(EngineClient, OmniBase):
|
|||||||
# event-driven loop (vllm_omni/engine/orchestrator.py).
|
# event-driven loop (vllm_omni/engine/orchestrator.py).
|
||||||
from vllm_omni.engine.orchestrator import _event_driven_orch_enabled
|
from vllm_omni.engine.orchestrator import _event_driven_orch_enabled
|
||||||
|
|
||||||
event_driven_drain = _event_driven_orch_enabled() and hasattr(engine, "get_output_blocking_async")
|
event_driven_drain = _event_driven_orch_enabled(
|
||||||
|
default=bool(getattr(engine, "_event_driven_orch_default", False))
|
||||||
|
) and hasattr(engine, "get_output_blocking_async")
|
||||||
|
|
||||||
async def _final_output_loop():
|
async def _final_output_loop():
|
||||||
"""Background coroutine that dispatches final outputs to request queues."""
|
"""Background coroutine that dispatches final outputs to request queues."""
|
||||||
|
|||||||
Reference in new issue
Block a user