Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/entrypoints/test_omni_diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ def _setup_multiprocessing_mocks(monkeypatch: pytest.MonkeyPatch, mocker: Mocker
fake_process_instance = mocker.MagicMock()
fake_process_instance.start = mocker.MagicMock()
fake_process_instance.join = mocker.MagicMock()
fake_process_instance.is_alive = mocker.MagicMock(return_value=False)
fake_process_instance.is_alive = mocker.MagicMock(return_value=True)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This value needs to be set True to allow _proc.is_alive() check on mocks to pass. There is no reason to set is_alive to False unless testing process failure test case.

fake_process_instance.terminate = mocker.MagicMock()
fake_process_class.return_value = fake_process_instance

Expand Down
10 changes: 8 additions & 2 deletions vllm_omni/entrypoints/omni_stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -693,8 +693,14 @@ def try_collect(self) -> dict[str, Any] | None:
assert self._out_q is not None
try:
return self._out_q.get_nowait()
except Exception:
return None
except queue.Empty:
pass
except Exception as e:
logger.error("Unexpected error when collecting OmniStage output queue:", exc_info=e)
self.stop_stage_worker()
raise
if self._proc is not None and not self._proc.is_alive():
raise RuntimeError(f"OmniStage Worker process died unexpectedly with exit code {self._proc.exitcode}")

def process_engine_inputs(
self,
Expand Down