Unverified Commit fac7364a authored by Yuge Zhang's avatar Yuge Zhang Committed by GitHub
Browse files

Isolate toctree from overview (#4747)

parent 47c77363
...@@ -7,6 +7,7 @@ import os ...@@ -7,6 +7,7 @@ import os
from docutils.parsers.rst import Directive, directives from docutils.parsers.rst import Directive, directives
from docutils.statemachine import StringList from docutils.statemachine import StringList
from docutils import nodes from docutils import nodes
from sphinx.addnodes import pending_xref
TAG_TEMPLATE = """<span class="card-link-tag">{tag}</span>""" TAG_TEMPLATE = """<span class="card-link-tag">{tag}</span>"""
...@@ -14,12 +15,12 @@ TAGS_TEMPLATE = """ ...@@ -14,12 +15,12 @@ TAGS_TEMPLATE = """
<p class="card-link-summary">{tags}</p> <p class="card-link-summary">{tags}</p>
""" """
CARD_TEMPLATE = """ CARD_HEADER = """
.. raw:: html .. raw:: html
<div class="card-link admonition"> <div class="card-link admonition">
<a href="{link}"> <a class="card-link-clickable" href="#">
<div class="card-link-body"> <div class="card-link-body">
...@@ -46,6 +47,10 @@ CARD_TEMPLATE = """ ...@@ -46,6 +47,10 @@ CARD_TEMPLATE = """
</div> </div>
</a> </a>
"""
CARD_FOOTER = """
.. raw:: html
</div> </div>
""" """
...@@ -95,15 +100,30 @@ class CustomCardItemDirective(Directive): ...@@ -95,15 +100,30 @@ class CustomCardItemDirective(Directive):
else: else:
tags_rst = '' tags_rst = ''
card_rst = CARD_TEMPLATE.format(header=header, card_rst = CARD_HEADER.format(
header=header,
image=image, image=image,
image_background=image_background, image_background=image_background,
link=link, link=link,
description=description, description=description,
tags=tags_rst) tags=tags_rst)
card_list = StringList(card_rst.split('\n'))
card = nodes.paragraph() card = nodes.paragraph()
self.state.nested_parse(card_list, self.content_offset, card) self.state.nested_parse(StringList(card_rst.split('\n')), self.content_offset, card)
# This needs to corporate with javascript: propagate_card_link.
# because sphinx can't correctly handle image in a `pending_xref` after `keepformat`.
link_node = pending_xref('<a/>',
reftype='doc',
refdomain='std',
reftarget=link,
refexplicit=False,
refwarn=True)
link_node += nodes.paragraph(header)
link_node['classes'] = ['card-link-anchor']
card += link_node
self.state.nested_parse(StringList(CARD_FOOTER.split('\n')), self.content_offset, card)
return [card] return [card]
......
"""
Make sure pages that contain toctree only has a toctree,
because, if our theme is used, other contents will not be visible.
"""
import re
from docutils import nodes
from sphinx.application import Sphinx
from sphinx.addnodes import toctree
from sphinx.util.logging import getLogger
logger = getLogger('toctree_check')
def _strip_compound(node):
if isinstance(node, nodes.compound):
return _strip_compound(node[0])
return node
def toctree_check(app: Sphinx, doctree: nodes.document, docname: str):
whitelist = app.config.toctree_check_whitelist
if docname in whitelist:
return
# Scan top-level nodes
has_toctree = False
other_types = []
for i in range(len(doctree[0])):
node = doctree[0][i]
if isinstance(_strip_compound(node), toctree):
has_toctree = True
elif isinstance(_strip_compound(node), nodes.title):
# Allow title
pass
else:
other_types.append(type(_strip_compound(node)))
if has_toctree and other_types:
# We don't allow a document with toctree to have other types of contents
logger.warning('Expect a toctree document to contain only a toctree, '
'but found other types of contents: %s', str(set(other_types)),
location=docname)
def setup(app):
app.connect('doctree-resolved', toctree_check)
app.add_config_value('toctree_check_whitelist', [], True)
Advanced Usage Advanced Usage
============== ==============
NNI supports customized compression process for advanced users and provides some practical tools that are used in the compression process.
Users only need to implement the part they care about following the nni interface to use all other related compression pipelines in nni.
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
......
...@@ -56,7 +56,7 @@ If users want to apply both, a sequential mode is recommended as common practise ...@@ -56,7 +56,7 @@ If users want to apply both, a sequential mode is recommended as common practise
.. note:: .. note::
Note that NNI pruners or quantizers are not meant to physically compact the model but for simulating the compression effect. Whereas NNI speedup tool can truly compress model by changing the network architecture and therefore reduce latency. Note that NNI pruners or quantizers are not meant to physically compact the model but for simulating the compression effect. Whereas NNI speedup tool can truly compress model by changing the network architecture and therefore reduce latency.
To obtain a truly compact model, users should conduct :doc:`pruning speedup <../tutorials/cp_pruning_speedup>` or :doc:`quantizaiton speedup <../tutorials/cp_quantization_speedup>`. To obtain a truly compact model, users should conduct :doc:`pruning speedup <../tutorials/pruning_speedup>` or :doc:`quantizaiton speedup <../tutorials/quantization_speedup>`.
The interface and APIs are unified for both PyTorch and TensorFlow. Currently only PyTorch version has been supported, and TensorFlow version will be supported in future. The interface and APIs are unified for both PyTorch and TensorFlow. Currently only PyTorch version has been supported, and TensorFlow version will be supported in future.
...@@ -75,8 +75,8 @@ The following figure shows how NNI prunes and speeds up your models. ...@@ -75,8 +75,8 @@ The following figure shows how NNI prunes and speeds up your models.
:align: center :align: center
:alt: :alt:
The detailed tutorial of Speedup Model with Mask can be found :doc:`here <../tutorials/cp_pruning_speedup>`. The detailed tutorial of Speedup Model with Mask can be found :doc:`here <../tutorials/pruning_speedup>`.
The detailed tutorial of Speedup Model with Calibration Config can be found :doc:`here <../tutorials/cp_quantization_speedup>`. The detailed tutorial of Speedup Model with Calibration Config can be found :doc:`here <../tutorials/quantization_speedup>`.
.. attention:: .. attention::
......
.. 8106afa0f255f5f0f75fb94dd1c0badd .. 3f7d3620b31e7bab985f1429044b7adc
模型压缩 模型压缩
======== ========
...@@ -58,7 +58,7 @@ NNI中模型压缩的整体流程如上图所示。 ...@@ -58,7 +58,7 @@ NNI中模型压缩的整体流程如上图所示。
.. note:: .. note::
值得注意的是,NNI的pruner或quantizer并不能改变网络结构,只能模拟压缩的效果。 值得注意的是,NNI的pruner或quantizer并不能改变网络结构,只能模拟压缩的效果。
真正能够压缩模型、改变网络结构、降低推理延迟的是NNI的加速工具。 真正能够压缩模型、改变网络结构、降低推理延迟的是NNI的加速工具。
为了获得一个真正的压缩的模型,用户需要执行 :doc:`剪枝加速 <../tutorials/cp_pruning_speedup>` or :doc:`量化加速 <../tutorials/cp_quantization_speedup>`. 为了获得一个真正的压缩的模型,用户需要执行 :doc:`剪枝加速 <../tutorials/pruning_speedup>` or :doc:`量化加速 <../tutorials/quantization_speedup>`.
PyTorch和TensorFlow的接口都是统一的。目前只支持PyTorch版本,未来将支持TensorFlow版本。 PyTorch和TensorFlow的接口都是统一的。目前只支持PyTorch版本,未来将支持TensorFlow版本。
...@@ -77,8 +77,8 @@ NNI中模型压缩的整体流程如上图所示。 ...@@ -77,8 +77,8 @@ NNI中模型压缩的整体流程如上图所示。
:align: center :align: center
:alt: :alt:
关于用掩码进行模型加速的详细文档可以参考 :doc:`here <../tutorials/cp_pruning_speedup>`. 关于用掩码进行模型加速的详细文档可以参考 :doc:`here <../tutorials/pruning_speedup>`.
关于用校准配置进行模型加速的详细文档可以参考 :doc:`here <../tutorials/cp_quantization_speedup>`. 关于用校准配置进行模型加速的详细文档可以参考 :doc:`here <../tutorials/quantization_speedup>`.
.. attention:: .. attention::
......
...@@ -104,6 +104,6 @@ In the dependency-aware mode, the pruner will provide a better speed gain from t ...@@ -104,6 +104,6 @@ In the dependency-aware mode, the pruner will provide a better speed gain from t
:hidden: :hidden:
:maxdepth: 2 :maxdepth: 2
Quickstart <../tutorials/cp_pruning_quick_start_mnist> Quickstart <../tutorials/pruning_quick_start_mnist>
Pruner <pruner> Pruner <pruner>
Speedup <../tutorials/cp_pruning_speedup> Speedup <../tutorials/pruning_speedup>
...@@ -14,6 +14,6 @@ You can also :doc:`create your own quantizer <../tutorials/quantization_customiz ...@@ -14,6 +14,6 @@ You can also :doc:`create your own quantizer <../tutorials/quantization_customiz
:hidden: :hidden:
:maxdepth: 2 :maxdepth: 2
Quickstart <../tutorials/cp_quantization_quick_start_mnist> Quickstart <../tutorials/quantization_quick_start_mnist>
Quantizer <quantizer> Quantizer <quantizer>
SpeedUp <../tutorials/cp_quantization_speedup> SpeedUp <../tutorials/quantization_speedup>
...@@ -65,6 +65,7 @@ extensions = [ ...@@ -65,6 +65,7 @@ extensions = [
'cardlinkitem', 'cardlinkitem',
'codesnippetcard', 'codesnippetcard',
'patch_autodoc', 'patch_autodoc',
'toctree_check',
] ]
# Autosummary related settings # Autosummary related settings
...@@ -142,16 +143,27 @@ sphinx_tabs_disable_css_loading = True ...@@ -142,16 +143,27 @@ sphinx_tabs_disable_css_loading = True
# The anchors will be replaced to avoid dupilcate labels. # The anchors will be replaced to avoid dupilcate labels.
# Target should start with ``cp_`` to be properly ignored in git. # Target should start with ``cp_`` to be properly ignored in git.
tutorials_copy_list = [ tutorials_copy_list = [
# The global quickstart # Seems that we don't need it for now.
('tutorials/hpo_quickstart_pytorch/main.rst', 'tutorials/hpo_quickstart_pytorch/cp_global_quickstart_hpo.rst'), # Add tuples back if we need it in future.
('tutorials/hello_nas.rst', 'tutorials/cp_global_quickstart_nas.rst'),
('tutorials/pruning_quick_start_mnist.rst', 'tutorials/cp_global_quickstart_compression.rst'), # ('tutorials/pruning_quick_start_mnist.rst', 'tutorials/cp_pruning_quick_start_mnist.rst'),
# ('tutorials/pruning_speedup.rst', 'tutorials/cp_pruning_speedup.rst'),
# Others in full-scale materials # ('tutorials/quantization_quick_start_mnist.rst', 'tutorials/cp_quantization_quick_start_mnist.rst'),
('tutorials/pruning_quick_start_mnist.rst', 'tutorials/cp_pruning_quick_start_mnist.rst'), # ('tutorials/quantization_speedup.rst', 'tutorials/cp_quantization_speedup.rst'),
('tutorials/pruning_speedup.rst', 'tutorials/cp_pruning_speedup.rst'), ]
('tutorials/quantization_quick_start_mnist.rst', 'tutorials/cp_quantization_quick_start_mnist.rst'),
('tutorials/quantization_speedup.rst', 'tutorials/cp_quantization_speedup.rst'), # Toctree ensures that toctree docs do not contain any other contents.
# Home page should be an exception.
toctree_check_whitelist = [
'index',
# FIXME: Other exceptions should be correctly handled.
'nas/index',
'nas/benchmarks',
'compression/index',
'compression/pruning',
'compression/quantization',
'hpo/hpo_benchmark',
] ]
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
......
Examples Examples
======== ========
.. TOC
.. toctree::
:maxdepth: 2
:hidden:
tutorials/pruning_quick_start_mnist
tutorials/pruning_speedup
tutorials/quantization_quick_start_mnist
tutorials/quantization_speedup
.. ----------------------
More examples can be found in our :githublink:`GitHub repository <nni/examples>`. More examples can be found in our :githublink:`GitHub repository <nni/examples>`.
.. cardlinkitem:: .. cardlinkitem::
:header: HPO Quickstart with PyTorch :header: HPO Quickstart with PyTorch
:description: Use HPO to tune a PyTorch FashionMNIST model :description: Use HPO to tune a PyTorch FashionMNIST model
:link: tutorials/hpo_quickstart_pytorch/main.html :link: tutorials/hpo_quickstart_pytorch/main
:image: ../img/thumbnails/hpo-pytorch.svg :image: ../img/thumbnails/hpo-pytorch.svg
:background: purple :background: purple
:tags: HPO :tags: HPO
...@@ -27,7 +14,7 @@ More examples can be found in our :githublink:`GitHub repository <nni/examples>` ...@@ -27,7 +14,7 @@ More examples can be found in our :githublink:`GitHub repository <nni/examples>`
.. cardlinkitem:: .. cardlinkitem::
:header: HPO Quickstart with TensorFlow :header: HPO Quickstart with TensorFlow
:description: Use HPO to tune a TensorFlow MNIST model :description: Use HPO to tune a TensorFlow MNIST model
:link: tutorials/hpo_quickstart_tensorflow/main.html :link: tutorials/hpo_quickstart_tensorflow/main
:image: ../img/thumbnails/hpo-tensorflow.svg :image: ../img/thumbnails/hpo-tensorflow.svg
:background: purple :background: purple
:tags: HPO :tags: HPO
...@@ -35,7 +22,7 @@ More examples can be found in our :githublink:`GitHub repository <nni/examples>` ...@@ -35,7 +22,7 @@ More examples can be found in our :githublink:`GitHub repository <nni/examples>`
.. cardlinkitem:: .. cardlinkitem::
:header: Hello, NAS! :header: Hello, NAS!
:description: Beginners' NAS tutorial on how to search for neural architectures for MNIST dataset. :description: Beginners' NAS tutorial on how to search for neural architectures for MNIST dataset.
:link: tutorials/hello_nas.html :link: tutorials/hello_nas
:image: ../img/thumbnails/nas-tutorial.svg :image: ../img/thumbnails/nas-tutorial.svg
:background: cyan :background: cyan
:tags: NAS :tags: NAS
...@@ -43,7 +30,7 @@ More examples can be found in our :githublink:`GitHub repository <nni/examples>` ...@@ -43,7 +30,7 @@ More examples can be found in our :githublink:`GitHub repository <nni/examples>`
.. cardlinkitem:: .. cardlinkitem::
:header: Use NAS Benchmarks as Datasets :header: Use NAS Benchmarks as Datasets
:description: Query data from popular NAS benchmarks from our preprocessed benchmark database. :description: Query data from popular NAS benchmarks from our preprocessed benchmark database.
:link: tutorials/nasbench_as_dataset.html :link: tutorials/nasbench_as_dataset
:image: ../img/thumbnails/nas-benchmark.svg :image: ../img/thumbnails/nas-benchmark.svg
:background: cyan :background: cyan
:tags: NAS :tags: NAS
...@@ -51,7 +38,7 @@ More examples can be found in our :githublink:`GitHub repository <nni/examples>` ...@@ -51,7 +38,7 @@ More examples can be found in our :githublink:`GitHub repository <nni/examples>`
.. cardlinkitem:: .. cardlinkitem::
:header: Get Started with Model Pruning on MNIST :header: Get Started with Model Pruning on MNIST
:description: Familiarize yourself with pruning to compress your model :description: Familiarize yourself with pruning to compress your model
:link: tutorials/pruning_quick_start_mnist.html :link: tutorials/pruning_quick_start_mnist
:image: ../img/thumbnails/pruning-tutorial.svg :image: ../img/thumbnails/pruning-tutorial.svg
:background: blue :background: blue
:tags: Compression :tags: Compression
...@@ -59,7 +46,7 @@ More examples can be found in our :githublink:`GitHub repository <nni/examples>` ...@@ -59,7 +46,7 @@ More examples can be found in our :githublink:`GitHub repository <nni/examples>`
.. cardlinkitem:: .. cardlinkitem::
:header: Get Started with Model Quantization on MNIST :header: Get Started with Model Quantization on MNIST
:description: Familiarize yourself with quantization to compress your model :description: Familiarize yourself with quantization to compress your model
:link: tutorials/quantization_quick_start_mnist.html :link: tutorials/quantization_quick_start_mnist
:image: ../img/thumbnails/quantization-tutorial.svg :image: ../img/thumbnails/quantization-tutorial.svg
:background: indigo :background: indigo
:tags: Compression :tags: Compression
...@@ -67,7 +54,7 @@ More examples can be found in our :githublink:`GitHub repository <nni/examples>` ...@@ -67,7 +54,7 @@ More examples can be found in our :githublink:`GitHub repository <nni/examples>`
.. cardlinkitem:: .. cardlinkitem::
:header: Speedup Model with Mask :header: Speedup Model with Mask
:description: Make your model real smaller and faster with speed-up after pruned by pruner :description: Make your model real smaller and faster with speed-up after pruned by pruner
:link: tutorials/pruning_speedup.html :link: tutorials/pruning_speedup
:image: ../img/thumbnails/pruning-speed-up.svg :image: ../img/thumbnails/pruning-speed-up.svg
:background: blue :background: blue
:tags: Compression :tags: Compression
...@@ -75,7 +62,7 @@ More examples can be found in our :githublink:`GitHub repository <nni/examples>` ...@@ -75,7 +62,7 @@ More examples can be found in our :githublink:`GitHub repository <nni/examples>`
.. cardlinkitem:: .. cardlinkitem::
:header: Speedup Model with Calibration Config :header: Speedup Model with Calibration Config
:description: Make your model real smaller and faster with speed-up after quantized by quantizer :description: Make your model real smaller and faster with speed-up after quantized by quantizer
:link: tutorials/quantization_speedup.html :link: tutorials/quantization_speedup
:image: ../img/thumbnails/quantization-speed-up.svg :image: ../img/thumbnails/quantization-speed-up.svg
:background: indigo :background: indigo
:tags: Compression :tags: Compression
...@@ -6,7 +6,7 @@ An experiment can be created with command line tool ``nnictl`` or python APIs. N ...@@ -6,7 +6,7 @@ An experiment can be created with command line tool ``nnictl`` or python APIs. N
Management with ``nnictl`` Management with ``nnictl``
-------------------------- --------------------------
The ability of ``nnictl`` on experiment management is almost equivalent to :doc:`./webui`. Users can refer to :doc:`../reference/nnictl` for detailed usage. It is highly suggested when visualization is not well supported in your environment (e.g., no GUI on your machine). The ability of ``nnictl`` on experiment management is almost equivalent to :doc:`web_portal/web_portal`. Users can refer to :doc:`../reference/nnictl` for detailed usage. It is highly suggested when visualization is not well supported in your environment (e.g., no GUI on your machine).
Management with web portal Management with web portal
-------------------------- --------------------------
......
NNI Experiment Overview of NNI Experiment
============== ==========================
An NNI experiment is a unit of one tuning process. For example, it is one run of hyper-parameter tuning on a specific search space, it is one run of neural architecture search on a search space, or it is one run of automatic model compression on user specified goal on latency and accuracy. Usually, the tuning process requires many trials to explore feasible and potentially good-performing models. Thus, an important component of NNI experiment is **training service**, which is a unified interface to abstract diverse computation resources (e.g., local machine, remote servers, AKS). Users can easily run the tuning process on their prefered computation resource and platform. On the other hand, NNI experiment provides **WebUI** to visualize the tuning process to users. An NNI experiment is a unit of one tuning process. For example, it is one run of hyper-parameter tuning on a specific search space, it is one run of neural architecture search on a search space, or it is one run of automatic model compression on user specified goal on latency and accuracy. Usually, the tuning process requires many trials to explore feasible and potentially good-performing models. Thus, an important component of NNI experiment is **training service**, which is a unified interface to abstract diverse computation resources (e.g., local machine, remote servers, AKS). Users can easily run the tuning process on their prefered computation resource and platform. On the other hand, NNI experiment provides **WebUI** to visualize the tuning process to users.
...@@ -11,11 +11,8 @@ The relation of the components in NNI experiment is illustrated in the following ...@@ -11,11 +11,8 @@ The relation of the components in NNI experiment is illustrated in the following
:scale: 80 % :scale: 80 %
:align: center :align: center
Before reading the following content, you are recommended to go through the quick start first. Before reading the following content, you are recommended to go through either :doc:`the quickstart of HPO </tutorials/hpo_quickstart_pytorch/main>` or :doc:`quickstart of NAS </tutorials/hello_nas>` first.
.. toctree:: * :doc:`Overview of NNI training service <training_service/overview>`
:maxdepth: 2 * :doc:`Introduction to Web Portal <web_portal/web_portal>`
* :doc:`Manange Multiple Experiments <experiment_management>`
Training Services <training_service>
Web Portal <web_portal>
Experiment Management <exp_management>
\ No newline at end of file
Experiment
==========
.. toctree::
:maxdepth: 2
Overview <overview>
Training Service <training_service/toctree>
Web Portal <web_portal/toctree>
Experiment Management <experiment_management>
...@@ -16,11 +16,11 @@ Prerequisite ...@@ -16,11 +16,11 @@ Prerequisite
4. Log into your Azure account with a web browser and create a Machine Learning resource. You will need to choose a resource group and specific a workspace name. Then download ``config.json`` which will be used later. 4. Log into your Azure account with a web browser and create a Machine Learning resource. You will need to choose a resource group and specific a workspace name. Then download ``config.json`` which will be used later.
.. image:: ../../img/aml_workspace.png .. image:: ../../../img/aml_workspace.png
5. Create an AML cluster as the compute target. 5. Create an AML cluster as the compute target.
.. image:: ../../img/aml_cluster.png .. image:: ../../../img/aml_cluster.png
6. Open a command line and install AML package environment. 6. Open a command line and install AML package environment.
......
...@@ -10,8 +10,8 @@ System architecture ...@@ -10,8 +10,8 @@ System architecture
------------------- -------------------
.. image:: ../../img/NNIDesign.jpg .. image:: ../../../img/NNIDesign.jpg
:target: ../../img/NNIDesign.jpg :target: ../../../img/NNIDesign.jpg
:alt: :alt:
...@@ -175,8 +175,8 @@ NNI offers a TrialKeeper tool to help maintaining trial jobs. Users can find the ...@@ -175,8 +175,8 @@ NNI offers a TrialKeeper tool to help maintaining trial jobs. Users can find the
The running architecture of TrialKeeper is show as follow: The running architecture of TrialKeeper is show as follow:
.. image:: ../../img/trialkeeper.jpg .. image:: ../../../img/trialkeeper.jpg
:target: ../../img/trialkeeper.jpg :target: ../../../img/trialkeeper.jpg
:alt: :alt:
......
...@@ -61,8 +61,8 @@ Prerequisite for Azure Kubernetes Service ...@@ -61,8 +61,8 @@ Prerequisite for Azure Kubernetes Service
Design Design
------ ------
.. image:: ../../img/kubeflow_training_design.png .. image:: ../../../img/kubeflow_training_design.png
:target: ../../img/kubeflow_training_design.png :target: ../../../img/kubeflow_training_design.png
:alt: :alt:
Kubeflow training service instantiates a Kubernetes rest client to interact with your K8s cluster's API server. Kubeflow training service instantiates a Kubernetes rest client to interact with your K8s cluster's API server.
......
...@@ -10,22 +10,22 @@ Prerequisite ...@@ -10,22 +10,22 @@ Prerequisite
2. Get token. Open web portal of OpenPAI, and click ``My profile`` button in the top-right side. 2. Get token. Open web portal of OpenPAI, and click ``My profile`` button in the top-right side.
.. image:: ../../img/pai_profile.jpg .. image:: ../../../img/pai_profile.jpg
:scale: 80% :scale: 80%
Click ``copy`` button in the page to copy a jwt token. Click ``copy`` button in the page to copy a jwt token.
.. image:: ../../img/pai_token.jpg .. image:: ../../../img/pai_token.jpg
:scale: 67% :scale: 67%
3. Mount NFS storage to local machine. If you don't know where to find the NFS storage, please click ``Submit job`` button in web portal. 3. Mount NFS storage to local machine. If you don't know where to find the NFS storage, please click ``Submit job`` button in web portal.
.. image:: ../../img/pai_job_submission_page.jpg .. image:: ../../../img/pai_job_submission_page.jpg
:scale: 50% :scale: 50%
Find the data management region in job submission page. Find the data management region in job submission page.
.. image:: ../../img/pai_data_management_page.jpg .. image:: ../../../img/pai_data_management_page.jpg
:scale: 33% :scale: 33%
The ``Preview container paths`` is the NFS host and path that OpenPAI provided, you need to mount the corresponding host and path to your local machine first, then NNI could use the OpenPAI's NFS storage to upload data/code to or download from OpenPAI cluster. To mount the storage, please use ``mount`` command, for example: The ``Preview container paths`` is the NFS host and path that OpenPAI provided, you need to mount the corresponding host and path to your local machine first, then NNI could use the OpenPAI's NFS storage to upload data/code to or download from OpenPAI cluster. To mount the storage, please use ``mount`` command, for example:
...@@ -69,13 +69,13 @@ Once completing the configuration and run nnictl / use Python to launch the expe ...@@ -69,13 +69,13 @@ Once completing the configuration and run nnictl / use Python to launch the expe
The job name format is something like ``nni_exp_{experiment_id}_trial_{trial_id}``. You can see jobs created by NNI on the OpenPAI cluster's web portal, like: The job name format is something like ``nni_exp_{experiment_id}_trial_{trial_id}``. You can see jobs created by NNI on the OpenPAI cluster's web portal, like:
.. image:: ../../img/nni_pai_joblist.jpg .. image:: ../../../img/nni_pai_joblist.jpg
.. note:: For OpenPAI training service, NNI will start an additional rest server and listen on a port which is your NNI WebUI's port plus 1. For example, if your WebUI port is ``8080``, the rest server will listen on ``8081``, to receive metrics from trial job running in Kubernetes. So you should ``enable 8081`` TCP port in your firewall rule to allow incoming traffic. .. note:: For OpenPAI training service, NNI will start an additional rest server and listen on a port which is your NNI WebUI's port plus 1. For example, if your WebUI port is ``8080``, the rest server will listen on ``8081``, to receive metrics from trial job running in Kubernetes. So you should ``enable 8081`` TCP port in your firewall rule to allow incoming traffic.
Once a trial job is completed, you can go to NNI WebUI's overview page (like ``http://localhost:8080/oview``) to check trial's information. For example, you can expand a trial information in trial list view, click the logPath link like: Once a trial job is completed, you can go to NNI WebUI's overview page (like ``http://localhost:8080/oview``) to check trial's information. For example, you can expand a trial information in trial list view, click the logPath link like:
.. image:: ../../img/nni_webui_joblist.png .. image:: ../../../img/nni_webui_joblist.png
:scale: 30% :scale: 30%
Configuration References Configuration References
...@@ -137,7 +137,7 @@ Check policy: ...@@ -137,7 +137,7 @@ Check policy:
If you could not run your experiment and want to know if it is caused by version check, you could check your webUI, and there will be an error message about version check. If you could not run your experiment and want to know if it is caused by version check, you could check your webUI, and there will be an error message about version check.
.. image:: ../../img/webui-img/experimentError.png .. image:: ../../../img/webui-img/experimentError.png
:scale: 80% :scale: 80%
With local training service, the whole experiment (e.g., tuning algorithms, trials) runs on a single machine, i.e., user's dev machine. The generated trials run on this machine following ``trialConcurrency`` set in the configuration yaml file. If GPUs are used by trial, local training service will allocate required number of GPUs for each trial, like a resource scheduler. With local training service, the whole experiment (e.g., tuning algorithms, trials) runs on a single machine, i.e., user's dev machine. The generated trials run on this machine following ``trialConcurrency`` set in the configuration yaml file. If GPUs are used by trial, local training service will allocate required number of GPUs for each trial, like a resource scheduler.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment