mirror of
https://github.com/wassname/ray.git
synced 2026-06-28 20:56:34 +08:00
[rllib] Fix bounds of space returned by preprocessor.observation_space (#4736)
This commit is contained in:
@@ -73,7 +73,11 @@ class Preprocessor(object):
|
||||
@property
|
||||
@PublicAPI
|
||||
def observation_space(self):
|
||||
obs_space = gym.spaces.Box(-1.0, 1.0, self.shape, dtype=np.float32)
|
||||
obs_space = gym.spaces.Box(
|
||||
np.finfo(np.float32).min,
|
||||
np.finfo(np.float32).max,
|
||||
self.shape,
|
||||
dtype=np.float32)
|
||||
# Stash the unwrapped space so that we can unwrap dict and tuple spaces
|
||||
# automatically in model.py
|
||||
if (isinstance(self, TupleFlatteningPreprocessor)
|
||||
|
||||
Reference in New Issue
Block a user