c60fbc4da1b0b1732d8a4e15f6a60c48251150b4,torch_rl/torch_rl/utils/penv.py,ParallelEnv,step,#ParallelEnv#Any#,49
Before Change
if self.unique_env:
obs, reward, done, info = self.env.step(actions[0])
if done:
obs = self.env.reset()
return zip(*[(obs, reward, done, info)])
else:
for local, action in zip(self.locals, actions):
local.send(("step", action))
After Change
local.send(("step", action))
obs, reward, done, info = self.envs[0].step(actions[0])
if done:
obs = self.envs[0].reset()
results = zip(*[(obs, reward, done, info)] + [local.recv() for local in self.locals])
return results
def render(self):
raise NotImplementedError
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances
Project Name: lcswillems/torch-rl
Commit Name: c60fbc4da1b0b1732d8a4e15f6a60c48251150b4
Time: 2018-06-11
Author: lcswillems@gmail.com
File Name: torch_rl/torch_rl/utils/penv.py
Class Name: ParallelEnv
Method Name: step
Project Name: facebookresearch/Horizon
Commit Name: 75dff38e70ec291fbd60382174277fcadddfd285
Time: 2020-06-10
Author: jialiu@fb.com
File Name: reagent/ope/estimators/contextual_bandits_estimators.py
Class Name: IPSEstimator
Method Name: evaluate
Project Name: UFAL-DSG/tgen
Commit Name: 33c643f35b2ce194f5b092bb81994a9668a02a8d
Time: 2014-10-31
Author: odusek@ufal.mff.cuni.cz
File Name: tgen/rank.py
Class Name: PerceptronRanker
Method Name: _training_iter
Project Name: kengz/SLM-Lab
Commit Name: 7cc03d11a38866203f1d3dbdf40d6888ed4c9a7f
Time: 2019-01-05
Author: kengzwl@gmail.com
File Name: slm_lab/agent/memory/onpolicy.py
Class Name: OnPolicySeqBatchReplay
Method Name: sample