MCPcopy Create free account
hub / github.com/MARIO-Math-Reasoning/Super_MARIO / set_seed

Function set_seed

mcts_math/solver.py:35–45  ·  view source on GitHub ↗
(seed: int = 1024)

Source from the content-addressed store, hash-verified

33
34
35def set_seed(seed: int = 1024) -> None:
36 np.random.seed(seed)
37 random.seed(seed)
38 torch.manual_seed(seed)
39 torch.cuda.manual_seed(seed)
40 # When running on the CuDNN backend, two further options must be set
41 torch.backends.cudnn.deterministic = True
42 torch.backends.cudnn.benchmark = False
43 # Set a fixed value for the hash seed
44 os.environ["PYTHONHASHSEED"] = str(seed)
45 # logger.info(f"Random seed set as {seed}")
46
47
48class Solver(BaseModel):

Callers 1

create_llmMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected