mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-12-16 20:00:36 +08:00
[v1] add dp & mp mesh (#9611)
This commit is contained in:
@@ -20,5 +20,7 @@ from llamafactory.v1.accelerator.interface import DistributedInterface, Distribu
|
||||
|
||||
def test_distributed_interface():
|
||||
DistributedInterface(DistributedStrategy())
|
||||
assert DistributedInterface.rank == int(os.getenv("RANK", "0"))
|
||||
assert DistributedInterface.world_size == int(os.getenv("WORLD_SIZE", "1"))
|
||||
assert DistributedInterface.get_rank() == int(os.getenv("RANK", "0"))
|
||||
assert DistributedInterface.get_world_size() == int(os.getenv("WORLD_SIZE", "1"))
|
||||
assert DistributedInterface.get_local_rank() == int(os.getenv("LOCAL_RANK", "0"))
|
||||
assert DistributedInterface.get_local_world_size() == int(os.getenv("LOCAL_WORLD_SIZE", "1"))
|
||||
|
||||
Reference in New Issue
Block a user