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

[Bug Report] AtariPreprocessing Wrapper is unavailable #162

Closed
1 task done
sdpkjc opened this issue Nov 27, 2022 · 3 comments
Closed
1 task done

[Bug Report] AtariPreprocessing Wrapper is unavailable #162

sdpkjc opened this issue Nov 27, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@sdpkjc
Copy link
Contributor

sdpkjc commented Nov 27, 2022

Describe the bug

AtariPreprocessing Wrapper does not seem to be available. Probably because of the lack of interfaces, no good solution has been thought of yet.

Code example

import gymnasium as gym

env = gym.make("GymV26Environment-v0", env_id="ALE/Breakout-v5")
env = gym.wrappers.AtariPreprocessing(env, frame_skip=1)

Output:

❯ python a.py
A.L.E: Arcade Learning Environment (version 0.8.0+919230b)
[Powered by Stella]
Traceback (most recent call last):
  File "/Users/zhaoyanxiao/Dev/abcdrl/a.py", line 4, in <module>
    env = gym.wrappers.AtariPreprocessing(env, frame_skip=1)
  File "/Users/zhaoyanxiao/opt/anaconda3/envs/abcdrl/lib/python3.9/site-packages/gymnasium/wrappers/atari_preprocessing.py", line 80, in __init__
    assert env.unwrapped.get_action_meanings()[0] == "NOOP"
AttributeError: 'GymEnvironment' object has no attribute 'get_action_meanings'

System info

pip install
gymnasium0.26.3
python3.9.13
mypy0.991
macOS13.0.1

Additional context

No response

Checklist

  • I have checked that there is no similar issue in the repo
@sdpkjc sdpkjc added the bug Something isn't working label Nov 27, 2022
@sdpkjc sdpkjc changed the title [Bug Report] AtariPreprocessing is unavailable [Bug Report] AtariPreprocessing Wrapper is unavailable Nov 27, 2022
@pseudo-rnd-thoughts
Copy link
Member

Thanks for the issue, that is an interesting problem.

In v0.27, we have solved the atari with pip install shimmy[atari] such that gymnasium.make("ALE/Pong-v5") works.
Could you test this with shimmy and see if the same issues exist.

@sdpkjc
Copy link
Contributor Author

sdpkjc commented Nov 27, 2022

Thank you for your reply. The problem seems to have been resolved after installing shimmy[atari].

import gymnasium as gym

env = gym.make(id="ALE/Breakout-v5")
env = gym.wrappers.AtariPreprocessing(env, frame_skip=1)

There is no error message in this code.


The existence of this problem also seems to indicate that the test code is not perfect, will future versions consider improving this part of the test?

@pseudo-rnd-thoughts
Copy link
Member

Yes, I have opened an issue on this, it should be solved by the next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants