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]: Is sb3_contrib/common/maskable/utils.py the cause of "WARN: env.action_masks to get variables from other wrappers is deprecated and will be removed in v1.0"? #256

Open
4 tasks done
mkbg8 opened this issue Aug 21, 2024 · 1 comment
Labels
custom gym env Issue related to Custom Gym Env enhancement New feature or request

Comments

@mkbg8
Copy link

mkbg8 commented Aug 21, 2024

🐛 Bug

This might be an issue which could cause problems in the future I guess. As far as I can see utils.py has been last touched 4y ago.

When running training on an InvalidActionEnvDiscrete-based environment I get this:

/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/gymnasium/core.py:311: UserWarning: WARN: env.action_masks to get variables from other wrappers is deprecated and will be removed in v1.0, to get this variable you can do env.unwrapped.action_masks for environment variables or env.get_wrapper_attr('action_masks') that will search the reminding wrappers.

To Reproduce

I have a minimal env inheriting from InvalidActionEnvDiscrete, which defines/implements action_masks. The above warning is given by Gymnasium when training.

Relevant log output / Error message

No response

System Info

installed with pip, everything up-to-date (2.4.0.a8). gym is @ 0.26.2 and gymnasium @ 0.29.1

Checklist

@mkbg8 mkbg8 added the bug Something isn't working label Aug 21, 2024
@araffin araffin added custom gym env Issue related to Custom Gym Env enhancement New feature or request and removed bug Something isn't working labels Aug 21, 2024
@araffin
Copy link
Member

araffin commented Aug 21, 2024

Related to DLR-RM/stable-baselines3#1837

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
custom gym env Issue related to Custom Gym Env enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants