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

Method step

rl3/a2c/subproc_vec_env.py:72–82  ·  view source on GitHub ↗
(self, actions)

Source from the content-addressed store, hash-verified

70 self.env_id = self.remotes[0].recv()
71
72 def step(self, actions):
73 for remote, action in zip(self.remotes, actions):
74 remote.send(('step', action))
75 results = [remote.recv() for remote in self.remotes]
76 obs, rews, dones, infos = zip(*results)
77 # print("Infos:", infos)
78 # for done, info in zip(dones, infos):
79 # if done:
80 # # print("Total reward:", info['reward'], "Num steps:", info['episode_length'])
81 # print("Returned info:", info, "Done:", done)
82 return np.stack(obs), np.stack(rews), np.stack(dones), infos
83
84 def reset(self):
85 for remote in self.remotes:

Callers 1

workerFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected