Skip to content

Commit

Permalink
[docs] Add auto API generator (#11)
Browse files Browse the repository at this point in the history
* [docs] Add auto API generator

* Remove autogen .rst files
  • Loading branch information
Routhleck authored Dec 13, 2024
1 parent c6bdef4 commit 9e29fed
Show file tree
Hide file tree
Showing 11 changed files with 522 additions and 3 deletions.
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,10 @@ related-projects.md
docs/**/*.dat
docs/**/*.npz

.DS_Store
.DS_Store
docs/apis/
!docs/apis/pinnx.rst
!docs/apis/pinnx.callbacks.rst
!docs/apis/pinnx.fnspace.rst
!docs/apis/pinnx.grad.rst
!docs/apis/pinnx.metrics.rst
9 changes: 9 additions & 0 deletions docs/_templates/classtemplate.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.. role:: hidden
:class: hidden-section
.. currentmodule:: {{ module }}


{{ name | underline}}

.. autoclass:: {{ name }}
:members:
26 changes: 26 additions & 0 deletions docs/apis/pinnx.callbacks.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
``pinnx.callbacks`` module
==========================

.. currentmodule:: pinnx.callbacks
.. automodule:: pinnx.callbacks

Callbacks
---------

.. autosummary::
:toctree: generated/
:nosignatures:
:template: classtemplate.rst

Callback
CallbackList
ModelCheckpoint
EarlyStopping
Timer
DropoutUncertainty
VariableValue
OperatorPredictor
MovieDumper
PDEPointResampler


23 changes: 23 additions & 0 deletions docs/apis/pinnx.fnspace.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
``pinnx.fnspace`` module
========================

.. currentmodule:: pinnx.fnspace
.. automodule:: pinnx.fnspace

Function Space
--------------

.. autosummary::
:toctree: generated/
:nosignatures:
:template: classtemplate.rst

wasserstein2
FunctionSpace
PowerSeries
Chebyshev
GRF
GRF_KL
GRF2D


19 changes: 19 additions & 0 deletions docs/apis/pinnx.grad.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
``pinnx.grad`` module
=====================

.. currentmodule:: pinnx.grad
.. automodule:: pinnx.grad

Automatic Differentiation
-------------------------

.. autosummary::
:toctree: generated/
:nosignatures:
:template: classtemplate.rst

jacobian
hessian
gradient


24 changes: 24 additions & 0 deletions docs/apis/pinnx.metrics.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
``pinnx.metrics`` module
========================

.. currentmodule:: pinnx.metrics
.. automodule:: pinnx.metrics

Metrics
-------

.. autosummary::
:toctree: generated/
:nosignatures:
:template: classtemplate.rst

accuracy
l2_relative_error
nanl2_relative_error
mean_l2_relative_error
mean_squared_error
mean_absolute_percentage_error
max_absolute_percentage_error
absolute_percentage_error_std


17 changes: 17 additions & 0 deletions docs/apis/pinnx.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
``pinnx`` module
================

.. currentmodule:: pinnx
.. automodule:: pinnx

Trainer
-------

.. autosummary::
:toctree: generated/
:nosignatures:
:template: classtemplate.rst

Trainer


Loading

0 comments on commit 9e29fed

Please sign in to comment.