[fix] Remove redundant parameter passing (#90)
Signed-off-by: 齐保元 <qibaoyuan@xiaomi.com>
This commit is contained in:
1 parent
6d1bcfd18f
commit
38f58064eb
1 file changed
+4
-10
@@ -138,9 +138,6 @@ class OmniStage:
|
|||||||
self,
|
self,
|
||||||
model,
|
model,
|
||||||
stage_payload,
|
stage_payload,
|
||||||
self._in_q,
|
|
||||||
self._out_q,
|
|
||||||
self._log_file,
|
|
||||||
batch_timeout,
|
batch_timeout,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@@ -487,21 +484,15 @@ def _stage_worker_async_entry(
|
|||||||
omni_stage: OmniStage,
|
omni_stage: OmniStage,
|
||||||
model: str,
|
model: str,
|
||||||
stage_payload: dict[str, Any],
|
stage_payload: dict[str, Any],
|
||||||
in_q: mp.Queue,
|
|
||||||
out_q: mp.Queue,
|
|
||||||
log_file: Optional[str] = None,
|
|
||||||
batch_timeout: int = 10,
|
batch_timeout: int = 10,
|
||||||
) -> None:
|
) -> None:
|
||||||
asyncio.run(_stage_worker_async(omni_stage, model, stage_payload, in_q, out_q, log_file, batch_timeout))
|
asyncio.run(_stage_worker_async(omni_stage, model, stage_payload, batch_timeout))
|
||||||
|
|
||||||
|
|
||||||
async def _stage_worker_async(
|
async def _stage_worker_async(
|
||||||
omni_stage: OmniStage,
|
omni_stage: OmniStage,
|
||||||
model: str,
|
model: str,
|
||||||
stage_payload: dict[str, Any],
|
stage_payload: dict[str, Any],
|
||||||
in_q: mp.Queue,
|
|
||||||
out_q: mp.Queue,
|
|
||||||
log_file: Optional[str] = None,
|
|
||||||
batch_timeout: int = 10,
|
batch_timeout: int = 10,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Stage worker entry: device setup, LLM init, batching, SHM IPC."""
|
"""Stage worker entry: device setup, LLM init, batching, SHM IPC."""
|
||||||
@@ -523,6 +514,9 @@ async def _stage_worker_async(
|
|||||||
runtime_cfg = stage_payload.get("runtime", {})
|
runtime_cfg = stage_payload.get("runtime", {})
|
||||||
shm_threshold_bytes = int(stage_payload.get("shm_threshold_bytes", 65536))
|
shm_threshold_bytes = int(stage_payload.get("shm_threshold_bytes", 65536))
|
||||||
|
|
||||||
|
log_file = omni_stage._log_file
|
||||||
|
in_q = omni_stage._in_q
|
||||||
|
out_q = omni_stage._out_q
|
||||||
# Per-stage file logger (optional)
|
# Per-stage file logger (optional)
|
||||||
try:
|
try:
|
||||||
if log_file:
|
if log_file:
|
||||||
|
|||||||
Reference in new issue
Block a user