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

Refactor HPO tuner code hierarchy (#3187)


Co-authored-by: default avatarliuzhe <liuzhe.cs@pku.edu.cn>
parent 872554f1
advisors: advisors:
- builtinName: Hyperband - builtinName: Hyperband
classArgsValidator: nni.algorithms.hpo.hyperband_advisor.hyperband_advisor.HyperbandClassArgsValidator classArgsValidator: nni.algorithms.hpo.hyperband_advisor.HyperbandClassArgsValidator
className: nni.algorithms.hpo.hyperband_advisor.hyperband_advisor.Hyperband className: nni.algorithms.hpo.hyperband_advisor.Hyperband
source: nni source: nni
- builtinName: BOHB - builtinName: BOHB
classArgsValidator: nni.algorithms.hpo.bohb_advisor.bohb_advisor.BOHBClassArgsValidator classArgsValidator: nni.algorithms.hpo.bohb_advisor.BOHBClassArgsValidator
className: nni.algorithms.hpo.bohb_advisor.bohb_advisor.BOHB className: nni.algorithms.hpo.bohb_advisor.BOHB
source: nni source: nni
assessors: assessors:
- builtinName: Medianstop - builtinName: Medianstop
classArgsValidator: nni.algorithms.hpo.medianstop_assessor.medianstop_assessor.MedianstopClassArgsValidator classArgsValidator: nni.algorithms.hpo.medianstop_assessor.MedianstopClassArgsValidator
className: nni.algorithms.hpo.medianstop_assessor.medianstop_assessor.MedianstopAssessor className: nni.algorithms.hpo.medianstop_assessor.MedianstopAssessor
source: nni source: nni
- builtinName: Curvefitting - builtinName: Curvefitting
classArgsValidator: nni.algorithms.hpo.curvefitting_assessor.curvefitting_assessor.CurvefittingClassArgsValidator classArgsValidator: nni.algorithms.hpo.curvefitting_assessor.CurvefittingClassArgsValidator
className: nni.algorithms.hpo.curvefitting_assessor.curvefitting_assessor.CurvefittingAssessor className: nni.algorithms.hpo.curvefitting_assessor.CurvefittingAssessor
source: nni source: nni
tuners: tuners:
- builtinName: PPOTuner - builtinName: PPOTuner
classArgsValidator: nni.algorithms.hpo.ppo_tuner.ppo_tuner.PPOClassArgsValidator classArgsValidator: nni.algorithms.hpo.ppo_tuner.PPOClassArgsValidator
className: nni.algorithms.hpo.ppo_tuner.ppo_tuner.PPOTuner className: nni.algorithms.hpo.ppo_tuner.PPOTuner
source: nni source: nni
- builtinName: SMAC - builtinName: SMAC
classArgsValidator: nni.algorithms.hpo.smac_tuner.smac_tuner.SMACClassArgsValidator classArgsValidator: nni.algorithms.hpo.smac_tuner.SMACClassArgsValidator
className: nni.algorithms.hpo.smac_tuner.smac_tuner.SMACTuner className: nni.algorithms.hpo.smac_tuner.SMACTuner
source: nni source: nni
- builtinName: TPE - builtinName: TPE
classArgs: classArgs:
algorithm_name: tpe algorithm_name: tpe
classArgsValidator: nni.algorithms.hpo.hyperopt_tuner.hyperopt_tuner.HyperoptClassArgsValidator classArgsValidator: nni.algorithms.hpo.hyperopt_tuner.HyperoptClassArgsValidator
className: nni.algorithms.hpo.hyperopt_tuner.hyperopt_tuner.HyperoptTuner className: nni.algorithms.hpo.hyperopt_tuner.HyperoptTuner
source: nni source: nni
- acceptClassArgs: false - acceptClassArgs: false
builtinName: Random builtinName: Random
classArgs: classArgs:
algorithm_name: random_search algorithm_name: random_search
classArgsValidator: nni.algorithms.hpo.hyperopt_tuner.hyperopt_tuner.HyperoptClassArgsValidator classArgsValidator: nni.algorithms.hpo.hyperopt_tuner.HyperoptClassArgsValidator
className: nni.algorithms.hpo.hyperopt_tuner.hyperopt_tuner.HyperoptTuner className: nni.algorithms.hpo.hyperopt_tuner.HyperoptTuner
source: nni source: nni
- builtinName: Anneal - builtinName: Anneal
classArgs: classArgs:
algorithm_name: anneal algorithm_name: anneal
classArgsValidator: nni.algorithms.hpo.hyperopt_tuner.hyperopt_tuner.HyperoptClassArgsValidator classArgsValidator: nni.algorithms.hpo.hyperopt_tuner.HyperoptClassArgsValidator
className: nni.algorithms.hpo.hyperopt_tuner.hyperopt_tuner.HyperoptTuner className: nni.algorithms.hpo.hyperopt_tuner.HyperoptTuner
source: nni source: nni
- builtinName: Evolution - builtinName: Evolution
classArgsValidator: nni.algorithms.hpo.evolution_tuner.evolution_tuner.EvolutionClassArgsValidator classArgsValidator: nni.algorithms.hpo.evolution_tuner.EvolutionClassArgsValidator
className: nni.algorithms.hpo.evolution_tuner.evolution_tuner.EvolutionTuner className: nni.algorithms.hpo.evolution_tuner.EvolutionTuner
source: nni source: nni
- acceptClassArgs: false - acceptClassArgs: false
builtinName: BatchTuner builtinName: BatchTuner
className: nni.algorithms.hpo.batch_tuner.batch_tuner.BatchTuner className: nni.algorithms.hpo.batch_tuner.BatchTuner
source: nni source: nni
- acceptClassArgs: false - acceptClassArgs: false
builtinName: GridSearch builtinName: GridSearch
className: nni.algorithms.hpo.gridsearch_tuner.gridsearch_tuner.GridSearchTuner className: nni.algorithms.hpo.gridsearch_tuner.GridSearchTuner
source: nni source: nni
- builtinName: NetworkMorphism - builtinName: NetworkMorphism
classArgsValidator: nni.algorithms.hpo.networkmorphism_tuner.networkmorphism_tuner.NetworkMorphismClassArgsValidator classArgsValidator: nni.algorithms.hpo.networkmorphism_tuner.NetworkMorphismClassArgsValidator
className: nni.algorithms.hpo.networkmorphism_tuner.networkmorphism_tuner.NetworkMorphismTuner className: nni.algorithms.hpo.networkmorphism_tuner.NetworkMorphismTuner
source: nni source: nni
- builtinName: MetisTuner - builtinName: MetisTuner
classArgsValidator: nni.algorithms.hpo.metis_tuner.metis_tuner.MetisClassArgsValidator classArgsValidator: nni.algorithms.hpo.metis_tuner.MetisClassArgsValidator
className: nni.algorithms.hpo.metis_tuner.metis_tuner.MetisTuner className: nni.algorithms.hpo.metis_tuner.MetisTuner
source: nni source: nni
- builtinName: GPTuner - builtinName: GPTuner
classArgsValidator: nni.algorithms.hpo.gp_tuner.gp_tuner.GPClassArgsValidator classArgsValidator: nni.algorithms.hpo.gp_tuner.GPClassArgsValidator
className: nni.algorithms.hpo.gp_tuner.gp_tuner.GPTuner className: nni.algorithms.hpo.gp_tuner.GPTuner
source: nni source: nni
- builtinName: PBTTuner - builtinName: PBTTuner
classArgsValidator: nni.algorithms.hpo.pbt_tuner.pbt_tuner.PBTClassArgsValidator classArgsValidator: nni.algorithms.hpo.pbt_tuner.PBTClassArgsValidator
className: nni.algorithms.hpo.pbt_tuner.pbt_tuner.PBTTuner className: nni.algorithms.hpo.pbt_tuner.PBTTuner
source: nni source: nni
- builtinName: RegularizedEvolutionTuner - builtinName: RegularizedEvolutionTuner
classArgsValidator: nni.algorithms.hpo.regularized_evolution_tuner.regularized_evolution_tuner.EvolutionClassArgsValidator classArgsValidator: nni.algorithms.hpo.regularized_evolution_tuner.EvolutionClassArgsValidator
className: nni.algorithms.hpo.regularized_evolution_tuner.regularized_evolution_tuner.RegularizedEvolutionTuner className: nni.algorithms.hpo.regularized_evolution_tuner.RegularizedEvolutionTuner
source: nni source: nni
**How to install customized algorithms as builtin tuners, assessors and advisors**
====================================================================================== **How to register customized algorithms as builtin tuners, assessors and advisors**
=======================================================================================
Overview Overview
-------- --------
NNI provides a lot of `builtin tuners <../Tuner/BuiltinTuner.md>`__\ , `advisors <../Tuner/HyperbandAdvisor.md>`__ and `assessors <../Assessor/BuiltinAssessor.rst>`__ can be used directly for Hyper Parameter Optimization, and some extra algorithms can be installed via ``nnictl package install --name <name>`` after NNI is installed. You can check these extra algorithms via ``nnictl package list`` command. NNI provides a lot of `builtin tuners <../Tuner/BuiltinTuner.rst>`_, `advisors <../Tuner/HyperbandAdvisor.rst>`__ and `assessors <../Assessor/BuiltinAssessor.rst>`__ can be used directly for Hyper Parameter Optimization, and some extra algorithms can be registered via ``nnictl algo register --meta <path_to_meta_file>`` after NNI is installed. You can check builtin algorithms via ``nnictl algo list`` command.
NNI also provides the ability to build your own customized tuners, advisors and assessors. To use the customized algorithm, users can simply follow the spec in experiment config file to properly reference the algorithm, which has been illustrated in the tutorials of `customized tuners <../Tuner/CustomizeTuner.md>`__\ /\ `advisors <../Tuner/CustomizeAdvisor.md>`__\ /\ `assessors <../Assessor/CustomizeAssessor.rst>`__. NNI also provides the ability to build your own customized tuners, advisors and assessors. To use the customized algorithm, users can simply follow the spec in experiment config file to properly reference the algorithm, which has been illustrated in the tutorials of `customized tuners <../Tuner/CustomizeTuner.rst>`_ / `advisors <../Tuner/CustomizeAdvisor.rst>`__ / `assessors <../Assessor/CustomizeAssessor.rst>`__.
NNI also allows users to install the customized algorithm as a builtin algorithm, in order for users to use the algorithm in the same way as NNI builtin tuners/advisors/assessors. More importantly, it becomes much easier for users to share or distribute their implemented algorithm to others. Customized tuners/advisors/assessors can be installed into NNI as builtin algorithms, once they are installed into NNI, you can use your customized algorithms the same way as builtin tuners/advisors/assessors in your experiment configuration file. For example, you built a customized tuner and installed it into NNI using a builtin name ``mytuner``\ , then you can use this tuner in your configuration file like below: NNI also allows users to install the customized algorithm as a builtin algorithm, in order for users to use the algorithm in the same way as NNI builtin tuners/advisors/assessors. More importantly, it becomes much easier for users to share or distribute their implemented algorithm to others. Customized tuners/advisors/assessors can be installed into NNI as builtin algorithms, once they are installed into NNI, you can use your customized algorithms the same way as builtin tuners/advisors/assessors in your experiment configuration file. For example, you built a customized tuner and installed it into NNI using a builtin name ``mytuner``, then you can use this tuner in your configuration file like below:
.. code-block:: yaml .. code-block:: yaml
tuner: tuner:
builtinTunerName: mytuner builtinTunerName: mytuner
Install customized algorithms as builtin tuners, assessors and advisors Register customized algorithms as builtin tuners, assessors and advisors
----------------------------------------------------------------------- ------------------------------------------------------------------------
You can follow below steps to build a customized tuner/assessor/advisor, and install it into NNI as builtin algorithm. You can follow below steps to build a customized tuner/assessor/advisor, and register it into NNI as builtin algorithm.
1. Create a customized tuner/assessor/advisor 1. Create a customized tuner/assessor/advisor
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...@@ -26,9 +27,9 @@ You can follow below steps to build a customized tuner/assessor/advisor, and ins ...@@ -26,9 +27,9 @@ You can follow below steps to build a customized tuner/assessor/advisor, and ins
Reference following instructions to create: Reference following instructions to create:
* `customized tuner <../Tuner/CustomizeTuner.rst>`__ * `customized tuner <../Tuner/CustomizeTuner.rst>`_
* `customized assessor <../Assessor/CustomizeAssessor.rst>`__ * `customized assessor <../Assessor/CustomizeAssessor.rst>`_
* `customized advisor <../Tuner/CustomizeAdvisor.rst>`__ * `customized advisor <../Tuner/CustomizeAdvisor.rst>`_
2. (Optional) Create a validator to validate classArgs 2. (Optional) Create a validator to validate classArgs
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...@@ -62,64 +63,49 @@ For example, you can implement your validator such as: ...@@ -62,64 +63,49 @@ For example, you can implement your validator such as:
The validator will be invoked before experiment is started to check whether the classArgs fields are valid for your customized algorithms. The validator will be invoked before experiment is started to check whether the classArgs fields are valid for your customized algorithms.
3. Prepare package installation source 3. Install your customized algorithms into python environment
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
In order to be installed as builtin tuners, assessors and advisors, the customized algorithms need to be packaged as installable source which can be recognized by ``pip`` command, under the hood nni calls ``pip`` command to install the package.
Besides being a common pip source, the package needs to provide meta information in the ``classifiers`` field.
Format of classifiers field is a following:
.. code-block:: bash
NNI Package :: <type> :: <builtin name> :: <full class name of tuner> :: <full class name of class args validator>
Firstly, the customized algorithms need to be prepared as a python package. Then you can install the package into python environment via:
* ``type``\ : type of algorithms, could be one of ``tuner``\ , ``assessor``\ , ``advisor``
* ``builtin name``\ : builtin name used in experiment configuration file
* `full class name of tuner`: tuner class name, including its module name, for example: ``demo_tuner.DemoTuner``
* `full class name of class args validator`: class args validator class name, including its module name, for example: ``demo_tuner.MyClassArgsValidator``
Following is an example of classfiers in package's ``setup.py``\ : * Run command ``python setup.py develop`` from the package directory, this command will install the package in development mode, this is recommended if your algorithm is under development.
* Run command ``python setup.py bdist_wheel`` from the package directory, this command build a whl file which is a pip installation source. Then run ``pip install <wheel file>`` to install it.
.. code-block:: python 4. Prepare meta file
^^^^^^^^^^^^^^^^^^^^
classifiers = [
'Programming Language :: Python :: 3',
'License :: OSI Approved :: MIT License',
'Operating System :: ',
'NNI Package :: tuner :: demotuner :: demo_tuner.DemoTuner :: demo_tuner.MyClassArgsValidator'
],
Once you have the meta info in ``setup.py``\ , you can build your pip installation source via:
Create a yaml file with following keys as meta file:
* Run command ``python setup.py develop`` from the package directory, this command will build the directory as a pip installation source.
* Run command ``python setup.py bdist_wheel`` from the package directory, this command build a whl file which is a pip installation source.
NNI will look for the classifier starts with ``NNI Package`` to retrieve the package meta information while the package being installed with ``nnictl package install <source>`` command. * ``algoType``: type of algorithms, could be one of ``tuner``, ``assessor``, ``advisor``
* ``builtinName``: builtin name used in experiment configuration file
* `className`: tuner class name, including its module name, for example: ``demo_tuner.DemoTuner``
* `classArgsValidator`: class args validator class name, including its module name, for example: ``demo_tuner.MyClassArgsValidator``
Reference `customized tuner example <../Tuner/InstallCustomizedTuner.rst>`__ for a full example. Following is an example of the yaml file:
4. Install customized algorithms package into NNI .. code-block:: yaml
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If your installation source is prepared as a directory with ``python setup.py develop``\ , you can install the package by following command:
``nnictl package install <installation source directory>`` algoType: tuner
builtinName: demotuner
className: demo_tuner.DemoTuner
classArgsValidator: demo_tuner.MyClassArgsValidator
For example: 5. Register customized algorithms into NNI
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
``nnictl package install nni/examples/tuners/customized_tuner/`` Run following command to register the customized algorithms as builtin algorithms in NNI:
If your installation source is prepared as a whl file with ``python setup.py bdist_wheel``\ , you can install the package by following command: .. code-block:: bash
``nnictl package install <whl file path>`` nnictl algo register --meta <path_to_meta_file>
For example: The ``<path_to_meta_file>`` is the path to the yaml file your created in above section.
``nnictl package install nni/examples/tuners/customized_tuner/dist/demo_tuner-0.1-py3-none-any.whl`` Reference `customized tuner example <../Tuner/InstallCustomizedTuner.rst>`_ for a full example.
5. Use the installed builtin algorithms in experiment 6. Use the installed builtin algorithms in experiment
----------------------------------------------------- -----------------------------------------------------
Once your customized algorithms is installed, you can use it in experiment configuration file the same way as other builtin tuners/assessors/advisors, for example: Once your customized algorithms is installed, you can use it in experiment configuration file the same way as other builtin tuners/assessors/advisors, for example:
...@@ -132,59 +118,45 @@ Once your customized algorithms is installed, you can use it in experiment confi ...@@ -132,59 +118,45 @@ Once your customized algorithms is installed, you can use it in experiment confi
#choice: maximize, minimize #choice: maximize, minimize
optimize_mode: maximize optimize_mode: maximize
Manage packages using ``nnictl package`` Manage builtin algorithms using ``nnictl algo``
-------------------------------------------- ---------------------------------------------------
List installed packages List builtin algorithms
^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^
Run following command to list the installed packages: Run following command to list the registered builtin algorithms:
.. code-block:: bash
nnictl package list
+-----------------+------------+-----------+--------=-------------+------------------------------------------+
| Name | Type | Installed | Class Name | Module Name |
+-----------------+------------+-----------+----------------------+------------------------------------------+
| demotuner | tuners | Yes | DemoTuner | demo_tuner |
| SMAC | tuners | No | SMACTuner | nni.smac_tuner.smac_tuner |
| PPOTuner | tuners | No | PPOTuner | nni.ppo_tuner.ppo_tuner |
| BOHB | advisors | Yes | BOHB | nni.bohb_advisor.bohb_advisor |
+-----------------+------------+-----------+----------------------+------------------------------------------+
Run following command to list all packages, including the builtin packages can not be uninstalled.
.. code-block:: bash .. code-block:: bash
nnictl package list --all nnictl algo list
+-----------------+------------+-----------+--------=-------------+------------------------------------------+ +-----------------+------------+-----------+--------=-------------+------------------------------------------+
| Name | Type | Installed | Class Name | Module Name | | Name | Type | Source | Class Name | Module Name |
+-----------------+------------+-----------+----------------------+------------------------------------------+ +-----------------+------------+-----------+----------------------+------------------------------------------+
| TPE | tuners | Yes | HyperoptTuner | nni.hyperopt_tuner.hyperopt_tuner | | TPE | tuners | nni | HyperoptTuner | nni.hyperopt_tuner.hyperopt_tuner |
| Random | tuners | Yes | HyperoptTuner | nni.hyperopt_tuner.hyperopt_tuner | | Random | tuners | nni | HyperoptTuner | nni.hyperopt_tuner.hyperopt_tuner |
| Anneal | tuners | Yes | HyperoptTuner | nni.hyperopt_tuner.hyperopt_tuner | | Anneal | tuners | nni | HyperoptTuner | nni.hyperopt_tuner.hyperopt_tuner |
| Evolution | tuners | Yes | EvolutionTuner | nni.evolution_tuner.evolution_tuner | | Evolution | tuners | nni | EvolutionTuner | nni.evolution_tuner.evolution_tuner |
| BatchTuner | tuners | Yes | BatchTuner | nni.batch_tuner.batch_tuner | | BatchTuner | tuners | nni | BatchTuner | nni.batch_tuner.batch_tuner |
| GridSearch | tuners | Yes | GridSearchTuner | nni.gridsearch_tuner.gridsearch_tuner | | GridSearch | tuners | nni | GridSearchTuner | nni.gridsearch_tuner.gridsearch_tuner |
| NetworkMorphism | tuners | Yes | NetworkMorphismTuner | nni.networkmorphism_tuner.networkmo... | | NetworkMorphism | tuners | nni | NetworkMorphismTuner | nni.networkmorphism_tuner.networkmo... |
| MetisTuner | tuners | Yes | MetisTuner | nni.metis_tuner.metis_tuner | | MetisTuner | tuners | nni | MetisTuner | nni.metis_tuner.metis_tuner |
| GPTuner | tuners | Yes | GPTuner | nni.gp_tuner.gp_tuner | | GPTuner | tuners | nni | GPTuner | nni.gp_tuner.gp_tuner |
| PBTTuner | tuners | Yes | PBTTuner | nni.pbt_tuner.pbt_tuner | | PBTTuner | tuners | nni | PBTTuner | nni.pbt_tuner.pbt_tuner |
| SMAC | tuners | No | SMACTuner | nni.smac_tuner.smac_tuner | | SMAC | tuners | nni | SMACTuner | nni.smac_tuner.smac_tuner |
| PPOTuner | tuners | No | PPOTuner | nni.ppo_tuner.ppo_tuner | | PPOTuner | tuners | nni | PPOTuner | nni.ppo_tuner.ppo_tuner |
| Medianstop | assessors | Yes | MedianstopAssessor | nni.medianstop_assessor.medianstop_... | | Medianstop | assessors | nni | MedianstopAssessor | nni.medianstop_assessor.medianstop_... |
| Curvefitting | assessors | Yes | CurvefittingAssessor | nni.curvefitting_assessor.curvefitt... | | Curvefitting | assessors | nni | CurvefittingAssessor | nni.curvefitting_assessor.curvefitt... |
| Hyperband | advisors | Yes | Hyperband | nni.hyperband_advisor.hyperband_adv... | | Hyperband | advisors | nni | Hyperband | nni.hyperband_advisor.hyperband_adv... |
| BOHB | advisors | Yes | BOHB | nni.bohb_advisor.bohb_advisor | | BOHB | advisors | nni | BOHB | nni.bohb_advisor.bohb_advisor |
+-----------------+------------+-----------+----------------------+------------------------------------------+ +-----------------+------------+-----------+----------------------+------------------------------------------+
Uninstall package Unregister builtin algorithms
^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Run following command to uninstall an installed package: Run following command to uninstall an installed package:
``nnictl package uninstall <builtin name>`` ``nnictl algo unregister <builtin name>``
For example: For example:
``nnictl package uninstall demotuner`` ``nnictl algo unregister demotuner``
...@@ -20,10 +20,10 @@ Tuner ...@@ -20,10 +20,10 @@ Tuner
.. autoclass:: nni.tuner.Tuner .. autoclass:: nni.tuner.Tuner
:members: :members:
.. autoclass:: nni.algorithms.hpo.hyperopt_tuner.hyperopt_tuner.HyperoptTuner .. autoclass:: nni.algorithms.hpo.hyperopt_tuner.HyperoptTuner
:members: :members:
.. autoclass:: nni.algorithms.hpo.evolution_tuner.evolution_tuner.EvolutionTuner .. autoclass:: nni.algorithms.hpo.evolution_tuner.EvolutionTuner
:members: :members:
.. autoclass:: nni.algorithms.hpo.smac_tuner.SMACTuner .. autoclass:: nni.algorithms.hpo.smac_tuner.SMACTuner
...@@ -32,19 +32,19 @@ Tuner ...@@ -32,19 +32,19 @@ Tuner
.. autoclass:: nni.algorithms.hpo.gridsearch_tuner.GridSearchTuner .. autoclass:: nni.algorithms.hpo.gridsearch_tuner.GridSearchTuner
:members: :members:
.. autoclass:: nni.algorithms.hpo.networkmorphism_tuner.networkmorphism_tuner.NetworkMorphismTuner .. autoclass:: nni.algorithms.hpo.networkmorphism_tuner.NetworkMorphismTuner
:members: :members:
.. autoclass:: nni.algorithms.hpo.metis_tuner.metis_tuner.MetisTuner .. autoclass:: nni.algorithms.hpo.metis_tuner.MetisTuner
:members: :members:
.. autoclass:: nni.algorithms.hpo.ppo_tuner.PPOTuner .. autoclass:: nni.algorithms.hpo.ppo_tuner.PPOTuner
:members: :members:
.. autoclass:: nni.algorithms.hpo.batch_tuner.batch_tuner.BatchTuner .. autoclass:: nni.algorithms.hpo.batch_tuner.BatchTuner
:members: :members:
.. autoclass:: nni.algorithms.hpo.gp_tuner.gp_tuner.GPTuner .. autoclass:: nni.algorithms.hpo.gp_tuner.GPTuner
:members: :members:
Assessor Assessor
...@@ -68,10 +68,10 @@ Advisor ...@@ -68,10 +68,10 @@ Advisor
.. autoclass:: nni.runtime.msg_dispatcher_base.MsgDispatcherBase .. autoclass:: nni.runtime.msg_dispatcher_base.MsgDispatcherBase
:members: :members:
.. autoclass:: nni.algorithms.hpo.hyperband_advisor.hyperband_advisor.Hyperband .. autoclass:: nni.algorithms.hpo.hyperband_advisor.Hyperband
:members: :members:
.. autoclass:: nni.algorithms.hpo.bohb_advisor.bohb_advisor.BOHB .. autoclass:: nni.algorithms.hpo.bohb_advisor.BOHB
:members: :members:
Utilities Utilities
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
from pathlib import Path from pathlib import Path
from nni.experiment import Experiment from nni.experiment import Experiment
from nni.algorithms.hpo.hyperopt_tuner.hyperopt_tuner import HyperoptTuner from nni.algorithms.hpo.hyperopt_tuner import HyperoptTuner
tuner = HyperoptTuner('tpe') tuner = HyperoptTuner('tpe')
......
from .bohb_advisor import BOHB, BOHBClassArgsValidator
ConfigSpace==0.4.7
statsmodels==0.10.0
\ No newline at end of file
# Copyright (c) Microsoft Corporation. # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license. # Licensed under the MIT license.
from .curvefitting_assessor import CurvefittingAssessor from .curvefitting_assessor import CurvefittingAssessor, CurvefittingClassArgsValidator
from .gp_tuner import GPTuner, GPClassArgsValidator
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
from .gridsearch_tuner import GridSearchTuner
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