MCPcopy Create free account
hub / github.com/pytorch/examples / __init__

Method __init__

distributed/rpc/batch/reinforce.py:74–78  ·  view source on GitHub ↗
(self, batch=True)

Source from the content-addressed store, hash-verified

72 other applications with much more expensive environment.
73 """
74 def __init__(self, batch=True):
75 self.id = rpc.get_worker_info().id - 1
76 self.env = gym.make('CartPole-v1')
77 self.env.reset(seed=args.seed)
78 self.select_action = Agent.select_action_batch if batch else Agent.select_action
79
80 def run_episode(self, agent_rref, n_steps):
81 r"""

Callers

nothing calls this directly

Calls 1

resetMethod · 0.80

Tested by

no test coverage detected