MCPcopy Create free account
hub / github.com/TEA-Lab/TwoByTwo / setup

Function setup

src/script/our_eval.py:34–38  ·  view source on GitHub ↗
(rank, world_size, cfg)

Source from the content-addressed store, hash-verified

32reset = '\033[0m'
33
34def setup(rank, world_size, cfg):
35 os.environ['MASTER_ADDR'] = 'localhost'
36 os.environ['MASTER_PORT'] = '52997'
37 dist.init_process_group("nccl", rank=rank, world_size=world_size)
38 torch.cuda.set_device(rank)
39
40def cleanup():
41 dist.destroy_process_group()

Callers 1

trainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected