@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 5d7e3d0176
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 17, 00:30 UTC

[mis][ci/test] fix flaky test in test_sharded_state_loader.py (#5361)

[mis][ci/test] fix flaky test in tests/test_sharded_state_loader.py (#5361)

youkaichao committed Jun 8, 2024 at 20:50 UTC 5d7e3d0176e0dbcf144c64b7d14d996c55e36c50
1 file changed +2 -1
tests/test_sharded_state_loader.py
+2 -1
@@ -39,7 +39,8 @@ def test_filter_subtensors():
39 filtered_state_dict = ShardedStateLoader._filter_subtensors(state_dict)
40 assert tuple(filtered_state_dict.keys()) == ("a", "b", "c")
41 for key, tensor in filtered_state_dict.items():
42 - assert tensor.equal(state_dict[key])
42 + # NOTE: don't use `euqal` here, as the tensor might contain NaNs
43 + assert tensor is state_dict[key]
44
45
46 @pytest.fixture(scope="module")