MCPcopy Create free account
hub / github.com/OpenDriveLab/ReSim / pytorch_worker_seed

Function pytorch_worker_seed

sat/sgm/webds.py:45–48  ·  view source on GitHub ↗

Compute a distinct, deterministic RNG seed for each worker and node.

(group=None)

Source from the content-addressed store, hash-verified

43
44
45def pytorch_worker_seed(group=None):
46 """Compute a distinct, deterministic RNG seed for each worker and node."""
47 rank, world_size, worker, num_workers = pytorch_worker_info(group=group)
48 return rank * 1000 + worker
49
50
51def worker_seed_sat(group=None, seed=0):

Callers 1

worker_seed_satFunction · 0.70

Calls 1

pytorch_worker_infoFunction · 0.70

Tested by

no test coverage detected