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

Gymnasium support #192

Draft
wants to merge 30 commits into
base: master
Choose a base branch
from

Conversation

prabhatnagarajan
Copy link
Contributor

@prabhatnagarajan prabhatnagarajan commented Feb 6, 2024

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

README.md Outdated
@@ -30,7 +30,7 @@ Refer to [Installation](http://pfrl.readthedocs.io/en/latest/install.html) for m

## 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
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

@@ -4,8 +4,8 @@
# Prevent numpy from using multiple threads
os.environ["OMP_NUM_THREADS"] = "1"

import gym # NOQA:E402
import gym.wrappers # NOQA:E402
import gymnasium # NOQA:E402
Copy link
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
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
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
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.

None yet

3 participants