f2a7ac7952dfd93abdfdb3a2e1dbed96066ab191,catalyst/rl/environment/gym.py,GymWrapper,_prepare_spaces,#GymWrapper#,48
Before Change
return np.concatenate(
self._history_len * [np.expand_dims(np_array, 0)], axis=0)
if isinstance(self._observation_space, spaces.Box):
self._state_space = spaces.Box(
low=_expand_to_history_len(self._observation_space.low),
high=_expand_to_history_len(self._observation_space.high),
// shape=(self._history_len,) + self._observation_space.shape,
dtype=self._observation_space.dtype
)
else:
raise NotImplementedError("not yet implemented")
def reset(self):
return self.env.reset()
def step(self, action):
After Change
self._observation_space = self.env.observation_space
self._action_space = self.env.action_space
self._state_space = extend_space(
self._observation_space, self._history_len)
def reset(self):
return self.env.reset()
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 24
Instances
Project Name: Scitator/catalyst
Commit Name: f2a7ac7952dfd93abdfdb3a2e1dbed96066ab191
Time: 2019-06-25
Author: scitator@gmail.com
File Name: catalyst/rl/environment/gym.py
Class Name: GymWrapper
Method Name: _prepare_spaces
Project Name: Scitator/catalyst
Commit Name: f2a7ac7952dfd93abdfdb3a2e1dbed96066ab191
Time: 2019-06-25
Author: scitator@gmail.com
File Name: examples/atari/src/env.py
Class Name: AtariEnvWrapper
Method Name: _prepare_spaces
Project Name: catalyst-team/catalyst
Commit Name: f2a7ac7952dfd93abdfdb3a2e1dbed96066ab191
Time: 2019-06-25
Author: scitator@gmail.com
File Name: catalyst/rl/environment/gym.py
Class Name: GymWrapper
Method Name: _prepare_spaces