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

Gym fixes - Follow up from #705 #734

Merged
merged 41 commits into from
Feb 4, 2022
Merged

Conversation

carlosluis
Copy link
Contributor

@carlosluis carlosluis commented Jan 22, 2022

Description

This is a follow-up from #705, to make it merge-able and move forward

Closes #674

Motivation and Context

Update to new gym version, some fixes were required.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Documentation (update in the documentation)

Checklist:

  • I've read the CONTRIBUTION guide (required)
  • I have updated the changelog accordingly (required).
  • My change requires a change to the documentation.
  • I have updated the tests accordingly (required for a bug fix or a new feature).
  • I have updated the documentation accordingly.
  • I have reformatted the code using make format (required)
  • I have checked the codestyle using make check-codestyle and make lint (required)
  • I have ensured make pytest and make type both pass. (required)
  • I have checked that the documentation builds using make doc (required)

Note: You can run most of the checks using make commit-checks.

Note: we are using a maximum length of 127 characters per line

Changelist

  • Merged master
  • Fixed a failing test
  • Added suggestion from @vwxyzjn to include autorom in setup.py (see comment)

TODOs

  • AFAIK, the remaining changes are in docs as pointed by @araffin:

doc/tutorial need to be updated too (see comment #572 (comment)")

all of which live in other repos. Are there any remaining docs that need updating in this repo?

@araffin araffin added the Maintainers on vacation Maintainers are on vacation so they can recharge their batteries, we will be back soon ;) label Jan 22, 2022
@jkterry1 jkterry1 mentioned this pull request Jan 28, 2022
10 tasks
@Miffyli Miffyli deleted the branch DLR-RM:master February 4, 2022 00:56
@Miffyli Miffyli closed this Feb 4, 2022
@AdamGleave
Copy link
Collaborator

I think closing this was a side-effect of deleting the branch, I'm going to reopen and try to rebase

@AdamGleave AdamGleave reopened this Feb 4, 2022
@AdamGleave AdamGleave changed the base branch from blacken to master February 4, 2022 00:58
@Miffyli
Copy link
Collaborator

Miffyli commented Feb 4, 2022

👀 ok no more git-gymnastics for me at 3am. I have no idea how this happened...
image

@AdamGleave
Copy link
Collaborator

AdamGleave commented Feb 4, 2022

eyes ok no more git-gymnastics for me at 3am. I have no idea how this happened... image

I think this is a GitHub bug! What I saw earlier was that you deleted blacken (as a result of merging the PR). I do not know why GitHub now thinks you deleted master :)

@carlosluis
Copy link
Contributor Author

Sorry this PR took a while to review @carlosluis, will you have the time to make these other changes in the next week or so? If not I'll see if I can triage it to someone else.

Hey @AdamGleave thanks for reviewing, I'm a bit swamped right now and won't have time to look at this until probably late next week or beginning of the week after. So in the interest of getting it merged, it would be great if you find someone in the mean time to finish it up!

Copy link
Collaborator

@AdamGleave AdamGleave left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, will merge once tests pass

@AdamGleave
Copy link
Collaborator

@jkterry1
Copy link
Contributor

jkterry1 commented Feb 5, 2022

@AdamGleave why did you downgrade from the newest version of Atari environments? v5 has some extraordinarily large upgrades, see https://brosa.ca/blog/ale-release-v0.7

@AdamGleave
Copy link
Collaborator

AdamGleave commented Feb 5, 2022

@AdamGleave why did you downgrade from the newest version of Atari environments? v5 has some extraordinarily large upgrades, see https://brosa.ca/blog/ale-release-v0.7

There is some discussion of this in #734 (comment) and araffin expressed some concerns in #572 (comment)

araffin can add his own thoughts but my desiderata before upgrading would be:

  1. Not expecting any other major upstream changes. Update to newest Gym version #572 (comment) shows there were changes happening as little as six weeks ago. People are free to use v5 environments in their code, but what we use as defaults and as test cases should be a stable target, so may make sense to wait a bit.
  2. Benchmarks to show there aren't performance regressions on these new environments, or if there are to verify this is working as intended (e.g. because sticky action makes them harder, etc).

I do think there are significant improvements in v5 and appreciate your & @JesseFarebro's work implementing these and simplifying Gym. But that upgrade seems better dealt with in a new PR (which you're welcome to open), whereas us lagging behind a stable release of a key dependency is more urgent to fix.

@@ -116,7 +116,7 @@
# For render
"opencv-python",
# For atari games,
"atari_py==0.2.6",
"gym[atari,accept-rom-license]>=0.21",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this doesn't work (I remember testing it in the past), we should put autorom with accept license here

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just tested it and it seems to work OK:

virtualenv test_venv
. ./test_venv/bin/activate
pip install -e .[extra]

then:

$ python -c 'import gym; gym.make("BreakoutNoFrameSkip-v4")'
A.L.E: Arcade Learning Environment (version 0.7.4+069f8bd)
[Powered by Stella]

IIRC it fails on some very old pip versions that don't support backtracking. I tested on pip 20.3.4 and Python 3.9, but I'm pretty sure it works on older versions (there's some discussion about this in the review).

@@ -73,7 +73,7 @@
packages=[package for package in find_packages() if package.startswith("stable_baselines3")],
package_data={"stable_baselines3": ["py.typed", "version.txt"]},
install_requires=[
"gym>=0.17,<0.20", # gym 0.20 breaks atari-py behavior
"gym>=0.21", # Remember to also update gym version in "extra" below when this changes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would probably fixed the version until #780 is ready

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gym 0.21.0 support
7 participants