[rllib]State input's shape about custom env based on gym's env #10024
Labels
enhancement
Request for new feature and/or capability
P3
Issue moderate in impact or severity
question
Just a question :)
What is your question?
I've created a custom env, which basically looks like this.
The problem is, when I wrote
reset
like this, line 375 in modelv2.py :_unpack_obs(obs, obs_space.original_space, tensorlib=tensorlib)
gave out :reshape(): argument 'shape' must be tuple of ints, but found element of type tuple at pos 2
. Later I've found out that I need to add anewaxis
for ndarray. So I addeda = a[np.newaxis, :]
andb = b[np.newaxis, :]
inreset
.However, after doing this, it goes wrong again on line 60 in preprocessors.py :
if not self._obs_space.contains(observation)
, which isObservation outside expected value range
( I'm assure it's not because the absolute value in theBox
). I got intoself._obs_space.contains(observation)
in tuple.py and found out that the problem occurred on line 28 :space.contains(part) for (space,part) in zip(self.spaces,x)
, which returns[True, False]
.I'm a new gay for gym and rllib, and I'm a little confused about the input. Is there any suggestion? Thanks.
Ray version and other system information (Python version, TensorFlow version, OS):
Ray: 0.8.6; Python 3.8.5; PyTorch 1.6.0; Windows 10 2004
The text was updated successfully, but these errors were encountered: