MCPcopy Create free account
hub / github.com/MiniMax-AI/VTP / fix_random_seeds

Function fix_random_seeds

vtp/models/utils/utils.py:76–83  ·  view source on GitHub ↗

Fix random seeds.

(seed: int = 31)

Source from the content-addressed store, hash-verified

74
75
76def fix_random_seeds(seed: int = 31):
77 """
78 Fix random seeds.
79 """
80 torch.manual_seed(seed)
81 torch.cuda.manual_seed_all(seed)
82 np.random.seed(seed)
83 random.seed(seed)
84
85
86def get_sha() -> str:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected