Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readthedocs yaml configuration #410

Merged
merged 24 commits into from
Sep 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*~
*.swp
*.log
deepspeed/git_version_info.py
deepspeed/git_version_info_installed.py

# Build + installation data
build/
Expand Down
18 changes: 18 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

# Required
version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/code-docs/source/conf.py
fail_on_warning: false

# Optionally build your docs in additional formats such as PDF
formats:
- pdf
Copy link
Collaborator

@jeffra jeffra Sep 15, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this actually build the docs somewhere in PDF? interesting

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.7
install:
- requirements: requirements/requirements-readthedocs.txt
14 changes: 14 additions & 0 deletions deepspeed/git_version_info.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
try:
# This is populated by setup.py
from .git_version_info_installed import *
except ModuleNotFoundError:
# Will be missing from checkouts that haven't been installed (e.g., readthedocs)
version = '0.3.0+[none]'
git_hash = '[none]'
git_branch = '[none]'
installed_ops = {
'lamb': False,
'transformer': False,
'sparse-attn': False,
'cpu-adam': False
}
2 changes: 1 addition & 1 deletion docs/_tutorials/pipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ DeepSpeed's training engine provides hybrid data and pipeline parallelism and
can be further combined with model parallelism such as
[Megatron-LM](https://github.com/NVIDIA/Megatron-LM).
An illustration of
3D parallelism is shown below. Our latest [results](linklinklink)
3D parallelism is shown below. Our latest [results]({{ site.press_release_v3 }})
demonstrate that this 3D parallelism enables training models with over a
**trillion** parameters.

Expand Down
3 changes: 0 additions & 3 deletions docs/code-docs/requirements.local.txt

This file was deleted.

10 changes: 2 additions & 8 deletions docs/code-docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode',
'recommonmark',
'sphinx_rtd_theme',
]
Expand Down Expand Up @@ -78,11 +79,4 @@

autoclass_content = 'both'

autodoc_mock_imports = [
"torch",
"apex",
"mpi4py",
"tensorboardX",
"deepspeed_transformer_cuda",
"deepspeed_stochastic_transformer_cuda",
]
autodoc_mock_imports = ["torch", "apex", "mpi4py", "tensorboardX", "numpy"]
8 changes: 0 additions & 8 deletions docs/code-docs/source/deepspeed.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/code-docs/source/training.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ Optimizer Step
--------------
.. autofunction:: deepspeed.DeepSpeedEngine.step


Gradient Accumulation
---------------------
.. autofunction:: deepspeed.DeepSpeedEngine.is_gradient_accumulation_boundary
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ rm_if_exist() {

if [ "$no_clean" == "0" ]; then
# remove deepspeed build files
rm_if_exist deepspeed/git_version_info.py
rm_if_exist deepspeed/git_version_info_installed.py
rm_if_exist dist
rm_if_exist build
rm_if_exist deepspeed.egg-info
Expand Down
3 changes: 3 additions & 0 deletions requirements/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ pytest
pytest-forked
pre-commit
clang-format
sphinx
recommonmark
sphinx-rtd-theme
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def command_exists(cmd):
git_hash = "unknown"
git_branch = "unknown"
print(f"version={VERSION}+{git_hash}, git_hash={git_hash}, git_branch={git_branch}")
with open('deepspeed/git_version_info.py', 'w') as fd:
with open('deepspeed/git_version_info_installed.py', 'w') as fd:
fd.write(f"version='{VERSION}+{git_hash}'\n")
fd.write(f"git_hash='{git_hash}'\n")
fd.write(f"git_branch='{git_branch}'\n")
Expand Down