Update the documentation for v0.28 (#405)

This commit is contained in:
Mark Towers
2023-03-25 11:32:36 +00:00
committed by GitHub
parent 3d5c218a5f
commit cab0fbb13d
27 changed files with 115 additions and 57 deletions

View File

@@ -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.NumpyToTorchV0`
```
## Vector Environment
These changes will be made in v0.28
## Wrappers for Vector Environments
These changes will be made in v0.28

View File

@@ -29,9 +29,9 @@ title: Functional
## gymnasium.experimental.func2env.FunctionalJaxCompatibilityEnv
```{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.func_jax_env.FunctionalJaxEnv.step
.. autofunction:: gymnasium.experimental.func_jax_env.FunctionalJaxEnv.render
.. autofunction:: gymnasium.experimental.functional_jax_env.FunctionalJaxEnv.reset
.. autofunction:: gymnasium.experimental.functional_jax_env.FunctionalJaxEnv.step
.. autofunction:: gymnasium.experimental.functional_jax_env.FunctionalJaxEnv.render
```

View File

@@ -6,10 +6,34 @@ title: Vector
## 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
```{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
## Custom Vector environments
## EnvPool
```{eval-rst}
.. autoclass:: gymnasium.experimental.vector.SyncVectorEnv
.. 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
```

View File

@@ -1,12 +1,29 @@
---
title: Vector Utility functions
title: Vector Utility
---
# Utility functions for vectorisation
## Spaces utility functions
```{eval-rst}
.. autofunction:: gymnasium.experimental.vector.utils.batch_space
.. autofunction:: gymnasium.experimental.vector.utils.concatenate
.. autofunction:: gymnasium.experimental.vector.utils.iterate
.. 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
```

View File

@@ -4,12 +4,36 @@ title: Vector Wrappers
# Vector Environment Wrappers
```{eval-rst}
.. autoclass:: gymnasium.experimental.vector.VectorWrapper
```
## Vector Lambda Observation Wrappers
```{eval-rst}
.. autoclass:: gymnasium.experimental.vector.VectorObservationWrapper
```
## Vector Lambda Action Wrappers
```{eval-rst}
.. autoclass:: gymnasium.experimental.vector.VectorActionWrapper
```
## Vector Lambda Reward Wrappers
```{eval-rst}
.. autoclass:: gymnasium.experimental.vector.VectorRewardWrapper
```
## Vector Common Wrappers
```{eval-rst}
.. autoclass:: gymnasium.experimental.wrappers.vector.VectorRecordEpisodeStatistics
```
## Vector Only Wrappers
```{eval-rst}
.. autoclass:: gymnasium.experimental.wrappers.vector.VectorListInfo
```

View File

@@ -1,3 +1,7 @@
---
title: Wrappers
---
# Wrappers
## Observation Wrappers

View File

@@ -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.find_highest_version
.. 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
```

View File

@@ -15,7 +15,7 @@ Gym 0.19.0 is a large maintenance release, and the first since [@jkterry1](https
## 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))
* 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))

View 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:
```

View 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:
```

View File

@@ -6,7 +6,7 @@ lastpage:
# 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
:width: 500
```
@@ -76,6 +76,7 @@ Comet Tutorial <https://www.comet.com/docs/v2/integrations/ml-frameworks/gymnasi
:caption: Development
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>
```

View File

@@ -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)

View File

@@ -1,7 +1,7 @@
"""An async vector environment."""
from __future__ import annotations
import multiprocessing as mp
import multiprocessing
import sys
import time
from copy import deepcopy
@@ -96,7 +96,7 @@ class AsyncVectorEnv(VectorEnv):
"""
super().__init__()
ctx = mp.get_context(context)
ctx = multiprocessing.get_context(context)
self.env_fns = env_fns
self.num_envs = len(env_fns)
self.shared_memory = shared_memory
@@ -238,7 +238,7 @@ class AsyncVectorEnv(VectorEnv):
if not self._poll(timeout):
self._state = AsyncState.DEFAULT
raise mp.TimeoutError(
raise multiprocessing.TimeoutError(
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):
self._state = AsyncState.DEFAULT
raise mp.TimeoutError(
raise multiprocessing.TimeoutError(
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):
self._state = AsyncState.DEFAULT
raise mp.TimeoutError(
raise multiprocessing.TimeoutError(
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(timeout)
except mp.TimeoutError:
except multiprocessing.TimeoutError:
terminate = True
if terminate:

View File

@@ -22,8 +22,8 @@ __all__ = [
"iterate",
"concatenate",
"create_empty_array",
"read_from_shared_memory",
"create_shared_memory",
"read_from_shared_memory",
"write_to_shared_memory",
"CloudpickleWrapper",
"clear_mpi_env_vars",