Skip to content

Commit

Permalink
docs: update api documents (#191)
Browse files Browse the repository at this point in the history
* feat(statistics tools): support statistics tools for experiments launched by omnisafe (#157)

* docs: update API documentation

* chore: clean the code

* fix: fix duplicate files

* fix: delete duplicate conf.py

* docs: update tools docs

* chore: clean the docs

* docs: update app docs

* fix: fix conf.py

* fix: fix cli docs

* docs: update omnisafe usage

* fix: [pre-commit.ci] auto fixes [...]

* refactor: refactor docs structure

* docs(foundations): rename docs file

* docs: update introduction

* fix: [pre-commit.ci] auto fixes [...]

* fix: fix spelling

* fix: [pre-commit.ci] auto fixes [...]

* fix: fix code block

* docs: update comment

* docs: fix ggrammer

* docs(models, envs): update api docs

* docs: update title

* docs: update model docs

* docs(adapters): update API docs

* style: clean the docs

* fix: revert ruff

* docs: fix spelling

* docs: update start example

* docs: fix typo

* docs: update notation table

* docs: fix notation table

* docs(CUP): update cup docs

* docs(TRPO): update trpo docs

* fix: fix exp grid

* fix: fix exp grid

* chore: update version

---------

Co-authored-by: muchvo <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
3 people committed Apr 1, 2023
1 parent 324d257 commit 3df1725
Show file tree
Hide file tree
Showing 58 changed files with 2,039 additions and 1,102 deletions.
260 changes: 128 additions & 132 deletions docs/source/baserl/ppo.rst

Large diffs are not rendered by default.

367 changes: 185 additions & 182 deletions docs/source/baserl/trpo.rst

Large diffs are not rendered by default.

16 changes: 11 additions & 5 deletions docs/source/baserlapi/on_policy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Policy Gradient
:members:
:private-members:

.. automethod:: __init__


Natural Policy Gradient
-----------------------
Expand All @@ -41,7 +41,11 @@ Natural Policy Gradient
:members:
:private-members:

.. automethod:: __init__



.. _trpoapi:


Trust Region Policy Optimization
--------------------------------
Expand All @@ -57,7 +61,11 @@ Trust Region Policy Optimization
:members:
:private-members:

.. automethod:: __init__



.. _ppoapi:


Proximal Policy Optimization
----------------------------
Expand All @@ -72,5 +80,3 @@ Proximal Policy Optimization
.. autoclass:: PPO
:members:
:private-members:

.. automethod:: __init__
10 changes: 4 additions & 6 deletions docs/source/common/buffer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Base Buffer
:members:
:private-members:

.. automethod:: __init__


On Policy Buffer
----------------
Expand All @@ -42,7 +42,7 @@ On Policy Buffer
:members:
:private-members:

.. automethod:: __init__


Off Policy buffer
-----------------
Expand All @@ -58,7 +58,7 @@ Off Policy buffer
:members:
:private-members:

.. automethod:: __init__


Vector On Policy Buffer
-----------------------
Expand All @@ -74,7 +74,7 @@ Vector On Policy Buffer
:members:
:private-members:

.. automethod:: __init__


Vector Off Policy Buffer
------------------------
Expand All @@ -89,5 +89,3 @@ Vector Off Policy Buffer
.. autoclass:: VectorOffPolicyBuffer
:members:
:private-members:

.. automethod:: __init__
2 changes: 0 additions & 2 deletions docs/source/common/exp_grid.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,3 @@ Experiment Grid
.. autoclass:: ExperimentGrid
:members:
:private-members:

.. automethod:: __init__
4 changes: 0 additions & 4 deletions docs/source/common/lagrange.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ Lagrange Multiplier
:members:
:private-members:

.. automethod:: __init__


.. currentmodule:: omnisafe.common.pid_lagrange

Expand All @@ -43,5 +41,3 @@ PIDLagrange
.. autoclass:: PIDLagrangian
:members:
:private-members:

.. automethod:: __init__
2 changes: 0 additions & 2 deletions docs/source/common/logger.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,3 @@ Logger
.. autoclass:: Logger
:members:
:private-members:

.. automethod:: __init__
2 changes: 0 additions & 2 deletions docs/source/common/normalizer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,3 @@ Normalizer
.. autoclass:: Normalizer
:members:
:private-members:

.. automethod:: __init__
47 changes: 47 additions & 0 deletions docs/source/envs/adapter.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
Adapter
=======

.. currentmodule:: omnisafe.adapter


Online Adapter
--------------

.. card::
:class-header: sd-bg-success sd-text-white
:class-card: sd-outline-success sd-rounded-1

Documentation
^^^

.. autoclass:: OnlineAdapter
:members:
:private-members:

On Policy Adapter
-----------------

.. card::
:class-header: sd-bg-success sd-text-white
:class-card: sd-outline-success sd-rounded-1

Documentation
^^^

.. autoclass:: OnPolicyAdapter
:members:
:private-members:

Off Policy Adapter
------------------

.. card::
:class-header: sd-bg-success sd-text-white
:class-card: sd-outline-success sd-rounded-1

Documentation
^^^

.. autoclass:: OffPolicyAdapter
:members:
:private-members:
56 changes: 56 additions & 0 deletions docs/source/envs/core.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
Core
====

.. currentmodule:: omnisafe.envs.core

.. autosummary::

CMDP
Wrapper
EnvRegister

CMDP
----

.. card::
:class-header: sd-bg-success sd-text-white
:class-card: sd-outline-success sd-rounded-1

Documentation
^^^

.. autoclass:: CMDP
:members:
:private-members:

Wrapper
-------

.. card::
:class-header: sd-bg-success sd-text-white
:class-card: sd-outline-success sd-rounded-1

Documentation
^^^

.. autoclass:: Wrapper
:members:
:private-members:

Make an environment
-------------------

.. card::
:class-header: sd-bg-success sd-text-white
:class-card: sd-outline-success sd-rounded-1

Documentation
^^^

.. autoclass:: EnvRegister
:members:
:private-members:



.. autofunction:: make
18 changes: 18 additions & 0 deletions docs/source/envs/safety_gymnasium.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Safety Gymnasium Environment
============================

.. currentmodule:: omnisafe.envs.safety_gymnasium_env

Safety Gymnasium Interface
--------------------------

.. card::
:class-header: sd-bg-success sd-text-white
:class-card: sd-outline-success sd-rounded-1

Documentation
^^^

.. autoclass:: SafetyGymnasiumEnv
:members:
:private-members:
114 changes: 114 additions & 0 deletions docs/source/envs/wrapper.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
Wrapper
=======

.. currentmodule:: omnisafe.envs.wrapper

.. autosummary::

TimeLimit
AutoReset
ObsNormalize
RewardNormalize
CostNormalize
ActionScale
Unsqueeze

Time Limit Wrapper
------------------

.. card::
:class-header: sd-bg-success sd-text-white
:class-card: sd-outline-success sd-rounded-1

Documentation
^^^

.. autoclass:: TimeLimit
:members:
:private-members:

Auto Reset Wrapper
------------------

.. card::
:class-header: sd-bg-success sd-text-white
:class-card: sd-outline-success sd-rounded-1

Documentation
^^^

.. autoclass:: AutoReset
:members:
:private-members:


Observation Normalization Wrapper
---------------------------------

.. card::
:class-header: sd-bg-success sd-text-white
:class-card: sd-outline-success sd-rounded-1

Documentation
^^^

.. autoclass:: ObsNormalize
:members:
:private-members:

Reward Normalization Wrapper
----------------------------

.. card::
:class-header: sd-bg-success sd-text-white
:class-card: sd-outline-success sd-rounded-1

Documentation
^^^

.. autoclass:: RewardNormalize
:members:
:private-members:

Cost Normalization Wrapper
--------------------------

.. card::
:class-header: sd-bg-success sd-text-white
:class-card: sd-outline-success sd-rounded-1

Documentation
^^^

.. autoclass:: CostNormalize
:members:
:private-members:

Action Scale
------------

.. card::
:class-header: sd-bg-success sd-text-white
:class-card: sd-outline-success sd-rounded-1

Documentation
^^^

.. autoclass:: ActionScale
:members:
:private-members:


Unsqueeze Wrapper
-----------------

.. card::
:class-header: sd-bg-success sd-text-white
:class-card: sd-outline-success sd-rounded-1

Documentation
^^^

.. autoclass:: Unsqueeze
:members:
:private-members:
Loading

0 comments on commit 3df1725

Please sign in to comment.