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

Refactor readthedocs #251

Closed
wants to merge 1 commit into from
Closed
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
14 changes: 14 additions & 0 deletions configs/nas/mmcls/spos/spos_shufflenet_search_8xb128_in1k.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
_base_ = ['./spos_shufflenet_supernet_8xb128_in1k.py']

train_cfg = dict(
_delete_=True,
type='mmrazor.EvolutionSearchLoop',
dataloader=_base_.val_dataloader,
evaluator=_base_.val_evaluator,
max_epochs=2,
num_candidates=4,
top_k=2,
num_mutation=2,
num_crossover=2,
mutate_prob=0.1
)
1 change: 1 addition & 0 deletions docs/en/advanced_guides/algorithm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Algorithm
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Apply existing algorithms to new tasks
1 change: 1 addition & 0 deletions docs/en/advanced_guides/customize_architectures.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Customize Architectures
1 change: 1 addition & 0 deletions docs/en/advanced_guides/customize_kd_algorithms.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Customize KD algorithms
1 change: 1 addition & 0 deletions docs/en/advanced_guides/customize_mixed_algorithms.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Customize mixed algorithms
1 change: 1 addition & 0 deletions docs/en/advanced_guides/customize_nas_algorithms.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Customize NAS algorithms
1 change: 1 addition & 0 deletions docs/en/advanced_guides/customize_pruning_algorithms.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Customize pruning algorithms
1 change: 1 addition & 0 deletions docs/en/advanced_guides/delivery.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Delivery
24 changes: 24 additions & 0 deletions docs/en/advanced_guides/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Key Concepts
***************

.. toctree::
:maxdepth: 1

algorithm.md
mutator.md
mutable.md
recorder.md
delivery.md

Development tutorials
************************

.. toctree::
:maxdepth: 1

customize_architectures.md
customize_nas_algorithms.md
customize_pruning_algorithms.md
customize_kd_algorithms.md
customize_mixed_algorithms.md
apply_existing_algorithms_to_new_tasks.md
1 change: 1 addition & 0 deletions docs/en/advanced_guides/mutable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Mutable
1 change: 1 addition & 0 deletions docs/en/advanced_guides/mutator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Mutator
1 change: 1 addition & 0 deletions docs/en/advanced_guides/recorder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Recorder
119 changes: 61 additions & 58 deletions docs/en/api.rst
Original file line number Diff line number Diff line change
@@ -1,101 +1,104 @@
mmrazor.apis
------------

mmcls
^^^^^
.. automodule:: mmrazor.apis.mmcls
:members:

mmdet
^^^^^
.. automodule:: mmrazor.apis.mmdet
:members:

mmseg
^^^^^
.. automodule:: mmrazor.apis.mmseg
:members:

mmrazor.core
--------------
mmrazor.engine
------------------

hooks
^^^^^
.. automodule:: mmrazor.core.hooks
:members:

optimizer
^^^^^^^^^
.. automodule:: mmrazor.core.optimizer
:members:

runners
^^^^^^^
.. automodule:: mmrazor.core.runners
:members:

searcher
^^^^^^^^
.. automodule:: mmrazor.core.searcher
^^^^^^^^^^^^^^^^^^
.. automodule:: mmrazor.engine.hooks
:members:

utils
^^^^^
.. automodule:: mmrazor.core.utils
optimizers
^^^^^^^^^^^^^^^^^^
.. automodule:: mmrazor.engine.optimizers
:members:

mmrazor.datasets
----------------

datasets
^^^^^^^^
.. automodule:: mmrazor.datasets
runner
^^^^^^^^^^^^^^^^^^
.. automodule:: mmrazor.engine.runner
:members:

mmrazor.models
--------------
------------------

algorithms
^^^^^^^^^^
^^^^^^^^^^^^^^^^^^
.. automodule:: mmrazor.models.algorithms
:members:

architectures
^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^
.. automodule:: mmrazor.models.architectures
:members:

distillers
^^^^^^^^^^
^^^^^^^^^^^^^^^^^^
.. automodule:: mmrazor.models.distillers
:members:

losses
^^^^^^
^^^^^^^^^^^^^^^^^^
.. automodule:: mmrazor.models.losses
:members:

mutables
^^^^^^^^
^^^^^^^^^^^^^^^^^^
.. automodule:: mmrazor.models.mutables
:members:

mutators
^^^^^^^^
^^^^^^^^^^^^^^^^^^
.. automodule:: mmrazor.models.mutators
:members:

