Skip to content
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

Issue with OpenAI Gym spaces #57

Open
isaacncz opened this issue Apr 15, 2022 · 1 comment
Open

Issue with OpenAI Gym spaces #57

isaacncz opened this issue Apr 15, 2022 · 1 comment

Comments

@isaacncz
Copy link

isaacncz commented Apr 15, 2022

i tried loading in both MIR and UR environment to Stable Baseline3. It seems like the library wasn't able to iterate the observation_space.spaces.items(). Looking for help from anyone experience with this issue

[File ~/.local/lib/python3.8/site-packages/stable_baselines3/common/torch_layers.py:256, in CombinedExtractor.__init__(self, observation_space, cnn_output_dim) ]()[253](file:///home/isaac/.local/lib/python3.8/site-packages/stable_baselines3/common/torch_layers.py?line=252)[ extractors = {} ]()[255](file:///home/isaac/.local/lib/python3.8/site-packages/stable_baselines3/common/torch_layers.py?line=254)[ total_concat_size = 0 --> ]()[256](file:///home/isaac/.local/lib/python3.8/site-packages/stable_baselines3/common/torch_layers.py?line=255)[ for key, subspace in observation_space.spaces.items(): ]()[257](file:///home/isaac/.local/lib/python3.8/site-packages/stable_baselines3/common/torch_layers.py?line=256)[ if is_image_space(subspace): ]()[258](file:///home/isaac/.local/lib/python3.8/site-packages/stable_baselines3/common/torch_layers.py?line=257) extractors[key] = NatureCNN(subspace, features_dim=cnn_output_dim) [AttributeError: 'Box' object has no attribute 'spaces']()

@Alvin-shao
Copy link

我尝试在 MIR 和 UR 环境中加载到稳定基线 3。似乎库无法迭代observation_space.spaces.items()。向遇到此问题的任何人寻求帮助

[File ~/.local/lib/python3.8/site-packages/stable_baselines3/common/torch_layers.py:256, in CombinedExtractor.__init__(self, observation_space, cnn_output_dim) ]()[253](file:///home/isaac/.local/lib/python3.8/site-packages/stable_baselines3/common/torch_layers.py?line=252)[ extractors = {} ]()[255](file:///home/isaac/.local/lib/python3.8/site-packages/stable_baselines3/common/torch_layers.py?line=254)[ total_concat_size = 0 --> ]()[256](file:///home/isaac/.local/lib/python3.8/site-packages/stable_baselines3/common/torch_layers.py?line=255)[ for key, subspace in observation_space.spaces.items(): ]()[257](file:///home/isaac/.local/lib/python3.8/site-packages/stable_baselines3/common/torch_layers.py?line=256)[ if is_image_space(subspace): ]()[258](file:///home/isaac/.local/lib/python3.8/site-packages/stable_baselines3/common/torch_layers.py?line=257) extractors[key] = NatureCNN(subspace, features_dim=cnn_output_dim) [AttributeError: 'Box' object has no attribute 'spaces']()

Hello, do you want to use the HER algorithm in SB3? I have also encountered this problem and it seems that there is no way to solve it.

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

2 participants