RTD fixes for candidate (#991)
* reorganization of folders in docs Signed-off-by: nvidia <tkornuta@nvidia.com> * first experiments with theme from NVTX Signed-off-by: nvidia <tkornuta@nvidia.com> * merged Signed-off-by: nvidia <tkornuta@nvidia.com> * mocked hydra and PTL Signed-off-by: nvidia <tkornuta@nvidia.com> * mocked omegaconf Signed-off-by: nvidia <tkornuta@nvidia.com> * mocked onnx Signed-off-by: nvidia <tkornuta@nvidia.com> * removed test build Signed-off-by: nvidia <tkornuta@nvidia.com> * mockup pytorch_lightning Signed-off-by: nvidia <tkornuta@nvidia.com> * license header fix - nvidia theme Signed-off-by: nvidia <tkornuta@nvidia.com>
3
.gitignore
vendored
|
@ -84,8 +84,7 @@ instance/
|
|||
.scrapy
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
docs/sources/build
|
||||
docs/build
|
||||
|
||||
# PyBuilder
|
||||
target/
|
||||
|
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 273 KiB After Width: | Height: | Size: 273 KiB |
Before Width: | Height: | Size: 257 KiB After Width: | Height: | Size: 257 KiB |
|
@ -33,8 +33,10 @@ import sys
|
|||
# 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.
|
||||
|
||||
sys.path.insert(0, os.path.abspath("../../.."))
|
||||
sys.path.insert(0, os.path.abspath(os.path.join("../../..", "nemo")))
|
||||
sys.path.insert(0, os.path.abspath("../.."))
|
||||
sys.path.insert(0, os.path.abspath("../../nemo"))
|
||||
|
||||
from package_info import __version__
|
||||
|
||||
|
||||
autodoc_mock_imports = [
|
||||
|
@ -48,6 +50,7 @@ autodoc_mock_imports = [
|
|||
'torchvision.models',
|
||||
'torchtext',
|
||||
'torch_stft',
|
||||
'pytorch_lightning',
|
||||
'h5py',
|
||||
'kaldi_io',
|
||||
'transformers',
|
||||
|
@ -73,6 +76,9 @@ autodoc_mock_imports = [
|
|||
'webdataset',
|
||||
'tqdm',
|
||||
'numba',
|
||||
'hydra',
|
||||
'omegaconf',
|
||||
'onnx',
|
||||
]
|
||||
|
||||
# -- General configuration ------------------------------------------------
|
||||
|
@ -94,14 +100,11 @@ extensions = [
|
|||
"sphinx.ext.napoleon",
|
||||
"sphinx.ext.githubpages",
|
||||
"sphinxcontrib.bibtex",
|
||||
"sphinx.ext.inheritance_diagram",
|
||||
]
|
||||
|
||||
# Set default flags for all classes.
|
||||
autodoc_default_flags = [
|
||||
'members',
|
||||
'undoc-members',
|
||||
'show-inheritance',
|
||||
]
|
||||
autodoc_default_options = {'members': None, 'undoc-members': None, 'show-inheritance': True}
|
||||
|
||||
locale_dirs = ['locale/'] # path is example but recommended.
|
||||
gettext_compact = False # optional.
|
||||
|
@ -119,15 +122,14 @@ source_suffix = ".rst"
|
|||
master_doc = "index"
|
||||
|
||||
# General information about the project.
|
||||
project = "nemo"
|
||||
copyright = "2018-2020, NVIDIA"
|
||||
author = "NVIDIA"
|
||||
project = "NVIDIA NeMo"
|
||||
copyright = "2018-, NVIDIA CORPORATION"
|
||||
author = "NVIDIA CORPORATION"
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
|
||||
from package_info import __version__
|
||||
|
||||
# The short X.Y version.
|
||||
# version = "0.10.0"
|
||||
|
@ -156,27 +158,36 @@ todo_include_todos = True
|
|||
|
||||
# -- Options for HTML output ----------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
#
|
||||
# html_theme = 'alabaster'
|
||||
html_theme = "sphinx_rtd_theme"
|
||||
# NVIDIA Theme - work in progress.
|
||||
html_theme = 'nvidia_theme'
|
||||
html_theme_path = ["."]
|
||||
html_theme_options = {
|
||||
"canonical_url": "",
|
||||
"analytics_id": "",
|
||||
"logo_only": False,
|
||||
"display_version": True,
|
||||
"prev_next_buttons_location": "bottom",
|
||||
"style_external_links": False,
|
||||
"vcs_pageview_mode": "",
|
||||
# Toc options
|
||||
"collapse_navigation": True,
|
||||
"sticky_navigation": True,
|
||||
"navigation_depth": 4,
|
||||
"includehidden": True,
|
||||
"titles_only": False,
|
||||
'display_version': True,
|
||||
'project_version': __version__,
|
||||
'project_name': 'NVIDIA NeMo',
|
||||
'logo_path': None,
|
||||
'logo_only': True,
|
||||
}
|
||||
|
||||
# Sphinx RTD theme.
|
||||
|
||||
# html_theme = "sphinx_rtd_theme"
|
||||
# html_theme_options = {
|
||||
# "canonical_url": "",
|
||||
# "analytics_id": "",
|
||||
# "logo_only": False,
|
||||
# "display_version": True,
|
||||
# "prev_next_buttons_location": "bottom",
|
||||
# "style_external_links": False,
|
||||
# "vcs_pageview_mode": "",
|
||||
# # Toc options
|
||||
# "collapse_navigation": True,
|
||||
# "sticky_navigation": True,
|
||||
# "navigation_depth": 4,
|
||||
# "includehidden": True,
|
||||
# "titles_only": False,
|
||||
# }
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
# documentation.
|
||||
|
@ -232,13 +243,13 @@ latex_elements = {
|
|||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title,
|
||||
# author, documentclass [howto, manual, or own class]).
|
||||
latex_documents = [(master_doc, "nemo.tex", "nemo Documentation", "AI App Design team", "manual",)]
|
||||
latex_documents = [(master_doc, "nemo.tex", "NVIDIA NeMo Documentation", "AI Applications Team", "manual",)]
|
||||
|
||||
# -- Options for manual page output ---------------------------------------
|
||||
|
||||
# One entry per manual page. List of tuples
|
||||
# (source start file, name, description, authors, manual section).
|
||||
man_pages = [(master_doc, "nemo", "nemo Documentation", [author], 1)]
|
||||
man_pages = [(master_doc, "nemo", "NVIDIA NeMo Documentation", [author], 1)]
|
||||
|
||||
# -- Options for Texinfo output -------------------------------------------
|
||||
|
||||
|
@ -246,7 +257,15 @@ man_pages = [(master_doc, "nemo", "nemo Documentation", [author], 1)]
|
|||
# (source start file, target name, title, author,
|
||||
# dir menu entry, description, category)
|
||||
texinfo_documents = [
|
||||
(master_doc, "nemo", "nemo Documentation", author, "nemo", "One line description of project.", "Miscellaneous",)
|
||||
(
|
||||
master_doc,
|
||||
"NVIDIA NeMo ",
|
||||
"NeMo Documentation",
|
||||
author,
|
||||
"NVIDIA Corporation",
|
||||
"One line description of project.",
|
||||
"Miscellaneous",
|
||||
)
|
||||
]
|
||||
|
||||
autoclass_content = 'both'
|
24
docs/source/cv/intro.rst
Normal file
|
@ -0,0 +1,24 @@
|
|||
Computer Vision (CV)
|
||||
===============================
|
||||
|
||||
The collection contains several datasets, modules and losses useful in computer/machine vision tasks.
|
||||
|
||||
Models
|
||||
------
|
||||
.. automodule:: nemo.collections.cv.models.mnist_lenet5
|
||||
|
||||
Datasets
|
||||
----------
|
||||
.. automodule:: nemo.collections.cv.datasets.mnist_dataset
|
||||
:special-members: __init__, __len__, __getitem__
|
||||
|
||||
Neural Modules
|
||||
--------------
|
||||
.. automodule:: nemo.collections.cv.modules.lenet5
|
||||
:special-members: __init__
|
||||
|
||||
Losses
|
||||
------
|
||||
.. automodule:: nemo.collections.cv.losses.nll_loss
|
||||
:special-members: __init__
|
||||
|
|
@ -8,6 +8,7 @@ NVIDIA NeMo Developer Guide
|
|||
Introduction <self>
|
||||
core
|
||||
asr/intro
|
||||
cv/intro
|
||||
nlp/intro
|
||||
tts/intro
|
||||
api-docs/nemo
|
54
docs/source/nvidia_theme/__init__.py
Normal file
|
@ -0,0 +1,54 @@
|
|||
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# Copyright (c) 2011-2019 Ryan Roemer
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
|
||||
"""
|
||||
NVIDIA developer guide theme.
|
||||
|
||||
Based onf the https://github.com/ryan-roemer/sphinx-bootstrap-theme.
|
||||
"""
|
||||
from os import path
|
||||
|
||||
__version__ = '0.1.0a1'
|
||||
__version_full__ = __version__
|
||||
|
||||
|
||||
def get_html_theme_path():
|
||||
"""Return list of HTML theme paths."""
|
||||
cur_dir = path.abspath(path.dirname(path.dirname(__file__)))
|
||||
return cur_dir
|
||||
|
||||
|
||||
# See http://www.sphinx-doc.org/en/stable/theming.html#distribute-your-theme-as-a-python-package
|
||||
def setup(app):
|
||||
app.add_html_theme('sphinx_nvidia_theme', path.abspath(path.dirname(__file__)))
|
82
docs/source/nvidia_theme/breadcrumbs.html
Normal file
|
@ -0,0 +1,82 @@
|
|||
{# Support for Sphinx 1.3+ page_source_suffix, but don't break old builds. #}
|
||||
|
||||
{% if page_source_suffix %}
|
||||
{% set suffix = page_source_suffix %}
|
||||
{% else %}
|
||||
{% set suffix = source_suffix %}
|
||||
{% endif %}
|
||||
|
||||
{% if meta is defined and meta is not none %}
|
||||
{% set check_meta = True %}
|
||||
{% else %}
|
||||
{% set check_meta = False %}
|
||||
{% endif %}
|
||||
|
||||
{% if check_meta and 'github_url' in meta %}
|
||||
{% set display_github = True %}
|
||||
{% endif %}
|
||||
|
||||
{% if check_meta and 'bitbucket_url' in meta %}
|
||||
{% set display_bitbucket = True %}
|
||||
{% endif %}
|
||||
|
||||
{% if check_meta and 'gitlab_url' in meta %}
|
||||
{% set display_gitlab = True %}
|
||||
{% endif %}
|
||||
|
||||
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||
|
||||
<ul class="wy-breadcrumbs">
|
||||
{% block breadcrumbs %}
|
||||
<li><a href="{{ pathto(master_doc) }}">{{ _('Docs') }}</a> »</li>
|
||||
{% for doc in parents %}
|
||||
<li><a href="{{ doc.link|e }}">{{ doc.title }}</a> »</li>
|
||||
{% endfor %}
|
||||
<li>{{ title }}</li>
|
||||
{% endblock %}
|
||||
{% block breadcrumbs_aside %}
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
{% if hasdoc(pagename) %}
|
||||
{% if display_github %}
|
||||
{% if check_meta and 'github_url' in meta %}
|
||||
<!-- User defined GitHub URL -->
|
||||
<a href="{{ meta['github_url'] }}" class="fa fa-github"> {{ _('Edit on GitHub') }}</a>
|
||||
{% else %}
|
||||
<a href="https://{{ github_host|default("github.com") }}/{{ github_user }}/{{ github_repo }}/{{ theme_vcs_pageview_mode|default("blob") }}/{{ github_version }}{{ conf_py_path }}{{ pagename }}{{ suffix }}" class="fa fa-github"> {{ _('Edit on GitHub') }}</a>
|
||||
{% endif %}
|
||||
{% elif display_bitbucket %}
|
||||
{% if check_meta and 'bitbucket_url' in meta %}
|
||||
<!-- User defined Bitbucket URL -->
|
||||
<a href="{{ meta['bitbucket_url'] }}" class="fa fa-bitbucket"> {{ _('Edit on Bitbucket') }}</a>
|
||||
{% else %}
|
||||
<a href="https://bitbucket.org/{{ bitbucket_user }}/{{ bitbucket_repo }}/src/{{ bitbucket_version}}{{ conf_py_path }}{{ pagename }}{{ suffix }}?mode={{ theme_vcs_pageview_mode|default("view") }}" class="fa fa-bitbucket"> {{ _('Edit on Bitbucket') }}</a>
|
||||
{% endif %}
|
||||
{% elif display_gitlab %}
|
||||
{% if check_meta and 'gitlab_url' in meta %}
|
||||
<!-- User defined GitLab URL -->
|
||||
<a href="{{ meta['gitlab_url'] }}" class="fa fa-gitlab"> {{ _('Edit on GitLab') }}</a>
|
||||
{% else %}
|
||||
<a href="https://{{ gitlab_host|default("gitlab.com") }}/{{ gitlab_user }}/{{ gitlab_repo }}/{{ theme_vcs_pageview_mode|default("blob") }}/{{ gitlab_version }}{{ conf_py_path }}{{ pagename }}{{ suffix }}" class="fa fa-gitlab"> {{ _('Edit on GitLab') }}</a>
|
||||
{% endif %}
|
||||
{% elif show_source and source_url_prefix %}
|
||||
<a href="{{ source_url_prefix }}{{ pagename }}{{ suffix }}">{{ _('View page source') }}</a>
|
||||
{% elif show_source and has_source and sourcename %}
|
||||
<a href="{{ pathto('_sources/' + sourcename, true)|e }}" rel="nofollow"> {{ _('View page source') }}</a>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endblock %}
|
||||
</ul>
|
||||
|
||||
{% if (theme_prev_next_buttons_location == 'top' or theme_prev_next_buttons_location == 'both') and (next or prev) %}
|
||||
<div class="rst-breadcrumbs-buttons" role="navigation" aria-label="breadcrumb navigation">
|
||||
{% if next %}
|
||||
<a href="{{ next.link|e }}" class="btn btn-neutral float-right" title="{{ next.title|striptags|e }}" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
|
||||
{% endif %}
|
||||
{% if prev %}
|
||||
<a href="{{ prev.link|e }}" class="btn btn-neutral float-left" title="{{ prev.title|striptags|e }}" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<hr/>
|
||||
</div>
|
54
docs/source/nvidia_theme/footer.html
Normal file
|
@ -0,0 +1,54 @@
|
|||
<footer>
|
||||
{% if (theme_prev_next_buttons_location == 'bottom' or theme_prev_next_buttons_location == 'both') and (next or prev) %}
|
||||
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
|
||||
{% if next %}
|
||||
<a href="{{ next.link|e }}" class="btn btn-neutral float-right" title="{{ next.title|striptags|e }}" accesskey="n" rel="next">{{ _('Next') }} <span class="fa fa-arrow-circle-right"></span></a>
|
||||
{% endif %}
|
||||
{% if prev %}
|
||||
<a href="{{ prev.link|e }}" class="btn btn-neutral float-left" title="{{ prev.title|striptags|e }}" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> {{ _('Previous') }}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>
|
||||
{%- if show_copyright %}
|
||||
{%- if hasdoc('copyright') %}
|
||||
{% trans path=pathto('copyright'), copyright=copyright|e %}© <a href="{{ path }}">Copyright</a> {{ copyright }}{% endtrans %}
|
||||
{%- else %}
|
||||
{% trans copyright=copyright|e %}© Copyright {{ copyright }}{% endtrans %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
|
||||
{%- if build_id and build_url %}
|
||||
{% trans build_url=build_url, build_id=build_id %}
|
||||
<span class="build">
|
||||
Build
|
||||
<a href="{{ build_url }}">{{ build_id }}</a>.
|
||||
</span>
|
||||
{% endtrans %}
|
||||
{%- elif commit %}
|
||||
{% trans commit=commit %}
|
||||
<span class="commit">
|
||||
Revision <code>{{ commit }}</code>.
|
||||
</span>
|
||||
{% endtrans %}
|
||||
{%- elif last_updated %}
|
||||
<span class="lastupdated">
|
||||
{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
|
||||
</span>
|
||||
{%- endif %}
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{%- if show_sphinx %}
|
||||
{% trans %}Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>{% endtrans %}.
|
||||
{%- endif %}
|
||||
|
||||
{%- block extrafooter %} {% endblock %}
|
||||
|
||||
</footer>
|
||||
|
12
docs/source/nvidia_theme/layout.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
{% extends "!layout_base.html" %}
|
||||
{% block extrahead %}
|
||||
<link href="{{ pathto("_static/css/nvidia_theme.css", True) }}" rel="stylesheet" type="text/css">
|
||||
{# PROJECT NAME #}
|
||||
{% if theme_project_name %}
|
||||
<style>
|
||||
.wy-nav-content::before {
|
||||
content: "{{ theme_project_name }} Documentation";
|
||||
}
|
||||
</style>
|
||||
{% endif %}
|
||||
{% endblock %}
|
227
docs/source/nvidia_theme/layout_base.html
Normal file
|
@ -0,0 +1,227 @@
|
|||
{# TEMPLATE VAR SETTINGS #}
|
||||
{%- set url_root = pathto('', 1) %}
|
||||
{%- if url_root == '#' %}{% set url_root = '' %}{% endif %}
|
||||
{%- if not embedded and docstitle %}
|
||||
{%- set titlesuffix = " — "|safe + docstitle|e %}
|
||||
{%- else %}
|
||||
{%- set titlesuffix = "" %}
|
||||
{%- endif %}
|
||||
{%- set lang_attr = 'en' if language == None else (language | replace('_', '-')) %}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!--[if IE 8]><html class="no-js lt-ie9" lang="{{ lang_attr }}" > <![endif]-->
|
||||
<!--[if gt IE 8]><!--> <html class="no-js" lang="{{ lang_attr }}" > <!--<![endif]-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
{{ metatags }}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
{% block htmltitle %}
|
||||
<title>{{ title|striptags|e }}{{ titlesuffix }}</title>
|
||||
{% endblock %}
|
||||
|
||||
{# FAVICON #}
|
||||
<link rel="shortcut icon" href="{{ pathto('_static/images/favicon.ico', 1) }}"/>
|
||||
|
||||
{# CANONICAL URL #}
|
||||
{% if theme_canonical_url %}
|
||||
<link rel="canonical" href="{{ theme_canonical_url }}{{ pagename }}.html"/>
|
||||
{% endif %}
|
||||
|
||||
{# CSS #}
|
||||
|
||||
{# OPENSEARCH #}
|
||||
{% if not embedded %}
|
||||
{% if use_opensearch %}
|
||||
<link rel="search" type="application/opensearchdescription+xml"
|
||||
title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}"
|
||||
href="{{ pathto('_static/opensearch.xml', 1) }}"/>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
|
||||
{%- for css in css_files %}
|
||||
{%- if css|attr("rel") %}
|
||||
<link rel="{{ css.rel }}" href="{{ pathto(css.filename, 1) }}" type="text/css"{% if css.title is not none %} title="{{ css.title }}"{% endif %} />
|
||||
{%- else %}
|
||||
<link rel="stylesheet" href="{{ pathto(css, 1) }}" type="text/css" />
|
||||
{%- endif %}
|
||||
{%- endfor %}
|
||||
{%- for cssfile in extra_css_files %}
|
||||
<link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
|
||||
{%- endfor %}
|
||||
|
||||
{%- block linktags %}
|
||||
{%- if hasdoc('about') %}
|
||||
<link rel="author" title="{{ _('About these documents') }}" href="{{ pathto('about') }}" />
|
||||
{%- endif %}
|
||||
{%- if hasdoc('genindex') %}
|
||||
<link rel="index" title="{{ _('Index') }}" href="{{ pathto('genindex') }}" />
|
||||
{%- endif %}
|
||||
{%- if hasdoc('search') %}
|
||||
<link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}" />
|
||||
{%- endif %}
|
||||
{%- if hasdoc('copyright') %}
|
||||
<link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}" />
|
||||
{%- endif %}
|
||||
{%- if next %}
|
||||
<link rel="next" title="{{ next.title|striptags|e }}" href="{{ next.link|e }}" />
|
||||
{%- endif %}
|
||||
{%- if prev %}
|
||||
<link rel="prev" title="{{ prev.title|striptags|e }}" href="{{ prev.link|e }}" />
|
||||
{%- endif %}
|
||||
{%- endblock %}
|
||||
|
||||
{%- block extrahead %}
|
||||
{% endblock %}
|
||||
|
||||
{# Keep modernizr in head - http://modernizr.com/docs/#installing #}
|
||||
<script src="{{ pathto('_static/js/modernizr.min.js', 1) }}"></script>
|
||||
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
|
||||
{% block extrabody %} {% endblock %}
|
||||
<div class="wy-grid-for-nav">
|
||||
|
||||
{# SIDE NAV, TOGGLES ON MOBILE #}
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search">
|
||||
{% block sidebartitle %}
|
||||
|
||||
{% if logo and theme_logo_only %}
|
||||
<a href="{{ pathto(master_doc) }}">
|
||||
{% else %}
|
||||
<a href="{{ pathto(master_doc) }}" class="icon icon-home"> {{ project }}
|
||||
{% endif %}
|
||||
|
||||
{% if logo %}
|
||||
{# Not strictly valid HTML, but it's the only way to display/scale
|
||||
it properly, without weird scripting or heaps of work
|
||||
#}
|
||||
<img src="{{ pathto('_static/' + logo, 1) }}" class="logo" alt="Logo"/>
|
||||
{% endif %}
|
||||
</a>
|
||||
|
||||
{% if theme_display_version %}
|
||||
{%- set nav_version = version %}
|
||||
{% if READTHEDOCS and current_version %}
|
||||
{%- set nav_version = current_version %}
|
||||
{% endif %}
|
||||
{% if nav_version %}
|
||||
<div class="version">
|
||||
{{ nav_version }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% include "searchbox.html" %}
|
||||
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
|
||||
{% block menu %}
|
||||
{#
|
||||
The singlehtml builder doesn't handle this toctree call when the
|
||||
toctree is empty. Skip building this for now.
|
||||
#}
|
||||
{% if 'singlehtml' not in builder %}
|
||||
{% set global_toc = toctree(maxdepth=theme_navigation_depth|int,
|
||||
collapse=theme_collapse_navigation|tobool,
|
||||
includehidden=theme_includehidden|tobool,
|
||||
titles_only=theme_titles_only|tobool) %}
|
||||
{% endif %}
|
||||
{% if global_toc %}
|
||||
{{ global_toc }}
|
||||
{% else %}
|
||||
<!-- Local TOC -->
|
||||
<div class="local-toc">{{ toc }}</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||
|
||||
{# MOBILE NAV, TRIGGLES SIDE NAV ON TOGGLE #}
|
||||
<nav class="wy-nav-top" aria-label="top navigation">
|
||||
{% block mobile_nav %}
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="{{ pathto(master_doc) }}">{{ project }}</a>
|
||||
{% endblock %}
|
||||
</nav>
|
||||
|
||||
|
||||
<div class="wy-nav-content">
|
||||
{%- block content %}
|
||||
{% if theme_style_external_links|tobool %}
|
||||
<div class="rst-content style-external-links">
|
||||
{% else %}
|
||||
<div class="rst-content">
|
||||
{% endif %}
|
||||
{% include "breadcrumbs.html" %}
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
{%- block document %}
|
||||
<div itemprop="articleBody">
|
||||
{% block body %}{% endblock %}
|
||||
</div>
|
||||
{% if self.comments()|trim %}
|
||||
<div class="articleComments">
|
||||
{% block comments %}{% endblock %}
|
||||
</div>
|
||||
{% endif%}
|
||||
</div>
|
||||
{%- endblock %}
|
||||
{% include "footer.html" %}
|
||||
</div>
|
||||
{%- endblock %}
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
</div>
|
||||
{% include "versions.html" %}
|
||||
|
||||
{% if not embedded %}
|
||||
|
||||
{# XXX Sphinx 1.8.0 made this an external js-file, quick fix until we refactor the template to inherert more blocks directly from sphinx #}
|
||||
{% if sphinx_version >= "1.8.0" %}
|
||||
<script type="text/javascript" id="documentation_options" data-url_root="{{ pathto('', 1) }}" src="{{ pathto('_static/documentation_options.js', 1) }}"></script>
|
||||
{%- for scriptfile in script_files %}
|
||||
{{ js_tag(scriptfile) }}
|
||||
{%- endfor %}
|
||||
{% else %}
|
||||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'{{ url_root }}',
|
||||
VERSION:'{{ release|e }}',
|
||||
LANGUAGE:'{{ language }}',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'{{ '' if no_search_suffix else file_suffix }}',
|
||||
HAS_SOURCE: {{ has_source|lower }},
|
||||
SOURCELINK_SUFFIX: '{{ sourcelink_suffix }}'
|
||||
};
|
||||
</script>
|
||||
{%- for scriptfile in script_files %}
|
||||
<script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
|
||||
{%- endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
<script type="text/javascript" src="{{ pathto('_static/js/theme.js', 1) }}"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(function () {
|
||||
SphinxRtdTheme.Navigation.enable({{ 'true' if theme_sticky_navigation|tobool else 'false' }});
|
||||
});
|
||||
</script>
|
||||
|
||||
{%- block footer %} {% endblock %}
|
||||
|
||||
</body>
|
||||
</html>
|
54
docs/source/nvidia_theme/search.html
Normal file
|
@ -0,0 +1,54 @@
|
|||
{#
|
||||
basic/search.html
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
Template for the search page.
|
||||
|
||||
:copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS.
|
||||
:license: BSD, see LICENSE for details.
|
||||
#}
|
||||
{%- extends "layout.html" %}
|
||||
{% set title = _('Search') %}
|
||||
{%- block scripts %}
|
||||
{{ super() }}
|
||||
<script type="text/javascript" src="{{ pathto('_static/searchtools.js', 1) }}"></script>
|
||||
{%- endblock %}
|
||||
{% block footer %}
|
||||
<script type="text/javascript">
|
||||
jQuery(function() { Search.loadIndex("{{ pathto('searchindex.js', 1) }}"); });
|
||||
</script>
|
||||
{# this is used when loading the search index using $.ajax fails,
|
||||
such as on Chrome for documents on localhost #}
|
||||
<script type="text/javascript" id="searchindexloader"></script>
|
||||
{{ super() }}
|
||||
{% endblock %}
|
||||
{% block body %}
|
||||
<noscript>
|
||||
<div id="fallback" class="admonition warning">
|
||||
<p class="last">
|
||||
{% trans trimmed %}Please activate JavaScript to enable the search
|
||||
functionality.{% endtrans %}
|
||||
</p>
|
||||
</div>
|
||||
</noscript>
|
||||
|
||||
{% if search_performed %}
|
||||
{# Translators: Search is a noun, not a verb #}
|
||||
<h2>{{ _('Search Results') }}</h2>
|
||||
{% if not search_results %}
|
||||
<p>{{ _('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.') }}</p>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<div id="search-results">
|
||||
{% if search_results %}
|
||||
<ul>
|
||||
{% for href, caption, context in search_results %}
|
||||
<li>
|
||||
<a href="{{ pathto(item.href) }}">{{ caption }}</a>
|
||||
<p class="context">{{ context|e }}</p>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
9
docs/source/nvidia_theme/searchbox.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
{%- if builder != 'singlehtml' %}
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="{{ pathto('search') }}" method="get">
|
||||
<input type="text" name="q" placeholder="{{ _('Search docs') }}" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
</div>
|
||||
{%- endif %}
|
1
docs/source/nvidia_theme/static/css/badge_only.css
Normal file
|
@ -0,0 +1 @@
|
|||
.fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-weight:normal;font-style:normal;src:url("../fonts/fontawesome-webfont.eot");src:url("../fonts/fontawesome-webfont.eot?#iefix") format("embedded-opentype"),url("../fonts/fontawesome-webfont.woff") format("woff"),url("../fonts/fontawesome-webfont.ttf") format("truetype"),url("../fonts/fontawesome-webfont.svg#FontAwesome") format("svg")}.fa:before{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;text-decoration:inherit}a .fa{display:inline-block;text-decoration:inherit}li .fa{display:inline-block}li .fa-large:before,li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-0.8em}ul.fas li .fa{width:.8em}ul.fas li .fa-large:before,ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before{content:""}.icon-book:before{content:""}.fa-caret-down:before{content:""}.icon-caret-down:before{content:""}.fa-caret-up:before{content:""}.icon-caret-up:before{content:""}.fa-caret-left:before{content:""}.icon-caret-left:before{content:""}.fa-caret-right:before{content:""}.icon-caret-right:before{content:""}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;font-family:"Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;z-index:400}.rst-versions a{color:#2980B9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27AE60;*zoom:1}.rst-versions .rst-current-version:before,.rst-versions .rst-current-version:after{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book{float:left}.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#E74C3C;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#F1C40F;color:#000}.rst-versions.shift-up{height:auto;max-height:100%}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:gray;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:solid 1px #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px}.rst-versions.rst-badge .icon-book{float:none}.rst-versions.rst-badge .fa-book{float:none}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book{float:left}.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge .rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width: 768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}}
|
232
docs/source/nvidia_theme/static/css/nvidia_theme.css
Normal file
|
@ -0,0 +1,232 @@
|
|||
@import url('https://fonts.googleapis.com/css?family=Roboto:300,400,700');
|
||||
@import url("theme.css");
|
||||
|
||||
html, body,
|
||||
h1, h2, .rst-content .toctree-wrapper p.caption, h3, h4, h5, h6, legend {
|
||||
font-family: Roboto,Lato,"proxima-nova","Helvetica Neue",Arial,sans-serif;
|
||||
}
|
||||
|
||||
.rst-versions.rst-badge {
|
||||
right: auto;
|
||||
left: 0px;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
.rst-versions.rst-badge.shift-up .rst-current-version
|
||||
.fa-book, .rst-versions.rst-badge.shift-up .rst-current-version .icon-book {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.wy-nav-side {
|
||||
background-color: #fff;
|
||||
}
|
||||
.wy-side-nav-search {
|
||||
background-color: #fff;
|
||||
color: #666;
|
||||
padding: 0;
|
||||
margin-bottom: 0;
|
||||
padding-top: 48px;
|
||||
}
|
||||
|
||||
.wy-side-nav-search a.icon-home {
|
||||
background-color: #77B900;
|
||||
width: 100%;
|
||||
height: 48px;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top:0;
|
||||
width: 300px;
|
||||
z-index: 90;
|
||||
}
|
||||
|
||||
.wy-side-nav-search>div.version {
|
||||
margin:0;
|
||||
color: #ccc;
|
||||
position: absolute;
|
||||
top: 55px;
|
||||
right: 20px;
|
||||
}
|
||||
|
||||
.wy-side-nav-search>div.version::before {
|
||||
content: 'v';
|
||||
margin-right: -2px;
|
||||
}
|
||||
|
||||
.wy-side-nav-search>a, .wy-side-nav-search .wy-dropdown>a {
|
||||
color: #666;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.wy-side-nav-search .wy-form {
|
||||
padding: 1em;
|
||||
border-bottom: 1px solid #e1e1e1;
|
||||
}
|
||||
|
||||
.wy-side-nav-search input[type=text] {
|
||||
border-radius: 0;
|
||||
border-color: #ccc;
|
||||
box-shadow: none;
|
||||
font-size: 1.1em;
|
||||
margin: 1em 0 0 0;
|
||||
}
|
||||
|
||||
.wy-nav-content {
|
||||
/* position: relative; */
|
||||
max-width: none;
|
||||
border-top: 48px solid #77B900;
|
||||
}
|
||||
|
||||
.wy-nav-content::before {
|
||||
/* background-image: 'down at the bottom' */
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: #77b900;
|
||||
background-repeat: no-repeat;
|
||||
background-position: 25px center;
|
||||
width: 100%;
|
||||
height: 48px;
|
||||
z-index: 1000000;
|
||||
color: #fff;
|
||||
line-height: 48px;
|
||||
text-indent: 200px;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
.wy-menu-vertical > ul > li {
|
||||
border-bottom: 1px solid #e1e1e1;
|
||||
padding: .5em .3em;
|
||||
}
|
||||
.wy-menu-vertical a {
|
||||
color: #737373;
|
||||
}
|
||||
|
||||
.wy-menu-vertical a:hover,
|
||||
.wy-menu-vertical li.current a:hover {
|
||||
background-color: rgba(0,0,0,.1);
|
||||
}
|
||||
|
||||
.wy-menu-vertical li.current {
|
||||
background: rgba(255,255,255,.3);
|
||||
}
|
||||
|
||||
.wy-menu-vertical li.on a,
|
||||
.wy-menu-vertical li.current>a {
|
||||
font-weight: 400;
|
||||
color: #A1CC63;
|
||||
}
|
||||
|
||||
.wy-menu-vertical li.current ul {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.wy-menu-vertical li.toctree-l2.current>a,
|
||||
.wy-menu-vertical li.toctree-l2.current li.toctree-l3>a {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.wy-nav-content-wrap {
|
||||
|
||||
border-left: 1px solid #e1e1e1;
|
||||
}
|
||||
|
||||
.rst-content dl:not(.docutils) dt {
|
||||
color: #76b900;
|
||||
background: #deeec1;
|
||||
border-top: solid 3px #6f9c26;
|
||||
}
|
||||
.rst-content dl:not(.docutils) dt:before {
|
||||
color: #6f9c26;
|
||||
}
|
||||
.rst-content .viewcode-link, .rst-content .viewcode-back {
|
||||
color: #4d91d1;
|
||||
}
|
||||
|
||||
footer {
|
||||
height: 35px;
|
||||
max-height: 35px;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
/* fix for mobile */
|
||||
@media screen and (max-width: 768px) {
|
||||
.wy-side-nav-search a.icon-home {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
display:none;
|
||||
}
|
||||
|
||||
.wy-side-nav-search {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.wy-side-nav-search>div.version {
|
||||
top: 10px
|
||||
}
|
||||
|
||||
.wy-nav-top {
|
||||
background-color: #77b900;
|
||||
height: 48px;
|
||||
line-height: 36px;
|
||||
text-align: left;
|
||||
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
.wy-nav-top a {
|
||||
display: none;
|
||||
margin-left: 1em;
|
||||
}
|
||||
.wy-nav-top a::after {
|
||||
/* display: none; */
|
||||
content: 'Documentation';
|
||||
margin-left: .5em;
|
||||
}
|
||||
|
||||
.wy-nav-top i {
|
||||
padding-top: 3px;
|
||||
}
|
||||
|
||||
.wy-nav-content {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.wy-nav-content::before {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 60px;
|
||||
background-color: #77b900;
|
||||
background-repeat: no-repeat;
|
||||
background-position: 0 center;
|
||||
width: auto;
|
||||
height: 48px;
|
||||
z-index: 1000000;
|
||||
color: #fff;
|
||||
line-height: 48px;
|
||||
text-indent: 175px;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
}
|
||||
|
||||
/* remove a few borders */
|
||||
.wy-menu-vertical li.current a,
|
||||
.wy-menu-vertical li.on a,
|
||||
.wy-menu-vertical li.current>a {
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* hide things */
|
||||
/* .wy-side-nav-search>div.version, */
|
||||
.wy-side-nav-search a.icon-home img.logo,
|
||||
.wy-menu-vertical li.on a span.toctree-expand,
|
||||
.wy-menu-vertical li.current>a span.toctree-expand {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Out of my way */
|
||||
/* .wy-side-nav-search a.icon-home */
|
||||
.wy-nav-content::before {
|
||||
background-image: url('../images/nvidia_logo.png');
|
||||
background-size: 140px auto;
|
||||
/* text-indent: -9999px; */
|
||||
}
|
6
docs/source/nvidia_theme/static/css/theme.css
Normal file
10
docs/source/nvidia_theme/static/fonts/Lato/fonts.css
Executable file
|
@ -0,0 +1,10 @@
|
|||
/* Fonts */
|
||||
|
||||
@font-face {
|
||||
font-family: 'lato';
|
||||
src: url('lato-regular.woff2?#iefix') format('woff2'),
|
||||
url('lato-regular.woff') format('woff'),
|
||||
url('lato-regular.ttf') format('truetype');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
BIN
docs/source/nvidia_theme/static/fonts/Lato/lato-bold.ttf
Normal file
BIN
docs/source/nvidia_theme/static/fonts/Lato/lato-bold.woff
Normal file
BIN
docs/source/nvidia_theme/static/fonts/Lato/lato-bold.woff2
Normal file
BIN
docs/source/nvidia_theme/static/fonts/Lato/lato-regular.ttf
Executable file
BIN
docs/source/nvidia_theme/static/fonts/Lato/lato-regular.woff
Executable file
BIN
docs/source/nvidia_theme/static/fonts/Lato/lato-regular.woff2
Executable file
BIN
docs/source/nvidia_theme/static/fonts/fontawesome-webfont.eot
Normal file
2671
docs/source/nvidia_theme/static/fonts/fontawesome-webfont.svg
Normal file
After Width: | Height: | Size: 434 KiB |
BIN
docs/source/nvidia_theme/static/fonts/fontawesome-webfont.ttf
Normal file
BIN
docs/source/nvidia_theme/static/fonts/fontawesome-webfont.woff
Normal file
BIN
docs/source/nvidia_theme/static/fonts/fontawesome-webfont.woff2
Normal file
BIN
docs/source/nvidia_theme/static/images/favicon.ico
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
docs/source/nvidia_theme/static/images/nvidia_logo.png
Normal file
After Width: | Height: | Size: 48 KiB |
4
docs/source/nvidia_theme/static/js/modernizr.min.js
vendored
Normal file
3
docs/source/nvidia_theme/static/js/theme.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
/* sphinx_nvidia_theme version 0.4.2 | MIT license */
|
||||
/* Built 20181005 13:10 */
|
||||
require=function r(s,a,l){function c(e,n){if(!a[e]){if(!s[e]){var i="function"==typeof require&&require;if(!n&&i)return i(e,!0);if(u)return u(e,!0);var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}var o=a[e]={exports:{}};s[e][0].call(o.exports,function(n){return c(s[e][1][n]||n)},o,o.exports,r,s,a,l)}return a[e].exports}for(var u="function"==typeof require&&require,n=0;n<l.length;n++)c(l[n]);return c}({"sphinx-rtd-theme":[function(n,e,i){var jQuery="undefined"!=typeof window?window.jQuery:n("jquery");e.exports.ThemeNav={navBar:null,win:null,winScroll:!1,winResize:!1,linkScroll:!1,winPosition:0,winHeight:null,docHeight:null,isRunning:!1,enable:function(e){var i=this;void 0===e&&(e=!0),i.isRunning||(i.isRunning=!0,jQuery(function(n){i.init(n),i.reset(),i.win.on("hashchange",i.reset),e&&i.win.on("scroll",function(){i.linkScroll||i.winScroll||(i.winScroll=!0,requestAnimationFrame(function(){i.onScroll()}))}),i.win.on("resize",function(){i.winResize||(i.winResize=!0,requestAnimationFrame(function(){i.onResize()}))}),i.onResize()}))},enableSticky:function(){this.enable(!0)},init:function(i){i(document);var t=this;this.navBar=i("div.wy-side-scroll:first"),this.win=i(window),i(document).on("click","[data-toggle='wy-nav-top']",function(){i("[data-toggle='wy-nav-shift']").toggleClass("shift"),i("[data-toggle='rst-versions']").toggleClass("shift")}).on("click",".wy-menu-vertical .current ul li a",function(){var n=i(this);i("[data-toggle='wy-nav-shift']").removeClass("shift"),i("[data-toggle='rst-versions']").toggleClass("shift"),t.toggleCurrent(n),t.hashChange()}).on("click","[data-toggle='rst-current-version']",function(){i("[data-toggle='rst-versions']").toggleClass("shift-up")}),i("table.docutils:not(.field-list,.footnote,.citation)").wrap("<div class='wy-table-responsive'></div>"),i("table.docutils.footnote").wrap("<div class='wy-table-responsive footnote'></div>"),i("table.docutils.citation").wrap("<div class='wy-table-responsive citation'></div>"),i(".wy-menu-vertical ul").not(".simple").siblings("a").each(function(){var e=i(this);expand=i('<span class="toctree-expand"></span>'),expand.on("click",function(n){return t.toggleCurrent(e),n.stopPropagation(),!1}),e.prepend(expand)})},reset:function(){var n=encodeURI(window.location.hash)||"#";try{var e=$(".wy-menu-vertical"),i=e.find('[href="'+n+'"]');if(0===i.length){var t=$('.document [id="'+n.substring(1)+'"]').closest("div.section");0===(i=e.find('[href="#'+t.attr("id")+'"]')).length&&(i=e.find('[href="#"]'))}0<i.length&&($(".wy-menu-vertical .current").removeClass("current"),i.addClass("current"),i.closest("li.toctree-l1").addClass("current"),i.closest("li.toctree-l1").parent().addClass("current"),i.closest("li.toctree-l1").addClass("current"),i.closest("li.toctree-l2").addClass("current"),i.closest("li.toctree-l3").addClass("current"),i.closest("li.toctree-l4").addClass("current"))}catch(o){console.log("Error expanding nav for anchor",o)}},onScroll:function(){this.winScroll=!1;var n=this.win.scrollTop(),e=n+this.winHeight,i=this.navBar.scrollTop()+(n-this.winPosition);n<0||e>this.docHeight||(this.navBar.scrollTop(i),this.winPosition=n)},onResize:function(){this.winResize=!1,this.winHeight=this.win.height(),this.docHeight=$(document).height()},hashChange:function(){this.linkScroll=!0,this.win.one("hashchange",function(){this.linkScroll=!1})},toggleCurrent:function(n){var e=n.closest("li");e.siblings("li.current").removeClass("current"),e.siblings().find("li.current").removeClass("current"),e.find("> ul li.current").removeClass("current"),e.toggleClass("current")}},"undefined"!=typeof window&&(window.SphinxRtdTheme={Navigation:e.exports.ThemeNav,StickyNav:e.exports.ThemeNav}),function(){for(var r=0,n=["ms","moz","webkit","o"],e=0;e<n.length&&!window.requestAnimationFrame;++e)window.requestAnimationFrame=window[n[e]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[n[e]+"CancelAnimationFrame"]||window[n[e]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(n,e){var i=(new Date).getTime(),t=Math.max(0,16-(i-r)),o=window.setTimeout(function(){n(i+t)},t);return r=i+t,o}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(n){clearTimeout(n)})}()},{jquery:"jquery"}]},{},["sphinx-rtd-theme"]);
|
20
docs/source/nvidia_theme/theme.conf
Normal file
|
@ -0,0 +1,20 @@
|
|||
[theme]
|
||||
inherit = basic
|
||||
stylesheet = css/nvidia_theme.css
|
||||
pygments_style = default
|
||||
|
||||
[options]
|
||||
analytics_id =
|
||||
canonical_url =
|
||||
collapse_navigation = True
|
||||
display_version = True
|
||||
includehidden = True
|
||||
logo_only =
|
||||
logo_path =
|
||||
navigation_depth = 4
|
||||
prev_next_buttons_location = bottom
|
||||
project_name =
|
||||
project_version =
|
||||
sticky_navigation = True
|
||||
style_external_links = False
|
||||
titles_only =
|
37
docs/source/nvidia_theme/versions.html
Normal file
|
@ -0,0 +1,37 @@
|
|||
{% if READTHEDOCS %}
|
||||
{# Add rst-badge after rst-versions for small badge style. #}
|
||||
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions">
|
||||
<span class="rst-current-version" data-toggle="rst-current-version">
|
||||
<span class="fa fa-book"> Read the Docs</span>
|
||||
v: {{ current_version }}
|
||||
<span class="fa fa-caret-down"></span>
|
||||
</span>
|
||||
<div class="rst-other-versions">
|
||||
<dl>
|
||||
<dt>{{ _('Versions') }}</dt>
|
||||
{% for slug, url in versions %}
|
||||
<dd><a href="{{ url }}">{{ slug }}</a></dd>
|
||||
{% endfor %}
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>{{ _('Downloads') }}</dt>
|
||||
{% for type, url in downloads %}
|
||||
<dd><a href="{{ url }}">{{ type }}</a></dd>
|
||||
{% endfor %}
|
||||
</dl>
|
||||
<dl>
|
||||
<dt>{{ _('On Read the Docs') }}</dt>
|
||||
<dd>
|
||||
<a href="//{{ PRODUCTION_DOMAIN }}/projects/{{ slug }}/?fromdocs={{ slug }}">{{ _('Project Home') }}</a>
|
||||
</dd>
|
||||
<dd>
|
||||
<a href="//{{ PRODUCTION_DOMAIN }}/builds/{{ slug }}/?fromdocs={{ slug }}">{{ _('Builds') }}</a>
|
||||
</dd>
|
||||
</dl>
|
||||
<hr/>
|
||||
{% trans %}Free document hosting provided by <a href="http://www.readthedocs.org">Read the Docs</a>.{% endtrans %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
|
@ -62,14 +62,6 @@ class MNISTOptimizer(Config):
|
|||
class MNISTLeNet5Config(Config):
|
||||
"""
|
||||
Structured config for LeNet-5 model class - that also contains parameters of dataset and dataloader.
|
||||
|
||||
(This example shows that we can inherit from other configs.)
|
||||
|
||||
Args:
|
||||
dataset: MNIST dataset config.
|
||||
dataloader: Dataloader config.
|
||||
module: module config (default one).
|
||||
optim: Optimizer + Scheduler config.
|
||||
"""
|
||||
|
||||
dataset: MNISTDatasetConfig = MNISTDatasetConfig(width=32, height=32)
|
||||
|
@ -78,8 +70,11 @@ class MNISTLeNet5Config(Config):
|
|||
optim: MNISTOptimizer = MNISTOptimizer()
|
||||
|
||||
|
||||
@experimental
|
||||
class MNISTLeNet5(ModelPT):
|
||||
"""
|
||||
The LeNet-5 convolutional model.
|
||||
"""
|
||||
|
||||
def __init__(self, cfg: MNISTLeNet5Config = MNISTLeNet5Config()):
|
||||
super().__init__(cfg=cfg)
|
||||
|
||||
|
@ -89,18 +84,27 @@ class MNISTLeNet5(ModelPT):
|
|||
|
||||
@property
|
||||
def input_types(self) -> Optional[Dict[str, NeuralType]]:
|
||||
"""
|
||||
Returns:
|
||||
:class:`LeNet5Module` input types.
|
||||
"""
|
||||
return self.module.input_types
|
||||
|
||||
@property
|
||||
def output_types(self) -> Optional[Dict[str, NeuralType]]:
|
||||
"""
|
||||
Returns:
|
||||
:class:`LeNet5Module` output types.
|
||||
"""
|
||||
return self.module.output_types
|
||||
|
||||
@typecheck()
|
||||
def forward(self, images):
|
||||
""" Propagates data by calling the module :class:`LeNet5Module` forward. """
|
||||
return self.module.forward(images=images)
|
||||
|
||||
def setup_training_data(self, train_data_layer_config: Optional[Dict] = None):
|
||||
""" Create dataset, wrap it with dataloader and return the latter """
|
||||
""" Creates dataset, wrap it with dataloader and return the latter """
|
||||
# Instantiate dataset.
|
||||
mnist_ds = MNISTDataset(self._cfg.dataset)
|
||||
# Configure data loader.
|
||||
|
@ -108,12 +112,15 @@ class MNISTLeNet5(ModelPT):
|
|||
self._train_dl = train_dataloader
|
||||
|
||||
def setup_validation_data(self, val_data_layer_config: Optional[Dict] = None):
|
||||
""" Not implemented. """
|
||||
self._val_dl = None
|
||||
|
||||
def setup_test_data(self, test_data_layer_params: Optional[Dict] = None):
|
||||
""" Not implemented. """
|
||||
self._test_dl = None
|
||||
|
||||
def training_step(self, batch, what_is_this_input):
|
||||
""" Training step, calculate loss. """
|
||||
# "Unpack" the batch.
|
||||
_, images, targets, _ = batch
|
||||
|
||||
|
@ -128,19 +135,24 @@ class MNISTLeNet5(ModelPT):
|
|||
# of course "return loss" doesn't work :]
|
||||
|
||||
def train_dataloader(self):
|
||||
""" Not implemented. """
|
||||
return self._train_dl
|
||||
|
||||
def save_to(self, save_path: str):
|
||||
""" Not implemented. """
|
||||
pass
|
||||
|
||||
@classmethod
|
||||
def restore_from(cls, restore_path: str):
|
||||
""" Not implemented. """
|
||||
pass
|
||||
|
||||
@classmethod
|
||||
def list_available_models(cls) -> Optional[Dict[str, str]]:
|
||||
""" Not implemented. """
|
||||
pass
|
||||
|
||||
@classmethod
|
||||
def from_pretrained(cls, name: str):
|
||||
""" Not implemented. """
|
||||
pass
|
||||
|
|
|
@ -33,4 +33,4 @@ known_localfolder = nemo,tests
|
|||
sections = FUTURE,STDLIB,THIRDPARTY,LOCALFOLDER
|
||||
default_section = THIRDPARTY
|
||||
#TODO tests/unit/core/test_deploy_export.py gets screwed by isort
|
||||
skip = setup.py, docs/sources/source/conf.py, nemo/utils/__init__.py, tests/unit/core/test_deploy_export.py, docs/docs_zh/sources/source/conf.py
|
||||
skip = setup.py, docs/source/conf.py, nemo/utils/__init__.py, tests/unit/core/test_deploy_export.py
|
||||
|
|