582c3c56ffc3b60f0b371c77aec170a6b7aa7210,tests/garage/envs/test_stack_frames_env.py,TestStackFrames,setUp,#TestStackFrames#,14
Before Change
@overrides
def setUp(self):
self.shape = (50, 50)
self.env = mock.Mock()
self.env.observation_space = Box(
low=0, high=255, shape=self.shape, dtype=np.uint8)
self.env.reset.return_value = np.zeros(self.shape)
self.env.step.side_effect = self._step
self._n_frames = 4
self.env_s = StackFrames(self.env, n_frames=self._n_frames)
self.obs = self.env.reset()
self.obs_s = self.env_s.reset()
self.frame_width = self.env.observation_space.shape[0]
self.frame_height = self.env.observation_space.shape[1]
After Change
self.env_s = TfEnv(
StackFrames(
DummyDiscrete2DEnv(random=False), n_frames=self.n_frames))
self.width, self.height = self.env.observation_space.shape
def test_stack_frames_invalid_environment_type(self):
with self.assertRaises(ValueError):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: rlworkgroup/garage
Commit Name: 582c3c56ffc3b60f0b371c77aec170a6b7aa7210
Time: 2019-01-16
Author: ahtsans@gmail.com
File Name: tests/garage/envs/test_stack_frames_env.py
Class Name: TestStackFrames
Method Name: setUp
Project Name: oval-group/logger
Commit Name: 6644369db2fe27dad2c0c88388b861aafb1baafd
Time: 2017-11-06
Author: leonardbj@hotmail.fr
File Name: examples/example.py
Class Name:
Method Name:
Project Name: ray-project/ray
Commit Name: ce96b03b07a4a4bdd851aa84493c616cd291aff2
Time: 2020-10-06
Author: sven@anyscale.io
File Name: rllib/examples/env/mbmpo_env.py
Class Name:
Method Name:
Project Name: rlworkgroup/garage
Commit Name: 582c3c56ffc3b60f0b371c77aec170a6b7aa7210
Time: 2019-01-16
Author: ahtsans@gmail.com
File Name: tests/garage/envs/test_stack_frames_env.py
Class Name: TestStackFrames
Method Name: setUp