Skip to content

Commit

Permalink
[docs] add docs for APIs (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
msbaines committed Sep 9, 2020
1 parent 4f59723 commit fad970a
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 12 deletions.
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ sphinx==3.2.1
sphinx_rtd_theme==0.4.3
sphinxcontrib-programoutput==0.16
-e git+https://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme
torch=1.6.0
4 changes: 4 additions & 0 deletions docs/source/api/nn/pipe.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Pipe
====

.. autoclass:: fairscale.nn.Pipe
4 changes: 4 additions & 0 deletions docs/source/api/optim/oss.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
OSS
====

.. autoclass:: fairscale.optim.OSS
21 changes: 11 additions & 10 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
import os
import sys

sys.path.insert(0, os.path.abspath("../.."))

# -- Project information -----------------------------------------------------

project = 'fairscale'
copyright = '2020, Facebook AI Research'
author = 'Facebook AI Research'
project = "fairscale"
copyright = "2020, Facebook AI Research"
author = "Facebook AI Research"

# The full version, including alpha/beta/rc tags
release = '0.0.2'
release = "0.0.2"


# -- General configuration ---------------------------------------------------
Expand All @@ -31,10 +31,11 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
"sphinx.ext.autodoc",
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand All @@ -47,9 +48,9 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'
html_theme = "alabaster"

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = ["_static"]
6 changes: 4 additions & 2 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ Welcome to fairscale's documentation!
=====================================

.. toctree::
:maxdepth: 2
:caption: Contents:
:maxdepth: 1
:caption: API Reference

api/optim/oss
api/nn/pipe


Indices and tables
Expand Down

0 comments on commit fad970a

Please sign in to comment.