Skip to content

Commit

Permalink
Add instructions on how to generate doc (pytorch#1995)
Browse files Browse the repository at this point in the history
Summary:

Instructions copied from torchtnt

Differential Revision: D57286941
  • Loading branch information
henrylhtsang authored and facebook-github-bot committed May 13, 2024
1 parent 9fd4bc3 commit 50cced1
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
23 changes: 23 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Docs
==========


## Building the docs

To build and preview the docs run the following commands:

```bash
cd docs
pip3 install -r requirements.txt
make html
python3 -m http.server 8082 --bind ::
```

Now you should be able to view the docs in your browser at the link provided in your terminal.

To reload the preview after making changes, rerun:

```bash
make html
python3 -m http.server 8082 --bind ::
```
8 changes: 7 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,15 @@
copyright = "2022, Meta"
author = "Meta"

try:
# pyre-ignore
version = torchrec.__version__
except Exception:
# when run internally, we don't have a version yet
version = "0.0.0"
# The full version, including alpha/beta/rc tags
# First 3 as format is 0.x.x.*
release = ".".join(torchrec.__version__.split(".")[:3])
release = ".".join(version.split(".")[:3])

# -- General configuration ---------------------------------------------------

Expand Down

0 comments on commit 50cced1

Please sign in to comment.