125c7ee38d413e4709271292c473f5930196b137,environments/gym_environment_wrapper.py,GymEnvironmentWrapper,__init__,#GymEnvironmentWrapper#Any#,47
Before Change
self.discrete_controls = type(self.env.action_space) != gym.spaces.box.Box
// pybullet requires rendering before resetting the environment, but other gym environments (Pendulum) will crash
try:
if self.is_rendered:
self.render()
except:
pass
o = self.reset(True)["observation"]
// render
if self.is_rendered:
After Change
self.action_space_abs_range = np.maximum(np.abs(self.action_space_low), np.abs(self.action_space_high))
self.actions = {i: i for i in range(self.action_space_size)}
self.key_to_action = {}
if hasattr(self.env.unwrapped, "get_keys_to_action"):
self.key_to_action = self.env.unwrapped.get_keys_to_action()
// measurements
self.timestep_limit = self.env.spec.timestep_limit
self.measurements_size = len(self.step(0)["info"].keys())
def _update_state(self):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances Project Name: NervanaSystems/coach
Commit Name: 125c7ee38d413e4709271292c473f5930196b137
Time: 2017-12-19
Author: 30383381+itaicaspi-intel@users.noreply.github.com
File Name: environments/gym_environment_wrapper.py
Class Name: GymEnvironmentWrapper
Method Name: __init__
Project Name: tensorflow/transform
Commit Name: 5b2fa49f9ee24bd079ab0c8d5373a3bfcfcc60b4
Time: 2017-03-07
Author: no-reply@google.com
File Name: tensorflow_transform/beam/impl.py
Class Name: _RunMetaGraphDoFn
Method Name: process
Project Name: thenetcircle/dino
Commit Name: 6c35c2137e292e00c3ac3a47eb28fac29424453a
Time: 2018-01-17
Author: oscar.eriks@gmail.com
File Name: dino/validation/request.py
Class Name: RequestValidator
Method Name: on_message