ops
^^^
^^^^^^^^^^^^^^^^^^
.. automodule:: mmrazor.models.ops
:members:

pruners
^^^^^^^
.. automodule:: mmrazor.models.pruners
task_modules
^^^^^^^^^^^^^^^^^^
.. automodule:: mmrazor.models.task_modules
:members:

utils
^^^^^^^^^^^^^^^^^^
.. automodule:: mmrazor.models.utils
:members:

mmrazor.registry
------------------

.. automodule:: mmrazor.registry
:members:

mmrazor.structures
------------------

delivery
^^^^^^^^^^^^^^^^^^
.. automodule:: mmrazor.structures.delivery
:members:

graph
^^^^^^^^^^^^^^^^^^
.. automodule:: mmrazor.structures.graph
:members:

recorder
^^^^^^^^^^^^^^^^^^
.. automodule:: mmrazor.structures.recorder
:members:

subnet
^^^^^^^^^^^^^^^^^^
.. automodule:: mmrazor.structures.subnet
:members:

tracer
^^^^^^^^^^^^^^^^^^
.. automodule:: mmrazor.structures.tracer
:members:

mmrazor.utils
-------------
------------------
.. automodule:: mmrazor.utils
:members:
81 changes: 19 additions & 62 deletions docs/en/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,44 +11,40 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import subprocess # noqa: F401
import sys

import pytorch_sphinx_theme

sys.path.insert(0, os.path.abspath('../..'))

# -- Project information -----------------------------------------------------

project = 'MMRazor'
copyright = '2021-2030, OpenMMLab'
author = 'MMRazor Authors'
version_file = '../../mmrazor/version.py'
# -- Project information -----------------------------------------------------

project = 'mmrazor'
copyright = '2018-2022, OpenMMLab'
author = 'MMRazor Author'
version_file = '../../mmflow/version.py'

def get_version():
with open(version_file, 'r') as f:
exec(compile(f.read(), version_file, 'exec'))
return locals()['__version__']


# The full version, including alpha/beta/rc tags
release = get_version()

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

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc', 'sphinx.ext.napoleon', 'sphinx.ext.viewcode',
'sphinx_markdown_tables', 'sphinx_copybutton', 'myst_parser'
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode',
'myst_parser',
'sphinx.ext.autosectionlabel',
'sphinx_copybutton',
]

autodoc_mock_imports = [
'matplotlib', 'pycocotools', 'terminaltables', 'mmrazor.version',
'mmcv.ops'
]
autodoc_mock_imports = ['matplotlib', 'mmrazor.version', 'mmcv.ops']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand All @@ -74,54 +70,21 @@ def get_version():
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
# html_theme = 'sphinx_rtd_theme'
html_theme = 'pytorch_sphinx_theme'
html_theme_path = [pytorch_sphinx_theme.get_html_theme_path()]

# 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.
#
html_theme_options = {
'logo_url':
'https://mmrazor.readthedocs.io/en/latest/',
'menu': [
{
'name': 'GitHub',
'url': 'https://github.com/open-mmlab/mmrazor'
},
{
'name':
'Upstream',
'children': [{
'name':
'MMCV',
'url':
'https://github.com/open-mmlab/mmcv',
'description':
'Foundational library for computer vision'
}, {
'name':
'MMDetection',
'url':
'https://github.com/open-mmlab/mmdetection',
'description':
'Object detection toolbox and benchmark'
}, {
'name':
'MMClassification',
'url':
'https://github.com/open-mmlab/mmclassification',
'description':
'Image classification toolbox and benchmark'
}, {
'name':
'MMSegmentation',
'url':
'https://github.com/open-mmlab/mmsegmentation',
'description':
'Semantic segmentation toolbox and benchmark'
}]
},
],
'menu_lang':
'en'
# Specify the language of shared menu
'menu_lang': 'en',
}

# Add any paths that contain custom static files (such as style sheets) here,
Expand All @@ -130,13 +93,7 @@ def get_version():
html_static_path = ['_static']
html_css_files = ['css/readthedocs.css']

language = 'en'

# -- Extension configuration -------------------------------------------------
# Ignore >>> when copying code
copybutton_prompt_text = r'>>> |\.\.\. '
copybutton_prompt_is_regexp = True

# Enable ::: for my_st
myst_enable_extensions = ['colon_fence']
myst_heading_anchors = 4
copybutton_prompt_is_regexp = True
7 changes: 0 additions & 7 deletions docs/en/dataset_prepare.md

This file was deleted.

Loading