pytorch3d/docs
Jeremy Francis Reizenstein 3fc3ea507b PyTorch>1.9 version str
Make code for downloading linux wheels robust to double-digit PyTorch version.
2021-12-17 06:01:51 -08:00
..
examples License lint codebase 2021-06-22 03:45:27 -07:00
modules Add missing common module to auto-generated documentation 2021-06-29 15:37:33 -07:00
notes screen cameras lose -1 2021-12-07 15:04:20 -08:00
tutorials PyTorch>1.9 version str 2021-12-17 06:01:51 -08:00
.gitignore Initial commit 2020-01-23 11:53:46 -08:00
Makefile Initial commit 2020-01-23 11:53:46 -08:00
README.md Lint codebase 2021-06-22 03:45:27 -07:00
conf.py Facebook -> Meta Platforms on website footer + docs 2021-11-24 10:07:15 -08:00
index.rst Initial commit 2020-01-23 11:53:46 -08:00
requirements.txt iopath dependency 2020-12-24 10:16:03 -08:00

README.md

Setup

Install dependencies

pip install -U recommonmark mock sphinx sphinx_rtd_theme sphinx_markdown_tables

We want to include the root readme as an overview. Before generating the docs create a symlink to the root readme.

cd docs
ln -s ../README.md  overview.md

In conf.py for deployment this is done using subprocess.call.

Add a new file

Add a new .md or .rst file and add the name to the doc tree in index.rst e.g

.. toctree::
   :maxdepth: 1
   :caption: Intro Documentation

   overview

To autogenerate docs from docstrings in the source code, add the import path for the function e.g.

Chamfer Loss
--------------------

.. autoclass:: loss.chamfer.chamfer_distance
    :members:
    :undoc-members:

    .. automethod:: __init__

Build

From pytorch3d/docs run:

> make html

The website is generated in _build/html.

Common Issues

Sphinx can be fussy, and sometimes about things you werent expecting. For example, you might encounter something like:

WARNING: toctree contains reference to nonexisting document u'overview' ... checking consistency... /docs/overview.rst:: WARNING: document isn't included in any toctree

You might have indented overview in the .. toctree:: in index.rst with four spaces, when Sphinx is expecting three.

View

Start a python simple server:

> python -m http.server

Navigate to: http://0.0.0.0:8000/