[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
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
[X] I have checked that there is no similar issue in the repo
🐛 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 orenv.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