[Refactor]: clean up diffusion worker interfaces (#5217)

Signed-off-by: Huang, Zeyu <11222265+fhfuih@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
This commit is contained in:
authored and GitHub committed 2026-07-22 17:07:09 +08:00
1 parent 39e83e27f0
commit f43d761c26
6 files changed
+58 -153

No files matched your search

@@ -526,7 +526,7 @@ class TestWorkerProcRpcRankStatus:
monkeypatch.setattr(torch.distributed, "all_gather_object", _all_gather_object)
result, should_reply = proc.execute_rpc(
result, should_reply = proc._execute_rpc(
{
"method": "remove_lora",
"args": (),
@@ -549,7 +549,7 @@ class TestWorkerProcRpcRankStatus:
proc.worker.execute_method = Mock(side_effect=RuntimeError("local boom"))
monkeypatch.setattr(torch.distributed, "is_initialized", lambda: False)
result, should_reply = proc.execute_rpc(
result, should_reply = proc._execute_rpc(
{
"method": "add_lora",
"args": (),
@@ -575,7 +575,7 @@ class TestWorkerProcRpcRankStatus:
proc = self._make_worker_proc()
with pytest.raises(ValueError, match="collect_rank_status requires exec_all_ranks=True"):
proc.execute_rpc(
proc._execute_rpc(
{
"method": "ping",
"args": (),
@@ -594,7 +594,7 @@ class TestWorkerProcRpcRankStatus:
proc.worker.execute_method = Mock(side_effect=original)
with pytest.raises(ValueError) as excinfo:
proc.execute_rpc(
proc._execute_rpc(
{
"method": "bad",
"args": (),