diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md index 1bf7eb13a..21d3ada8c 100644 --- a/.github/ISSUE_TEMPLATE/bug.md +++ b/.github/ISSUE_TEMPLATE/bug.md @@ -15,7 +15,7 @@ Please try to provide a minimal example to reproduce the bug. Error messages and **System Info** Describe the characteristic of your environment: - * Describe how Gym was installed (pip, docker, source, ...) + * Describe how Gymnasium was installed (pip, docker, source, ...) * What OS/version of Linux you're using. Note that while we will accept PRs to improve Window's support, we do not officially support it. * Python version diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1b7161052..f70705e01 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -27,7 +27,7 @@ the list of included, excluded and strict files can be found in pyproject.toml ( To run `pyright` for the project, run the pre-commit process (`pre-commit run --all-files`) or `pyright` ## Git hooks -The CI will run several checks on the new code pushed to the Gym repository. These checks can also be run locally without waiting for the CI by following the steps below: +The CI will run several checks on the new code pushed to the Gymnasium repository. These checks can also be run locally without waiting for the CI by following the steps below: 1. [install `pre-commit`](https://pre-commit.com/#install), 2. Install the Git hooks by running `pre-commit install`. diff --git a/README.md b/README.md index 116b39635..bfc4332d5 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,9 @@ ### Due to issues with the domain registration, the documentation has been moved to [https://www.gymlibrary.dev/](https://www.gymlibrary.dev/) as opposed to the old .ml address. -## Gym +## Gymnasium -Gym 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. Since its release, Gym's API has become the field standard for doing this. +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. Since its release, Gym's API has become the field standard for doing this. Gym documentation website is at [https://www.gymlibrary.dev/](https://www.gymlibrary.dev/), and you can propose fixes and changes to it [here](https://github.com/Farama-Foundation/gym-docs). @@ -52,8 +52,8 @@ Gym keeps strict versioning for reproducibility reasons. All environments end in ## MuJoCo Environments -The latest "\_v4" and future versions of the MuJoCo environments will no longer depend on `mujoco-py`. Instead `mujoco` will be the required dependency for future gym MuJoCo environment versions. Old gym MuJoCo environment versions that depend on `mujoco-py` will still be kept but unmaintained. -To install the dependencies for the latest gym MuJoCo environments use `pip install gym[mujoco]`. Dependencies for old MuJoCo environments can still be installed by `pip install gym[mujoco_py]`. +The latest "\_v4" and future versions of the MuJoCo environments will no longer depend on `mujoco-py`. Instead `mujoco` will be the required dependency for future gymnasiumMuJoCo environment versions. Old gymnasiumMuJoCo environment versions that depend on `mujoco-py` will still be kept but unmaintained. +To install the dependencies for the latest gymnasium MuJoCo environments use `pip install gym[mujoco]`. Dependencies for old MuJoCo environments can still be installed by `pip install gym[mujoco_py]`. ## Citation diff --git a/gymnasium/core.py b/gymnasium/core.py index 8ad9638c4..0562064b6 100644 --- a/gymnasium/core.py +++ b/gymnasium/core.py @@ -24,7 +24,7 @@ if sys.version_info[0:2] == (3, 6): warn( - "Gym minimally supports python 3.6 as the python foundation not longer supports the version, please update your version to 3.7+" + "Gymnasium minimally supports python 3.6 as the python foundation not longer supports the version, please update your version to 3.7+" ) ObsType = TypeVar("ObsType") @@ -33,7 +33,7 @@ class Env(Generic[ObsType, ActType]): - r"""The main OpenAI Gym class. + r"""The main Gymnasium class. It encapsulates an environment with arbitrary behind-the-scenes dynamics. An environment can be partially or fully observed. @@ -370,7 +370,7 @@ def __init__(self, env): def observation(self, obs): return obs["target"] - obs["agent"] - Among others, Gym provides the observation wrapper :class:`TimeAwareObservation`, which adds information about the + Among others, Gymnasium provides the observation wrapper :class:`TimeAwareObservation`, which adds information about the index of the timestep to the observation. """ @@ -452,7 +452,7 @@ def action(self, act): print(wrapped_env.action_space) #Discrete(4) - Among others, Gym provides the action wrappers :class:`ClipAction` and :class:`RescaleAction`. + Among others, Gymasnium provides the action wrappers :class:`ClipAction` and :class:`RescaleAction`. """ def step(self, action): diff --git a/gymnasium/envs/registration.py b/gymnasium/envs/registration.py index ccc15a984..19bb15c31 100644 --- a/gymnasium/envs/registration.py +++ b/gymnasium/envs/registration.py @@ -284,7 +284,7 @@ def load_env_plugins(entry_point: str = "gymnasium.envs") -> None: finally: if attr is None: raise error.Error( - f"Gym environment plugin `{module}` must specify a function to execute, not a root module" + f"Gymnasium environment plugin `{module}` must specify a function to execute, not a root module" ) context = namespace(plugin.name) diff --git a/gymnasium/spaces/sequence.py b/gymnasium/spaces/sequence.py index ea7f39d4d..fc9d41b56 100644 --- a/gymnasium/spaces/sequence.py +++ b/gymnasium/spaces/sequence.py @@ -35,7 +35,7 @@ def __init__( """ assert isinstance( space, gymnasium.Space - ), f"Expects the feature space to be instance of a gym Space, actual type: {type(space)}" + ), f"Expects the feature space to be instance of a gymnasium Space, actual type: {type(space)}" self.feature_space = space super().__init__( None, None, seed # type: ignore diff --git a/gymnasium/vector/async_vector_env.py b/gymnasium/vector/async_vector_env.py index 0c88e96dd..5fb034105 100644 --- a/gymnasium/vector/async_vector_env.py +++ b/gymnasium/vector/async_vector_env.py @@ -125,9 +125,9 @@ def __init__( except CustomSpaceError: raise ValueError( "Using `shared_memory=True` in `AsyncVectorEnv` " - "is incompatible with non-standard Gym observation spaces " + "is incompatible with non-standard Gymnasium observation spaces " "(i.e. custom spaces inheriting from `gymnasium.Space`), and is " - "only compatible with default Gym spaces (e.g. `Box`, " + "only compatible with default Gymnasium spaces (e.g. `Box`, " "`Tuple`, `Dict`) for batching. Set `shared_memory=False` " "if you use custom observation spaces." ) diff --git a/gymnasium/vector/utils/shared_memory.py b/gymnasium/vector/utils/shared_memory.py index a7a928da5..596dce51a 100644 --- a/gymnasium/vector/utils/shared_memory.py +++ b/gymnasium/vector/utils/shared_memory.py @@ -43,9 +43,9 @@ def create_shared_memory( raise CustomSpaceError( "Cannot create a shared memory for space with " f"type `{type(space)}`. Shared memory only supports " - "default Gym spaces (e.g. `Box`, `Tuple`, " + "default Gymnasium spaces (e.g. `Box`, `Tuple`, " "`Dict`, etc...), and does not support custom " - "Gym spaces." + "Gymnasium spaces." ) @@ -103,9 +103,9 @@ def read_from_shared_memory( raise CustomSpaceError( "Cannot read from a shared memory for space with " f"type `{type(space)}`. Shared memory only supports " - "default Gym spaces (e.g. `Box`, `Tuple`, " + "default Gymnasium spaces (e.g. `Box`, `Tuple`, " "`Dict`, etc...), and does not support custom " - "Gym spaces." + "Gymnasium spaces." ) @@ -159,9 +159,9 @@ def write_to_shared_memory( raise CustomSpaceError( "Cannot write to a shared memory for space with " f"type `{type(space)}`. Shared memory only supports " - "default Gym spaces (e.g. `Box`, `Tuple`, " + "default Gymnasium spaces (e.g. `Box`, `Tuple`, " "`Dict`, etc...), and does not support custom " - "Gym spaces." + "Gymnasium spaces." ) diff --git a/gymnasium/wrappers/step_api_compatibility.py b/gymnasium/wrappers/step_api_compatibility.py index c8cd96eb2..59d2e1005 100644 --- a/gymnasium/wrappers/step_api_compatibility.py +++ b/gymnasium/wrappers/step_api_compatibility.py @@ -39,7 +39,7 @@ def __init__(self, env: gymnasium.Env, output_truncation_bool: bool = True): self.output_truncation_bool = output_truncation_bool if not self.output_truncation_bool: deprecation( - "Initializing environment in old step API which returns one bool instead of two." + "Initializing environment in (old) done step API which returns one bool instead of two." ) def step(self, action): diff --git a/py.Dockerfile b/py.Dockerfile index 3f4a8cae8..64a7f316e 100644 --- a/py.Dockerfile +++ b/py.Dockerfile @@ -1,4 +1,4 @@ -# A Dockerfile that sets up a full Gym install with test dependencies +# A Dockerfile that sets up a full Gymnasium install with test dependencies ARG PYTHON_VERSION FROM python:$PYTHON_VERSION