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

Add back long description to setup #243

Merged
merged 1 commit into from
Jan 6, 2023
Merged

Add back long description to setup #243

merged 1 commit into from
Jan 6, 2023

Conversation

jjshoots
Copy link
Member

@jjshoots jjshoots commented Jan 6, 2023

Description

Long description was removed from the setup.py to toml change earlier, this PR adds it back.

@pseudo-rnd-thoughts pseudo-rnd-thoughts merged commit 0ececee into Farama-Foundation:main Jan 6, 2023
@XuehaiPan
Copy link
Contributor

The pyproject.toml uses project.readme to specify the long description: https://peps.python.org/pep-0621/#readme

readme = "README.md"

We no longer need long_description and long_description_content_type in setup.py.

You can check that with/without long_description, python3 -m build produces the same wheel file with the same METADATA.

python3 -m build --wheel
cd dist
unzip gymnasium-0.27.0-py3-none-any.whl
cat gymnasium-0.27.0.dist-info/METADATA
METADATA

Metadata-Version: 2.1
Name: gymnasium
Version: 0.27.0
Summary: A standard API for reinforcement learning and a diverse set of reference environments (formerly Gym).
Author-email: Farama Foundation [email protected]
License: MIT License
Project-URL: Homepage, https://farama.org
Project-URL: Repository, https://github.com/Farama-Foundation/Gymnasium
Project-URL: Documentation, https://gymnasium.farama.org
Project-URL: Bug Report, https://github.com/Farama-Foundation/Gymnasium/issues
Keywords: Reinforcement Learning,game,RL,AI,gymnasium
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy (>=1.21.0)
Requires-Dist: jax-jumpy (>=0.2.0)
Requires-Dist: cloudpickle (>=1.2.0)
Requires-Dist: typing-extensions (>=4.3.0)
Requires-Dist: gymnasium-notices (>=0.0.1)
Requires-Dist: shimmy (<1.0,>=0.1.0)
Requires-Dist: importlib-metadata (>=4.8.0) ; python_version < "3.10"
Provides-Extra: accept-rom-license
Requires-Dist: autorom[accept-rom-license] (~=0.4.2) ; extra == 'accept-rom-license'
Provides-Extra: all
Requires-Dist: shimmy[atari] (<1.0,>=0.1.0) ; extra == 'all'
Requires-Dist: box2d-py (==2.3.5) ; extra == 'all'
Requires-Dist: pygame (==2.1.3.dev8) ; extra == 'all'
Requires-Dist: swig (==4.) ; extra == 'all'
Requires-Dist: mujoco-py (<2.2,>=2.1) ; extra == 'all'
Requires-Dist: mujoco (>=2.3.1.post1) ; extra == 'all'
Requires-Dist: imageio (>=2.14.1) ; extra == 'all'
Requires-Dist: jax (==0.3.24) ; extra == 'all'
Requires-Dist: jaxlib (==0.3.24) ; extra == 'all'
Requires-Dist: lz4 (>=3.1.0) ; extra == 'all'
Requires-Dist: opencv-python (>=3.0) ; extra == 'all'
Requires-Dist: matplotlib (>=3.0) ; extra == 'all'
Requires-Dist: moviepy (>=1.0.0) ; extra == 'all'
Requires-Dist: torch (>=1.0.0) ; extra == 'all'
Provides-Extra: atari
Requires-Dist: shimmy[atari] (<1.0,>=0.1.0) ; extra == 'atari'
Provides-Extra: box2d
Requires-Dist: box2d-py (==2.3.5) ; extra == 'box2d'
Requires-Dist: pygame (==2.1.3.dev8) ; extra == 'box2d'
Requires-Dist: swig (==4.
) ; extra == 'box2d'
Provides-Extra: classic-control
Requires-Dist: pygame (==2.1.3.dev8) ; extra == 'classic-control'
Provides-Extra: classic_control
Requires-Dist: pygame (==2.1.3.dev8) ; extra == 'classic_control'
Provides-Extra: jax
Requires-Dist: jax (==0.3.24) ; extra == 'jax'
Requires-Dist: jaxlib (==0.3.24) ; extra == 'jax'
Provides-Extra: mujoco
Requires-Dist: mujoco (>=2.3.1.post1) ; extra == 'mujoco'
Requires-Dist: imageio (>=2.14.1) ; extra == 'mujoco'
Provides-Extra: mujoco-py
Requires-Dist: mujoco-py (<2.2,>=2.1) ; extra == 'mujoco-py'
Provides-Extra: mujoco_py
Requires-Dist: mujoco-py (<2.2,>=2.1) ; extra == 'mujoco_py'
Provides-Extra: other
Requires-Dist: lz4 (>=3.1.0) ; extra == 'other'
Requires-Dist: opencv-python (>=3.0) ; extra == 'other'
Requires-Dist: matplotlib (>=3.0) ; extra == 'other'
Requires-Dist: moviepy (>=1.0.0) ; extra == 'other'
Requires-Dist: torch (>=1.0.0) ; extra == 'other'
Provides-Extra: testing
Requires-Dist: pytest (==7.1.3) ; extra == 'testing'
Provides-Extra: toy-text
Requires-Dist: pygame (==2.1.3.dev8) ; extra == 'toy-text'
Provides-Extra: toy_text
Requires-Dist: pygame (==2.1.3.dev8) ; extra == 'toy_text'

