Skip to content

Gymnasium support#192

Draft
prabhatnagarajan wants to merge 32 commits into
pfnet:masterfrom
prabhatnagarajan:gymnasium_support
Draft

Gymnasium support#192
prabhatnagarajan wants to merge 32 commits into
pfnet:masterfrom
prabhatnagarajan:gymnasium_support

Conversation

@prabhatnagarajan

@prabhatnagarajan prabhatnagarajan commented Feb 6, 2024

Copy link
Copy Markdown
Contributor

This Pull request is a work in progress branch for supporting gymnasium in lieu of gym.

Todo/testing items:

  • Check all example files run
  • Add unit tests to experiments for testing truncation
  • Confirm unit tests pass
  • Wrap existing gym environment examples into Gymnasium
  • Deprecate older examples

The plan is to deprecate the following examples. I will keep the examples in the repository with a deprecated notice in the README

In particular, I would like to deprecate the crossed out items below.

  • atlas: training an Atlas robot to walk
  • grasping: examples for a Bullet-based robotic grasping environment
  • slimevolley: example Rainbow implementation for Slime Volleyball

Comment thread README.md Outdated
## Getting started

You can try [PFRL Quickstart Guide](examples/quickstart/quickstart.ipynb) first, or check the [examples](examples) ready for Atari 2600 and Open AI Gym.
You can try [PFRL Quickstart Guide](examples/quickstart/quickstart.ipynb) first, or check the [examples](examples) ready for Atari 2600 and Open AI gymnasium.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This should be Farama Foundation's gymnasium


import gym # NOQA:E402
import gym.wrappers # NOQA:E402
import gymnasium # NOQA:E402

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not familiar with gymnasium much, but is it recommended to write import gymnasium as gym?
Do you know any article about coding convention of gymnasium?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure. The examples they give often write what you have, but I think it's just to sell the simplicity of their transition from gym to gymnasium. I also think the distinction can help for clarity, so people are reminded which API is being used.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hmm it does seem even internally in their code they use gym as you say.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks. Anyway I agree with your opinion:

the distinction can help for clarity

@prabhatnagarajan prabhatnagarajan marked this pull request as draft April 11, 2024 08:59
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.

3 participants