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

env.step API updated in gym 0.25.0 #726

Closed
4 of 7 tasks
bitsandscraps opened this issue Aug 13, 2022 · 5 comments · Fixed by #748
Closed
4 of 7 tasks

env.step API updated in gym 0.25.0 #726

bitsandscraps opened this issue Aug 13, 2022 · 5 comments · Fixed by #748
Labels
enhancement Feature that is not a new algorithm or an algorithm enhancement

Comments

@bitsandscraps
Copy link

  • I have marked all applicable categories:
    • exception-raising bug
    • RL algorithm bug
    • documentation request (i.e. "X is missing from the documentation.")
    • new feature request
  • I have visited the source website
  • I have searched through the issue tracker for duplicates
  • [] I have mentioned version numbers, operating system and environment, where applicable:
    import tianshou, gym, torch, numpy, sys
    print(tianshou.__version__, gym.__version__, torch.__version__, numpy.__version__, sys.version, sys.platform)

Gym 0.25.0 introduced a new step API that returns a tuple of length 5(observation, reward, terminated, truncated, info) instead of 4(observation, reward, done, info).
I think tianshou's setup.py should restrict the gym version to <= 0.24.1 until it supports the new API.

@Trinkle23897
Copy link
Collaborator

As long as openai/gym#3019 is not merged, it's okay not to restrict the gym version.

@Trinkle23897 Trinkle23897 added the enhancement Feature that is not a new algorithm or an algorithm enhancement label Aug 13, 2022
@bitsandscraps
Copy link
Author

My bad. The new version of gym prints warnings when calling gym.make without setting the new_step_api to True, though.

@pseudo-rnd-thoughts
Copy link

In gym version 0.25, we have implemented the new termination truncation step api which will raise a warning if users use the old done step api (which is turned on by default). However, v0.25 should be completely backwards compatible.

We are planning on removing default support for the old done step API in v0.26 (the planned release is the next week). To use the old step API, we provide a conversion function and wrapper for users if they need it.

@YouJiacheng
Copy link

YouJiacheng commented Sep 8, 2022

@Trinkle23897 Now gym#3019 merged. Maybe restrict <= 0.25.2

@pseudo-rnd-thoughts
Copy link

I believe that @Markus28 is planning on making a v26 upgrade for Tianshou

@Trinkle23897 Trinkle23897 linked a pull request Oct 26, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature that is not a new algorithm or an algorithm enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants