facebookresearch / nle

The NetHack Learning Environment
Other
939 stars 114 forks source link

Alternative fix for gym 0.21 changes. #271

Closed heiner closed 2 years ago

heiner commented 2 years ago

This is an alternative to https://github.com/facebookresearch/nle/pull/269 to fix #272.


The most recent version of gym wraps environments with the OrderEnforcing wrapper (https://github.com/openai/gym/blob/master/docs/wrappers.md) if not disabled. This breaks our tests, play.py and a number of other places. For instance, env.seed() with more than 1 argument now also fails due to gym.Wrapper.seed. Possible fixes:

We also use env._actions a bunch of times, in tests and in play.py. We should fix that, and other accesses to _underscored variables.

cdmatters commented 2 years ago

I prefer this fix over #269 since the change is localised, and doesnt change behaviour for end users who chose to build on this. We should fix this properly later.