[CI/Build] Reorganize models tests (#7820)

This commit is contained in:
Cyrus Leung
2024-09-14 01:20:06 +08:00
committed by GitHub
parent 0a4806f0a9
commit a84e598e21
55 changed files with 415 additions and 498 deletions

View File

@@ -1,13 +1,13 @@
import os
import torch
import torch.distributed as dist
from vllm.distributed.parallel_state import in_the_same_node_as
torch.distributed.init_process_group(backend="gloo")
test_result = all(
in_the_same_node_as(torch.distributed.group.WORLD, source_rank=0))
if __name__ == "__main__":
dist.init_process_group(backend="gloo")
test_result = all(in_the_same_node_as(dist.group.WORLD, source_rank=0))
expected = os.environ.get("VLLM_TEST_SAME_HOST", "1") == "1"
assert test_result == expected, f"Expected {expected}, got {test_result}"
print("Same node test passed!")
expected = os.environ.get("VLLM_TEST_SAME_HOST", "1") == "1"
assert test_result == expected, f"Expected {expected}, got {test_result}"
print("Same node test passed!")