MCPcopy Create free account
hub / github.com/rlcode/reinforcement-learning / seed_all

Function seed_all

4-atari-hard/env.py:52–56  ·  view source on GitHub ↗

Seed python / numpy / torch for reproducibility (MPS is not bit-exact).

(seed)

Source from the content-addressed store, hash-verified

50# ---------------------------------------------------------------------------
51
52def seed_all(seed):
53 """Seed python / numpy / torch for reproducibility (MPS is not bit-exact)."""
54 random.seed(seed)
55 np.random.seed(seed)
56 torch.manual_seed(seed)
57
58
59def _atomic_save(state, path):

Callers 1

1-ppo-rnd.pyFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected