Farama-Foundation / Minigrid

Simple and easily configurable grid world environments for reinforcement learning
https://minigrid.farama.org/
Other
2.09k stars 604 forks source link

use new step API, and solve some pylance errors #204

Closed saleml closed 2 years ago

saleml commented 2 years ago

Description

This PR utilizes the new step API of gym (introduced in version 0.25). Whenever gym.make is called, the argument new_step_api=True is passed.

Type of change

Checklist:

pseudo-rnd-thoughts commented 2 years ago

Personally, I would like to make a full release that works with the old step API for users that want to use gym up to v0.26 Therefore, I wish to merge this later

pseudo-rnd-thoughts commented 2 years ago

The changes look good To fix the CI, I think it needs to be pytest.warns([]) if there are no warnings Secondly, in v0.26 of gym (not released), we can most likely changing the name of gym.make(..., new_step_api=True) to gym.make(..., apply_step_compatibility=False).

As gym v0.26 is aiming to be released next week (hopefully), then Im hoping to merge this just after to be compatible with it Are you good with that?