b71152eea0470ac2629c33e0fc66a54fe494949f,baselines/common/vec_env/dummy_vec_env.py,DummyVecEnv,step_wait,#DummyVecEnv#,15

Before Change


        self.actions = actions

    def step_wait(self):
        results = [env.step(a) for (a,env) in zip(self.actions, self.envs)]
        obs, rews, dones, infos = map(np.array, zip(*results))
        self.ts += 1
        for (i, done) in enumerate(dones):
            if done: 
                obs[i] = self.envs[i].reset()

After Change


    def step_wait(self):
        for i in range(self.num_envs):
            obs_tuple, self.buf_rews[i], self.buf_dones[i], self.buf_infos[i] = self.envs[i].step(self.actions[i])
            if isinstance(obs_tuple, (tuple, list)):
                for t,x in enumerate(obs_tuple):
                    self.buf_obs[t][i] = x
            else:
                self.buf_obs[0][i] = obs_tuple
        return self.buf_obs, self.buf_rews, self.buf_dones, self.buf_infos

    def reset(self):        
        for i in range(self.num_envs):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: openai/baselines
Commit Name: b71152eea0470ac2629c33e0fc66a54fe494949f
Time: 2018-02-26
Author: matthiasplappert@me.com
File Name: baselines/common/vec_env/dummy_vec_env.py
Class Name: DummyVecEnv
Method Name: step_wait


Project Name: openai/baselines
Commit Name: 6c44fb28fecdb666182e2951b7b1cbe9cf198ff1
Time: 2018-12-19
Author: peterzhokhoff@gmail.com
File Name: baselines/her/rollout.py
Class Name: RolloutWorker
Method Name: generate_rollouts


Project Name: Kaixhin/Rainbow
Commit Name: 5ec418e8146079d6797bb15b0f5e777862815df6
Time: 2018-05-07
Author: design@kaixhin.com
File Name: env.py
Class Name: Env
Method Name: reset