[Diffusion] Integrate no-AllGather DLO with Host Weight Runtime (#6486)
Signed-off-by: Hongsheng Liu <liuhongsheng4@huawei.com> Signed-off-by: hsliuustc0106 <hsliuustc0106@users.noreply.github.com> Co-authored-by: hsliuustc0106 <hsliuustc0106@users.noreply.github.com>
This commit is contained in:
1 parent
8fdb719a41
commit
8360346a66
27 files changed
+1640
-51
No files matched your search
@@ -17,6 +17,7 @@ from vllm_omni.host_weight_runtime import (
|
||||
FailureCode,
|
||||
HostWeightFailure,
|
||||
HostWeightLease,
|
||||
HostWeightLeaseCarrier,
|
||||
HostWeightRuntime,
|
||||
HostWeightRuntimeConfig,
|
||||
IntegrityPolicy,
|
||||
@@ -166,6 +167,28 @@ def test_local_production_then_exact_warm_hit_emits_one_terminal_report_each(tmp
|
||||
assert all(report.resolution_id for report in reports)
|
||||
|
||||
|
||||
def test_lease_carrier_is_single_take_and_process_local(tmp_path: Path) -> None:
|
||||
identity = _identity()
|
||||
producer = CountingProducer(identity)
|
||||
runtime = HostWeightRuntime.from_config(
|
||||
HostWeightRuntimeConfig(mode=RuntimeMode.PREFERRED, domain=_domain(tmp_path / "store"))
|
||||
)
|
||||
resolution = runtime.resolve(identity, producer=producer)
|
||||
assert resolution.lease is not None
|
||||
|
||||
carrier = HostWeightLeaseCarrier(resolution.lease)
|
||||
with pytest.raises(TypeError, match="cannot be serialized"):
|
||||
carrier.__reduce_ex__(4)
|
||||
|
||||
lease = carrier.take()
|
||||
assert lease is resolution.lease
|
||||
with pytest.raises(RuntimeError, match="already taken"):
|
||||
carrier.take()
|
||||
carrier.close() # ownership has moved; the carrier must not close twice.
|
||||
assert not lease.closed
|
||||
lease.close()
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("mode", "expected"),
|
||||
[
|
||||
|
||||
Reference in new issue
Block a user