pre-commit Code style: black

Gymnasium is an open source Python library for developing and comparing reinforcement learning algorithms by providing a standard API to communicate between learning algorithms and environments, as well as a standard set of environments compliant with that API. This is a fork of OpenAI's Gym library by it's maintainers (OpenAI handed over maintenance a few years ago to an outside team), and is where future maintenance will occur going forward

The documentation website is at gymnasium.farama.org, and we have a public discord server (which we also use to coordinate development work) that you can join here: https://discord.gg/bnJ6kubTg6

Environments

Gymnasium includes the following families of environments along with a wide variety of third-party environments

  • Classic Control - These are classic reinforcement learning based on real-world problems and physics.
  • Box2D - These environments all involve toy games based around physics control, using box2d based physics and PyGame-based rendering
  • Toy Text - These environments are designed to be extremely simple, with small discrete state and action spaces, and hence easy to learn. As a result, they are suitable for debugging implementations of reinforcement learning algorithms.
  • MuJoCo - A physics engine based environments with multi-joint control which are more complex than the Box2D environments.
  • Atari - A set of 57 Atari 2600 environments simulated through Stella and the Arcade Learning Environment that have a high range of complexity for agents to learn.
  • Third-party - A number of environments have been created that are compatible with the Gymnasium API. Be aware of the version that the software was created for and use the apply_env_compatibility in gymnasium.make if necessary.

Installation

To install the base Gymnasium library, use pip install gymnasium

This does not include dependencies for all families of environments (there's a massive number, and some can be problematic to install on certain systems). You can install these dependencies for one family like pip install "gymnasium[atari]" or use pip install "gymnasium[all]" to install all dependencies.

We support and test for Python 3.7, 3.8, 3.9, 3.10, 3.11 on Linux and macOS. We will accept PRs related to Windows, but do not officially support it.

API

The Gymnasium API models environments as simple Python env classes. Creating environment instances and interacting with them is very simple- here's an example using the "CartPole-v1" environment:

import gymnasium as gym
env = gym.make("CartPole-v1")

observation, info = env.reset(seed=42)
for _ in range(1000):
    action = env.action_space.sample()
    observation, reward, terminated, truncated, info = env.step(action)

    if terminated or truncated:
        observation, info = env.reset()
env.close()

Notable Related Libraries

Please note that this is an incomplete list, and just includes libraries that the maintainers most commonly point newcommers to when asked for recommendations.

  • CleanRL is a learning library based on the Gymnasium API. It is designed to cater to newer people in the field and provides very good reference implementations.
  • PettingZoo is a multi-agent version of Gymnasium with a number of implemented environments, i.e. multi-agent Atari environments.
  • Farama Foundation has a collection of environments that are maintained by the same team as Gymnasium.

Environment Versioning

Gymnasium keeps strict versioning for reproducibility reasons. All environments end in a suffix like "_v0". When changes are made to environments that might impact learning results, the number is increased by one to prevent potential confusion. These inherent from Gym.

Development Roadmap

We have a roadmap for future development work for Gymnasium available here: #12

XuehaiPan added a commit to XuehaiPan/gymnasium that referenced this pull request Jan 9, 2023
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