Replies: 1 comment
-
Thanks for raising this! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
In the documentation for the GymEnv class it is stated that it "Works accross gymnasium and OpenAI/gym".
I have built an environment using the farama gymnasium package, that has a nested state space with a Sequence Space inside a Dict Space. Using only the gymnasium API I can easily create a random agent, so the environment itself works.
However, when I try to instantiate the environment via GymEnv, I get the following error message:
File "/.../run_torchrl.py", line 45, in
env = GymEnv('my_env', options=OPTIONS, config_file_path="pq_env_config.ini")
File "/.../.venv/lib/python3.10/site-packages/torchrl/envs/libs/gym.py", line 543, in call
instance: GymWrapper = super().call(*args, **kwargs)
File "/.../.venv/lib/python3.10/site-packages/torchrl/envs/common.py", line 175, in call
instance: EnvBase = super().call(*args, **kwargs)
File "/.../.venv/lib/python3.10/site-packages/torchrl/envs/libs/gym.py", line 1277, in init
super().init(**kwargs)
File "/.../.venv/lib/python3.10/site-packages/torchrl/envs/libs/gym.py", line 731, in init
super().init(**kwargs)
File "/.../.venv/lib/python3.10/site-packages/torchrl/envs/common.py", line 3019, in init
self._make_specs(self._env) # writes the self._env attribute
File "/.../.venv/lib/python3.10/site-packages/torchrl/envs/libs/gym.py", line 946, in _make_specs
action_spec = _gym_to_torchrl_spec_transform(
File "/.../.venv/lib/python3.10/site-packages/torchrl/envs/libs/gym.py", line 361, in _gym_to_torchrl_spec_transform
raise NotImplementedError(
NotImplementedError: spec of type Sequence is currently unaccounted for
Do I interpret this error correctly in the sense, that sequence spaces are currently not supported by torchRL?
Because this would be the main reason currently for me to move away from stable-baselines3 because they also don't support these kind of spaces.
Thank you already in advance for helping me with this clarification
best,
Sebastian
Beta Was this translation helpful? Give feedback.
All reactions