mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-07-31 22:04:31 +00:00
Update the documentation for v0.28 (#405)
This commit is contained in:
@@ -155,11 +155,3 @@ We aimed to replace the wrappers in gymnasium v0.30.0 with these experimental wr
|
|||||||
* :class:`experimental.wrappers.JaxToTorchV0`
|
* :class:`experimental.wrappers.JaxToTorchV0`
|
||||||
* :class:`experimental.wrappers.NumpyToTorchV0`
|
* :class:`experimental.wrappers.NumpyToTorchV0`
|
||||||
```
|
```
|
||||||
|
|
||||||
## Vector Environment
|
|
||||||
|
|
||||||
These changes will be made in v0.28
|
|
||||||
|
|
||||||
## Wrappers for Vector Environments
|
|
||||||
|
|
||||||
These changes will be made in v0.28
|
|
||||||
|
@@ -29,9 +29,9 @@ title: Functional
|
|||||||
## gymnasium.experimental.func2env.FunctionalJaxCompatibilityEnv
|
## gymnasium.experimental.func2env.FunctionalJaxCompatibilityEnv
|
||||||
|
|
||||||
```{eval-rst}
|
```{eval-rst}
|
||||||
.. autoclass:: gymnasium.experimental.func_jax_env.FunctionalJaxEnv
|
.. autoclass:: gymnasium.experimental.functional_jax_env.FunctionalJaxEnv
|
||||||
|
|
||||||
.. autofunction:: gymnasium.experimental.func_jax_env.FunctionalJaxEnv.reset
|
.. autofunction:: gymnasium.experimental.functional_jax_env.FunctionalJaxEnv.reset
|
||||||
.. autofunction:: gymnasium.experimental.func_jax_env.FunctionalJaxEnv.step
|
.. autofunction:: gymnasium.experimental.functional_jax_env.FunctionalJaxEnv.step
|
||||||
.. autofunction:: gymnasium.experimental.func_jax_env.FunctionalJaxEnv.render
|
.. autofunction:: gymnasium.experimental.functional_jax_env.FunctionalJaxEnv.render
|
||||||
```
|
```
|
||||||
|
@@ -6,10 +6,34 @@ title: Vector
|
|||||||
|
|
||||||
## gymnasium.experimental.VectorEnv
|
## gymnasium.experimental.VectorEnv
|
||||||
|
|
||||||
|
```{eval-rst}
|
||||||
|
.. autoclass:: gymnasium.experimental.vector.VectorEnv
|
||||||
|
.. autofunction:: gymnasium.experimental.vector.VectorEnv.reset
|
||||||
|
.. autofunction:: gymnasium.experimental.vector.VectorEnv.step
|
||||||
|
.. autofunction:: gymnasium.experimental.vector.VectorEnv.close
|
||||||
|
.. autofunction:: gymnasium.experimental.vector.VectorEnv.reset
|
||||||
|
```
|
||||||
|
|
||||||
## gymnasium.experimental.vector.AsyncVectorEnv
|
## gymnasium.experimental.vector.AsyncVectorEnv
|
||||||
|
|
||||||
|
```{eval-rst}
|
||||||
|
.. autoclass:: gymnasium.experimental.vector.AsyncVectorEnv
|
||||||
|
.. autofunction:: gymnasium.experimental.vector.AsyncVectorEnv.reset
|
||||||
|
.. autofunction:: gymnasium.experimental.vector.AsyncVectorEnv.step
|
||||||
|
.. autofunction:: gymnasium.experimental.vector.AsyncVectorEnv.close
|
||||||
|
.. autofunction:: gymnasium.experimental.vector.AsyncVectorEnv.call
|
||||||
|
.. autofunction:: gymnasium.experimental.vector.AsyncVectorEnv.get_attr
|
||||||
|
.. autofunction:: gymnasium.experimental.vector.AsyncVectorEnv.set_attr
|
||||||
|
```
|
||||||
|
|
||||||
## gymnasium.experimental.vector.SyncVectorEnv
|
## gymnasium.experimental.vector.SyncVectorEnv
|
||||||
|
|
||||||
## Custom Vector environments
|
```{eval-rst}
|
||||||
|
.. autoclass:: gymnasium.experimental.vector.SyncVectorEnv
|
||||||
## EnvPool
|
.. autofunction:: gymnasium.experimental.vector.SyncVectorEnv.reset
|
||||||
|
.. autofunction:: gymnasium.experimental.vector.SyncVectorEnv.step
|
||||||
|
.. autofunction:: gymnasium.experimental.vector.SyncVectorEnv.close
|
||||||
|
.. autofunction:: gymnasium.experimental.vector.SyncVectorEnv.call
|
||||||
|
.. autofunction:: gymnasium.experimental.vector.SyncVectorEnv.get_attr
|
||||||
|
.. autofunction:: gymnasium.experimental.vector.SyncVectorEnv.set_attr
|
||||||
|
```
|
||||||
|
@@ -1,12 +1,29 @@
|
|||||||
---
|
---
|
||||||
title: Vector Utility functions
|
title: Vector Utility
|
||||||
---
|
---
|
||||||
|
|
||||||
# Utility functions for vectorisation
|
# Utility functions for vectorisation
|
||||||
|
|
||||||
|
## Spaces utility functions
|
||||||
|
|
||||||
```{eval-rst}
|
```{eval-rst}
|
||||||
.. autofunction:: gymnasium.experimental.vector.utils.batch_space
|
.. autofunction:: gymnasium.experimental.vector.utils.batch_space
|
||||||
.. autofunction:: gymnasium.experimental.vector.utils.concatenate
|
.. autofunction:: gymnasium.experimental.vector.utils.concatenate
|
||||||
.. autofunction:: gymnasium.experimental.vector.utils.iterate
|
.. autofunction:: gymnasium.experimental.vector.utils.iterate
|
||||||
.. autofunction:: gymnasium.experimental.vector.utils.create_empty_array
|
.. autofunction:: gymnasium.experimental.vector.utils.create_empty_array
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Shared memory functions
|
||||||
|
|
||||||
|
```{eval-rst}
|
||||||
|
.. autofunction:: gymnasium.experimental.vector.utils.create_shared_memory
|
||||||
|
.. autofunction:: gymnasium.experimental.vector.utils.read_from_shared_memory
|
||||||
|
.. autofunction:: gymnasium.experimental.vector.utils.write_to_shared_memory
|
||||||
|
```
|
||||||
|
|
||||||
|
## Miscellaneous
|
||||||
|
|
||||||
|
```{eval-rst}
|
||||||
|
.. autofunction:: gymnasium.experimental.vector.utils.CloudpickleWrapper
|
||||||
|
.. autofunction:: gymnasium.experimental.vector.utils.clear_mpi_env_vars
|
||||||
|
```
|
||||||
|
@@ -4,12 +4,36 @@ title: Vector Wrappers
|
|||||||
|
|
||||||
# Vector Environment Wrappers
|
# Vector Environment Wrappers
|
||||||
|
|
||||||
|
```{eval-rst}
|
||||||
|
.. autoclass:: gymnasium.experimental.vector.VectorWrapper
|
||||||
|
```
|
||||||
|
|
||||||
## Vector Lambda Observation Wrappers
|
## Vector Lambda Observation Wrappers
|
||||||
|
|
||||||
|
```{eval-rst}
|
||||||
|
.. autoclass:: gymnasium.experimental.vector.VectorObservationWrapper
|
||||||
|
```
|
||||||
|
|
||||||
## Vector Lambda Action Wrappers
|
## Vector Lambda Action Wrappers
|
||||||
|
|
||||||
|
```{eval-rst}
|
||||||
|
.. autoclass:: gymnasium.experimental.vector.VectorActionWrapper
|
||||||
|
```
|
||||||
|
|
||||||
## Vector Lambda Reward Wrappers
|
## Vector Lambda Reward Wrappers
|
||||||
|
|
||||||
|
```{eval-rst}
|
||||||
|
.. autoclass:: gymnasium.experimental.vector.VectorRewardWrapper
|
||||||
|
```
|
||||||
|
|
||||||
## Vector Common Wrappers
|
## Vector Common Wrappers
|
||||||
|
|
||||||
|
```{eval-rst}
|
||||||
|
.. autoclass:: gymnasium.experimental.wrappers.vector.VectorRecordEpisodeStatistics
|
||||||
|
```
|
||||||
|
|
||||||
## Vector Only Wrappers
|
## Vector Only Wrappers
|
||||||
|
|
||||||
|
```{eval-rst}
|
||||||
|
.. autoclass:: gymnasium.experimental.wrappers.vector.VectorListInfo
|
||||||
|
```
|
||||||
|
@@ -1,3 +1,7 @@
|
|||||||
|
---
|
||||||
|
title: Wrappers
|
||||||
|
---
|
||||||
|
|
||||||
# Wrappers
|
# Wrappers
|
||||||
|
|
||||||
## Observation Wrappers
|
## Observation Wrappers
|
||||||
|
@@ -35,6 +35,6 @@ Gymnasium allows users to automatically load environments, pre-wrapped with seve
|
|||||||
.. autofunction:: gymnasium.envs.registration.parse_env_id
|
.. autofunction:: gymnasium.envs.registration.parse_env_id
|
||||||
.. autofunction:: gymnasium.envs.registration.find_highest_version
|
.. autofunction:: gymnasium.envs.registration.find_highest_version
|
||||||
.. autofunction:: gymnasium.envs.registration.namespace
|
.. autofunction:: gymnasium.envs.registration.namespace
|
||||||
.. autofunction:: gymnasium.envs.registration.load_env
|
.. autofunction:: gymnasium.envs.registration.load_env_creator
|
||||||
.. autofunction:: gymnasium.envs.registration.load_plugin_envs
|
.. autofunction:: gymnasium.envs.registration.load_plugin_envs
|
||||||
```
|
```
|
||||||
|
@@ -15,7 +15,7 @@ Gym 0.19.0 is a large maintenance release, and the first since [@jkterry1](https
|
|||||||
|
|
||||||
## Bug fixes
|
## Bug fixes
|
||||||
|
|
||||||
* Removed unused dependencies, removed unnescesary dependency version requirements that caused installation issues on newer machines, added full requirements.txt and moved general dependencies to extras. Notably, "toy_text" is not a used extra. atari-py is now pegged to a precise working version pending the switch to ale-py ([@jkterry1](https://github.com/jkterry1))
|
* Removed unused dependencies, removed unnecessary dependency version requirements that caused installation issues on newer machines, added full requirements.txt and moved general dependencies to extras. Notably, "toy_text" is not a used extra. atari-py is now pegged to a precise working version pending the switch to ale-py ([@jkterry1](https://github.com/jkterry1))
|
||||||
* Bug fixes to rewards in FrozenLake and FrozenLake8x8; versions bumped to v1 ([@ZhiqingXiao](https://github.com/ZhiqingXiao))
|
* Bug fixes to rewards in FrozenLake and FrozenLake8x8; versions bumped to v1 ([@ZhiqingXiao](https://github.com/ZhiqingXiao))
|
||||||
* Removed remaining numpy depreciation warnings ([@super-pirata](https://github.com/super-pirata))
|
* Removed remaining numpy depreciation warnings ([@super-pirata](https://github.com/super-pirata))
|
||||||
* Fixes to video recording ([@mahiuchun](https://github.com/mahiuchun), [@zlig](https://github.com/zlig))
|
* Fixes to video recording ([@mahiuchun](https://github.com/mahiuchun), [@zlig](https://github.com/zlig))
|
13
docs/gym_release_notes/index.md
Normal file
13
docs/gym_release_notes/index.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
layout: "contents"
|
||||||
|
title: Gym Release Notes
|
||||||
|
---
|
||||||
|
|
||||||
|
# Gym Release Notes
|
||||||
|
|
||||||
|
```{eval-rst}
|
||||||
|
.. changelog::
|
||||||
|
:github: https://github.com/openai/gym/releases
|
||||||
|
:pypi: https://pypi.org/project/gym/
|
||||||
|
:changelog-url:
|
||||||
|
```
|
13
docs/gymnasium_release_notes/index.md
Normal file
13
docs/gymnasium_release_notes/index.md
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
layout: "contents"
|
||||||
|
title: Gymnasium Release Notes
|
||||||
|
---
|
||||||
|
|
||||||
|
# Gymnasium Release Notes
|
||||||
|
|
||||||
|
```{eval-rst}
|
||||||
|
.. changelog::
|
||||||
|
:github: https://github.com/Farama-Foundation/Gymnasium/releases
|
||||||
|
:pypi: https://pypi.org/project/gymnasium/
|
||||||
|
:changelog-url:
|
||||||
|
```
|
@@ -6,7 +6,7 @@ lastpage:
|
|||||||
|
|
||||||
# Gymnasium is a standard API for reinforcement learning, and a diverse collection of reference environments
|
# Gymnasium is a standard API for reinforcement learning, and a diverse collection of reference environments
|
||||||
|
|
||||||
```{figure} _static/videos/box2d/lunar_lander_continuous.gif
|
```{figure} _static/videos/box2d/lunar_lander.gif
|
||||||
:alt: Lunar Lander
|
:alt: Lunar Lander
|
||||||
:width: 500
|
:width: 500
|
||||||
```
|
```
|
||||||
@@ -76,6 +76,7 @@ Comet Tutorial <https://www.comet.com/docs/v2/integrations/ml-frameworks/gymnasi
|
|||||||
:caption: Development
|
:caption: Development
|
||||||
|
|
||||||
Github <https://github.com/Farama-Foundation/Gymnasium>
|
Github <https://github.com/Farama-Foundation/Gymnasium>
|
||||||
release_notes/index
|
gymnasium_release_notes/index
|
||||||
|
gym_release_notes/index
|
||||||
Contribute to the Docs <https://github.com/Farama-Foundation/Gymnasium/blob/main/docs/README.md>
|
Contribute to the Docs <https://github.com/Farama-Foundation/Gymnasium/blob/main/docs/README.md>
|
||||||
```
|
```
|
||||||
|
@@ -1,30 +0,0 @@
|
|||||||
---
|
|
||||||
layout: "contents"
|
|
||||||
title: Release Notes
|
|
||||||
---
|
|
||||||
|
|
||||||
# Release Notes
|
|
||||||
|
|
||||||
```{eval-rst}
|
|
||||||
.. changelog::
|
|
||||||
:github: https://github.com/Farama-Foundation/Gymnasium/releases
|
|
||||||
:pypi: https://pypi.org/project/gymnasium/
|
|
||||||
:changelog-url:
|
|
||||||
```
|
|
||||||
|
|
||||||
## Gym Release Notes
|
|
||||||
|
|
||||||
* [v0.26.2](./gym_v0.26.2)
|
|
||||||
* [v0.26.1](./gym_v0.26.1)
|
|
||||||
* [v0.26.0](./gym_v0.26.0)
|
|
||||||
* [v0.25.2](./gym_v0.25.2)
|
|
||||||
* [v0.25.1](./gym_v0.25.1)
|
|
||||||
* [v0.25.0](./gym_v0.25.0)
|
|
||||||
* [v0.24.1](./gym_v0.24.1)
|
|
||||||
* [v0.24.0](./gym_v0.24.0)
|
|
||||||
* [v0.23.1](./gym_v0.23.1)
|
|
||||||
* [v0.23.0](./gym_v0.23.0)
|
|
||||||
* [v0.22.0](./gym_v0.22.0)
|
|
||||||
* [v0.21.0](./gym_v0.21.0)
|
|
||||||
* [v0.20.0](./gym_v0.20.0)
|
|
||||||
* [v0.19.0](./gym_v0.19.0)
|
|
@@ -1,7 +1,7 @@
|
|||||||
"""An async vector environment."""
|
"""An async vector environment."""
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import multiprocessing as mp
|
import multiprocessing
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
@@ -96,7 +96,7 @@ class AsyncVectorEnv(VectorEnv):
|
|||||||
"""
|
"""
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
||||||
ctx = mp.get_context(context)
|
ctx = multiprocessing.get_context(context)
|
||||||
self.env_fns = env_fns
|
self.env_fns = env_fns
|
||||||
self.num_envs = len(env_fns)
|
self.num_envs = len(env_fns)
|
||||||
self.shared_memory = shared_memory
|
self.shared_memory = shared_memory
|
||||||
@@ -238,7 +238,7 @@ class AsyncVectorEnv(VectorEnv):
|
|||||||
|
|
||||||
if not self._poll(timeout):
|
if not self._poll(timeout):
|
||||||
self._state = AsyncState.DEFAULT
|
self._state = AsyncState.DEFAULT
|
||||||
raise mp.TimeoutError(
|
raise multiprocessing.TimeoutError(
|
||||||
f"The call to `reset_wait` has timed out after {timeout} second(s)."
|
f"The call to `reset_wait` has timed out after {timeout} second(s)."
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -326,7 +326,7 @@ class AsyncVectorEnv(VectorEnv):
|
|||||||
|
|
||||||
if not self._poll(timeout):
|
if not self._poll(timeout):
|
||||||
self._state = AsyncState.DEFAULT
|
self._state = AsyncState.DEFAULT
|
||||||
raise mp.TimeoutError(
|
raise multiprocessing.TimeoutError(
|
||||||
f"The call to `step_wait` has timed out after {timeout} second(s)."
|
f"The call to `step_wait` has timed out after {timeout} second(s)."
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -421,7 +421,7 @@ class AsyncVectorEnv(VectorEnv):
|
|||||||
|
|
||||||
if not self._poll(timeout):
|
if not self._poll(timeout):
|
||||||
self._state = AsyncState.DEFAULT
|
self._state = AsyncState.DEFAULT
|
||||||
raise mp.TimeoutError(
|
raise multiprocessing.TimeoutError(
|
||||||
f"The call to `call_wait` has timed out after {timeout} second(s)."
|
f"The call to `call_wait` has timed out after {timeout} second(s)."
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -511,7 +511,7 @@ class AsyncVectorEnv(VectorEnv):
|
|||||||
)
|
)
|
||||||
function = getattr(self, f"{self._state.value}_wait")
|
function = getattr(self, f"{self._state.value}_wait")
|
||||||
function(timeout)
|
function(timeout)
|
||||||
except mp.TimeoutError:
|
except multiprocessing.TimeoutError:
|
||||||
terminate = True
|
terminate = True
|
||||||
|
|
||||||
if terminate:
|
if terminate:
|
||||||
|
@@ -22,8 +22,8 @@ __all__ = [
|
|||||||
"iterate",
|
"iterate",
|
||||||
"concatenate",
|
"concatenate",
|
||||||
"create_empty_array",
|
"create_empty_array",
|
||||||
"read_from_shared_memory",
|
|
||||||
"create_shared_memory",
|
"create_shared_memory",
|
||||||
|
"read_from_shared_memory",
|
||||||
"write_to_shared_memory",
|
"write_to_shared_memory",
|
||||||
"CloudpickleWrapper",
|
"CloudpickleWrapper",
|
||||||
"clear_mpi_env_vars",
|
"clear_mpi_env_vars",
|
||||||
|
Reference in New Issue
Block a user