MCPcopy Create free account
hub / github.com/HobbitLong/PyContrast / main

Function main

pycontrast/main_linear.py:17–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15
16
17def main():
18 args = TestOptions().parse()
19
20 args.distributed = args.world_size > 1 or args.multiprocessing_distributed
21 ngpus_per_node = torch.cuda.device_count()
22
23 if args.multiprocessing_distributed:
24 args.world_size = ngpus_per_node * args.world_size
25 mp.spawn(main_worker, nprocs=ngpus_per_node, args=(ngpus_per_node, args))
26 else:
27 raise NotImplementedError('Currently only DDP training')
28
29
30def main_worker(gpu, ngpus_per_node, args):

Callers 1

main_linear.pyFile · 0.70

Calls 2

TestOptionsClass · 0.90
parseMethod · 0.80

Tested by

no test coverage detected