Skip to content

Commit 2381c50

Browse files
authored
Add structure and pages to sphinx (neuralmagic#17)
* Add structure and pages to sphinx * make style and quality
1 parent 2ab528c commit 2381c50

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+365
-124
lines changed

.gitignore

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# NM Studio
2-
/server/model_paths.json
3-
1+
/docs/source/api/*.rst
42

53
npm-debug.log
64
yarn-error.log

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ PYCHECKGLOBS := 'examples/**/*.py' 'scripts/**/*.py' 'src/**/*.py' 'tests/**/*.p
66
JSCHECKDIRS := src public
77
JSCHECKGLOBS := 'public/**/*.html' 'public/**/*.js' 'public/**/*.css' 'src/**/*.html' 'src/**/*.jsx' 'tests/**/*.jsx'
88
DOCDIR := docs
9-
MDCHECKGLOBS := 'docs/**/*.md' 'examples/**/*.md' 'notebooks/**/*.md' 'scripts/**/*.md'
9+
MDCHECKGLOBS := 'docs/**/*.md' 'docs/**/*.rst' 'examples/**/*.md' 'notebooks/**/*.md' 'scripts/**/*.md'
1010
MDCHECKFILES := CODE_OF_CONDUCT.md CONTRIBUTING.md DEVELOPING.md README.md
1111

1212
# run checks on all files for the repo
@@ -37,8 +37,8 @@ test:
3737

3838
# create docs
3939
docs:
40-
sphinx-apidoc -o "$(DOCDIR)/source/" src/sparsify;
41-
cd $(DOCDIR) && $(MAKE) html;
40+
export SPARSEML_IGNORE_TFV1="True"; sphinx-apidoc -o "$(DOCDIR)/source/api" src/sparsify;
41+
export SPARSEML_IGNORE_TFV1="True"; cd $(DOCDIR) && $(MAKE) html;
4242

4343
# creates wheel file
4444
build:

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
-->
1616

17-
# ![icon for Sparsify](https://github.com/neuralmagic/sparsify/blob/main/docs/icon-sparsify.png) Sparsify
17+
# ![icon for Sparsify](https://github.com/neuralmagic/sparsify/blob/main/docs/source/icon-sparsify.png) Sparsify
1818

1919
### Easy-to-use autoML interface to optimize deep neural networks for better inference performance and a smaller footprint
2020

docs/README.md

-17
This file was deleted.

docs/source/api/.gitkeep

Whitespace-only changes.

docs/source/conf.py

+35-27
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,16 @@
1818

1919
# -- Project information -----------------------------------------------------
2020

21-
project = "sparsify"
22-
copyright = "2020, Neural Magic"
21+
project = "Sparsify"
22+
copyright = (
23+
"Copyright (c) 2021 - present / Neuralmagic, Inc. All Rights Reserved. "
24+
'Licensed under the Apache License, Version 2.0 (the "License")'
25+
)
2326
author = "Neural Magic"
2427

2528
# The full version, including alpha/beta/rc tags
26-
version = ""
27-
release = "1.0.9"
29+
version = "0.1"
30+
release = "0.1.0"
2831

2932

3033
# -- General configuration ---------------------------------------------------
@@ -34,12 +37,17 @@
3437
# ones.
3538
extensions = [
3639
"sphinx.ext.autodoc",
37-
"sphinx.ext.intersphinx",
40+
"sphinx.ext.coverage",
41+
"sphinx.ext.extlinks",
42+
"sphinx.ext.githubpages",
3843
"sphinx.ext.ifconfig",
44+
"sphinx.ext.intersphinx",
45+
"sphinx.ext.napoleon",
3946
"sphinx.ext.viewcode",
40-
"sphinx.ext.githubpages",
41-
"rinoh.frontend.sphinx",
47+
"sphinx_copybutton",
48+
"sphinx_markdown_tables",
4249
"sphinx_rtd_theme",
50+
"recommonmark",
4351
]
4452

4553
# Add any paths that contain templates here, relative to this directory.
@@ -48,11 +56,11 @@
4856
# The suffix(es) of source filenames.
4957
# You can specify multiple suffix as a list of string:
5058
#
51-
# source_suffix = ['.rst', '.md']
52-
source_suffix = ".rst"
59+
source_suffix = [".rst", ".md"]
60+
# source_suffix = ".rst"
5361

5462
# The master toctree document.
55-
master_doc = "sparsify"
63+
master_doc = "index"
5664

5765
# The language for content autogenerated by Sphinx. Refer to documentation
5866
# for a list of supported languages.
@@ -76,6 +84,7 @@
7684
# a list of builtin themes.
7785
#
7886
html_theme = "sphinx_rtd_theme"
87+
html_logo = "icon-sparsify.png"
7988

8089
# Add any paths that contain custom static files (such as style sheets) here,
8190
# relative to this directory. They are copied after the builtin static files,
@@ -92,6 +101,8 @@
92101
#
93102
# html_sidebars = {}
94103

104+
html_favicon = "favicon.ico"
105+
95106
# -- Options for HTMLHelp output ---------------------------------------------
96107

97108
# Output file base name for HTML help builder.
@@ -101,30 +112,24 @@
101112
# -- Options for LaTeX output ------------------------------------------------
102113

103114
latex_elements = {
104-
"papersize": "letterpaper",
105-
"pointsize": "10pt",
106-
"preamble": "",
107-
"figure_align": "htbp",
115+
# "papersize": "letterpaper",
116+
# "pointsize": "10pt",
117+
# "preamble": "",
118+
# "figure_align": "htbp",
108119
}
109120

110121
# Grouping the document tree into LaTeX files. List of tuples
111122
# (source start file, target name, title,
112123
# author, documentclass [howto, manual, or own class]).
113124
latex_documents = [
114-
(
115-
master_doc,
116-
"Sparsify_API.tex",
117-
"Sparsify API",
118-
"Neural Magic",
119-
"manual",
120-
),
125+
(master_doc, "sparsify.tex", "Sparsify Documentation", [author], "manual",),
121126
]
122127

123128
# -- Options for manual page output ------------------------------------------
124129

125130
# One entry per manual page. List of tuples
126131
# (source start file, name, description, authors, manual section).
127-
man_pages = [(master_doc, "sparsifyapi", "Sparsify API Documentation", [author], 1)]
132+
man_pages = [(master_doc, "sparsify", "Sparsify Documentation", [author], 1)]
128133

129134

130135
# -- Options for Texinfo output ----------------------------------------------
@@ -135,11 +140,14 @@
135140
texinfo_documents = [
136141
(
137142
master_doc,
138-
"",
139-
"Sparsify API Documentation",
143+
"sparsify",
144+
"Sparsify Documentation",
140145
author,
141-
"Sparsify_API",
142-
"API implementations designed for ML frameworks to enable better performance in the Neural Magic system.",
146+
"sparsify",
147+
(
148+
"Easy-to-use autoML interface to optimize deep neural networks for better "
149+
"inference performance and a smaller footprint"
150+
),
143151
"Miscellaneous",
144152
),
145153
]
@@ -163,7 +171,7 @@
163171
# epub_uid = ''
164172

165173
# A list of files that should not be packed into the epub file.
166-
epub_exclude_files = ["search.html"]
174+
epub_exclude_files = []
167175

168176

169177
# -- Extension configuration -------------------------------------------------

docs/source/favicon.ico

15 KB
Binary file not shown.
File renamed without changes.

docs/source/index.rst

+99
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
..
2+
Copyright (c) 2021 - present / Neuralmagic, Inc. All Rights Reserved.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing,
11+
software distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
16+
===================
17+
Sparsify |version|
18+
===================
19+
20+
Neural network model repository for highly sparse models and optimization recipes.
21+
22+
.. raw:: html
23+
24+
<div style="margin-bottom:16px;">
25+
<a href="https://github.com/neuralmagic/sparsify/blob/master/LICENSE">
26+
<img alt="GitHub" src="https://img.shields.io/github/license/neuralmagic/sparsify.svg?color=purple&style=for-the-badge" height=25 style="margin-bottom:4px;">
27+
</a>
28+
<a href="https://docs.neuralmagic.com/sparsify/index.html">
29+
<img alt="Documentation" src="https://img.shields.io/website/http/neuralmagic.com/sparsify/index.html.svg?down_color=red&down_message=offline&up_message=online&style=for-the-badge" height=25 style="margin-bottom:4px;">
30+
</a>
31+
<a href="https://github.com/neuralmagic/sparsify/releases">
32+
<img alt="GitHub release" src="https://img.shields.io/github/release/neuralmagic/sparsify.svg?style=for-the-badge" height=25 style="margin-bottom:4px;">
33+
</a>
34+
<a href="https://github.com/neuralmagic.com/sparsify/blob/master/CODE_OF_CONDUCT.md">
35+
<img alt="Contributor Covenant" src="https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg?color=yellow&style=for-the-badge" height=25 style="margin-bottom:4px;">
36+
</a>
37+
<a href="https://www.youtube.com/channel/UCo8dO_WMGYbWCRnj_Dxr4EA">
38+
<img src="https://img.shields.io/badge/-YouTube-red?&style=for-the-badge&logo=youtube&logoColor=white" height=25 style="margin-bottom:4px;">
39+
</a>
40+
<a href="https://medium.com/limitlessai">
41+
<img src="https://img.shields.io/badge/medium-%2312100E.svg?&style=for-the-badge&logo=medium&logoColor=white" height=25 style="margin-bottom:4px;">
42+
</a>
43+
<a href="https://twitter.com/neuralmagic">
44+
<img src="https://img.shields.io/twitter/follow/neuralmagic?color=darkgreen&label=Follow&style=social" height=25 style="margin-bottom:4px;">
45+
</a>
46+
</div>
47+
48+
Overview
49+
========
50+
51+
Sparsify is a deep learning autoML tool that simplifies the model optimization process to rapidly achieve the best combination of size, speed, and accuracy on any deep learning model. Sparsify optimizes and benchmarks models informed by industry research insights for ML practitioners, including ML engineers and operators, who need to deploy performant deep learning models fast and at scale. Sparsify shows visual performance potential for your model, including a sliding scale between performance and loss sensitivity, ultimately speeding up the model optimization process from weeks to minutes.
52+
53+
This repository contains the package to locally launch Sparsify where you can create projects to load and optimize your deep learning models. At the end, you can export optimization recipes to integrate with your training workflow.
54+
55+
Related Products
56+
================
57+
58+
- `DeepSparse <https://github.com/neuralmagic/deepsparse />`_:
59+
CPU inference engine that delivers unprecedented performance for sparse models
60+
- `Sparse Zoo <https://github.com/neuralmagic/sparsezoo />`_:
61+
Neural network model repository for highly sparse models and optimization recipes
62+
- `SparseML <https://github.com/neuralmagic/sparseml />`_:
63+
Libraries for state-of-the-art deep neural network optimization algorithms,
64+
enabling simple pipelines integration with a few lines of code
65+
66+
Resources and Learning More
67+
===========================
68+
69+
- `SparseZoo Documentation <https://docs.neuralmagic.com/sparsezoo/ />`_
70+
- `SparseML Documentation <https://docs.neuralmagic.com/sparseml/ />`_
71+
- `Sparsify Documentation <https://docs.neuralmagic.com/sparsify/ />`_
72+
- `DeepSparse Documentation <https://docs.neuralmagic.com/deepsparse/ />`_
73+
- `Neural Magic Blog <https://www.neuralmagic.com/blog/ />`_,
74+
`Resources <https://www.neuralmagic.com/resources/ />`_,
75+
`Website <https://www.neuralmagic.com/ />`_
76+
77+
Release History
78+
===============
79+
80+
Official builds are hosted on PyPi
81+
- stable: `sparsify <https://pypi.org/project/sparsify/ />`_
82+
- nightly (dev): `sparsify-nightly <https://pypi.org/project/sparsify-nightly/ />`_
83+
84+
Additionally, more information can be found via
85+
`GitHub Releases <https://github.com/neuralmagic/sparsify/releases />`_.
86+
87+
.. toctree::
88+
:maxdepth: 3
89+
:caption: General
90+
91+
quicktour
92+
installation
93+
userguide/index
94+
95+
.. toctree::
96+
:maxdepth: 2
97+
:caption: API
98+
99+
api/sparsify

docs/source/installation.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<!--
2+
Copyright (c) 2021 - present / Neuralmagic, Inc. All Rights Reserved.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing,
11+
software distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
-->
16+
17+
### Installation
18+
19+
This repository is tested on Python 3.6+, and Linux/Debian systems.
20+
It is recommended to install in a [virtual environment](https://docs.python.org/3/library/venv.html)
21+
to keep your system in order.
22+
23+
Install with pip using:
24+
25+
```bash
26+
pip install sparsify
27+
```
28+
29+
Then if you would like to explore any of the [scripts](https://github.com/neuralmagic/sparsify/tree/main/scripts),
30+
[notebooks](https://github.com/neuralmagic/sparsify/tree/main/notebooks),
31+
or [examples](https://github.com/neuralmagic/sparsify/tree/main/examples)
32+
clone the repository and install any additional dependencies as required.

0 commit comments

Comments
 (0)