MCPcopy Index your code
hub / github.com/lazyprogrammer/machine_learning_examples / _thunk

Function _thunk

rl3/a2c/main.py:35–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33def train(env_id, num_timesteps, num_cpu):
34 def make_env(rank):
35 def _thunk():
36 env = make_atari(env_id)
37 env.seed(SEED + rank)
38 gym.logger.setLevel(logging.WARN)
39 env = wrap_deepmind(env)
40
41 # wrap the env one more time for getting total reward
42 env = Monitor(env, rank)
43 return env
44 return _thunk
45
46 env = SubprocVecEnv([make_env(i) for i in range(num_cpu)])

Callers

nothing calls this directly

Calls 3

make_atariFunction · 0.90
wrap_deepmindFunction · 0.90
MonitorClass · 0.90

Tested by

no test coverage detected