Skip to content

Obs and obs space mismatch for all scenarios #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
heng2j opened this issue Mar 5, 2022 · 1 comment
Open

Obs and obs space mismatch for all scenarios #4

heng2j opened this issue Mar 5, 2022 · 1 comment

Comments

@heng2j
Copy link

heng2j commented Mar 5, 2022

Hi @janblumenkamp and @matteobettini ,

I checkout code and installed according to README.md with older version of Ray 1.3.0 and its' dependencies. When trained with recommended commands i.e. train_policy coverage -t 20 . I got he following obs to ob space mismatches.

Can you advise?

Here are the extracts of the error log from ray tune:

  File "/heng/env/miniconda3/envs/ac_env/lib/python3.7/site-packages/ray/rllib/models/preprocessors.py", line 257, in transform
    self.check_shape(observation)
  File "/heng/env/miniconda3/envs/ac_env/lib/python3.7/site-packages/ray/rllib/models/preprocessors.py", line 68, in check_shape
    observation, self._obs_space)
ValueError: ('Observation ({}) outside given space ({})!', {'agents': ({'map': array([[[0, 0],
        [0, 0],
        [0, 0],
        [0, 0],
        [0, 0],
        [0, 0],
        [0, 0],
        [0, 0],
        [0, 0],
        [0, 0],
        [0, 0],
        [0, 0],
        [1, 0],
        [1, 0],
        [1, 0],
        [1, 0]],
...

 Dict(agents:Tuple(Dict(map:Box(0.0, inf, (16, 16, 2), float32), pos:Box(0, 24, (2,), int64)), Dict(map:Box(0.0, inf, (16, 16, 2), float32), pos:Box(0, 24, (2,), int64)), Dict(map:Box(0.0, inf, (16, 16, 2), float32), pos:Box(0, 24, (2,), int64)), Dict(map:Box(0.0, inf, (16, 16, 2), float32), pos:Box(0, 24, (2,), int64)), Dict(map:Box(0.0, inf, (16, 16, 2), float32), pos:Box(0, 24, (2,), int64)), Dict(map:Box(0.0, inf, (16, 16, 2), float32), pos:Box(0, 24, (2,), int64))), gso:Box(-inf, inf, (6, 6), float32), state:Box(0.0, 2.0, (24, 24, 4), float32)))

Thank you,
Heng

@heng2j
Copy link
Author

heng2j commented Mar 5, 2022

Looks like the issue can only be resolved if we roll back gym version to 0.17.3 as mentioned in rllib_differentiable_comms .

Therefore, I recommend that until refactor the code to use the latest OpenAi gym, please update requirements.txt to pin the version of gym to 0.17.3

@heng2j heng2j closed this as completed Mar 6, 2022
@heng2j heng2j reopened this Mar 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant