def test_vecenv_parallel(self): """ Tests working of parallel VecEnvs """ env = VectorEnv("CartPole-v1", 2, parallel=True) env.seed(0) observation_space, action_space = env.get_spaces() env.reset() env.step(env.sample()) env.close()
def test_vecenv_serial(self): """ Tests working of serial VecEnvs """ env = VectorEnv("CartPole-v1", 2, parallel=False) env.seed(0) ob, ac = env.observation_spaces, env.action_spaces env.reset() env.step(env.sample()) env.close()