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:
Use env.unwrapped when arguments to seed are given
Disable the OrderEnforcing wrapper. This will break NLE when using earlier versions of the gym library unless we do per-version magic (as in this PR). We cannot test for the presence of OrderEnforcing as it's not exported into gym.wrappers (sigh).
Adhere to the gym environment better by doing seed(self, (core, disp, reseed)) instead of seed(self, core=None, disp=None, reseed=False).
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.
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.
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 togym.Wrapper.seed
. Possible fixes:env.unwrapped
when arguments toseed
are givenOrderEnforcing
wrapper. This will break NLE when using earlier versions of the gym library unless we do per-version magic (as in this PR). We cannot test for the presence ofOrderEnforcing
as it's not exported intogym.wrappers
(sigh).seed(self, (core, disp, reseed))
instead ofseed(self, core=None, disp=None, reseed=False)
.We also use
env._actions
a bunch of times, in tests and inplay.py
. We should fix that, and other accesses to_underscored
variables.