Unverified Commit b22f192c authored by liuzhe-lz's avatar liuzhe-lz Committed by GitHub
Browse files

Make anneal tuner optional (#5165)

parent c53be963
...@@ -2,7 +2,6 @@ astor ...@@ -2,7 +2,6 @@ astor
cloudpickle cloudpickle
colorama colorama
filelock filelock
hyperopt == 0.1.2
json_tricks >= 3.15.5 json_tricks >= 3.15.5
numpy < 1.22 ; python_version < "3.8" numpy < 1.22 ; python_version < "3.8"
numpy ; python_version >= "3.8" numpy ; python_version >= "3.8"
......
# the following content will be read by setup.py. # the following content will be read by setup.py.
# please follow the logic in setup.py. # please follow the logic in setup.py.
# Anneal
hyperopt == 0.1.2
# SMAC # SMAC
ConfigSpaceNNI>=0.4.7.3 ConfigSpaceNNI>=0.4.7.3
smac4nni smac4nni
......
...@@ -77,6 +77,8 @@ Built-in Tuners ...@@ -77,6 +77,8 @@ Built-in Tuners
- Heuristic - Heuristic
- This simple annealing algorithm begins by sampling from the prior, but tends over time to sample from points closer and closer to the best ones observed. This algorithm is a simple variation on the random search that leverages smoothness in the response surface. The annealing rate is not adaptive. - This simple annealing algorithm begins by sampling from the prior, but tends over time to sample from points closer and closer to the best ones observed. This algorithm is a simple variation on the random search that leverages smoothness in the response surface. The annealing rate is not adaptive.
Notice, Anneal needs to be installed by ``pip install nni[Anneal]`` command.
* - :class:`Evolution <nni.algorithms.hpo.evolution_tuner.EvolutionTuner>` * - :class:`Evolution <nni.algorithms.hpo.evolution_tuner.EvolutionTuner>`
- Heuristic - Heuristic
- Naive Evolution comes from Large-Scale Evolution of Image Classifiers. It randomly initializes a population-based on search space. For each generation, it chooses better ones and does some mutation (e.g., change a hyperparameter, add/remove one layer) on them to get the next generation. Naïve Evolution requires many trials to work, but it's very simple and easy to expand new features. `Reference paper <https://arxiv.org/pdf/1703.01041.pdf>`__ - Naive Evolution comes from Large-Scale Evolution of Image Classifiers. It randomly initializes a population-based on search space. For each generation, it chooses better ones and does some mutation (e.g., change a hyperparameter, add/remove one layer) on them to get the next generation. Naïve Evolution requires many trials to work, but it's very simple and easy to expand new features. `Reference paper <https://arxiv.org/pdf/1703.01041.pdf>`__
......
...@@ -198,6 +198,12 @@ class HyperoptTuner(Tuner): ...@@ -198,6 +198,12 @@ class HyperoptTuner(Tuner):
This algorithm is a simple variation of random search that leverages smoothness in the response surface. This algorithm is a simple variation of random search that leverages smoothness in the response surface.
The annealing rate is not adaptive. The annealing rate is not adaptive.
Note that it needs additional installation using the following command:
.. code-block:: bash
pip install nni[Anneal]
Examples Examples
-------- --------
......
...@@ -121,6 +121,7 @@ def _setup(): ...@@ -121,6 +121,7 @@ def _setup():
python_requires = '>=3.7', python_requires = '>=3.7',
install_requires = _read_requirements_txt('dependencies/required.txt'), install_requires = _read_requirements_txt('dependencies/required.txt'),
extras_require = { extras_require = {
'Anneal': _read_requirements_txt('dependencies/required_extra.txt', 'Anneal'),
'SMAC': _read_requirements_txt('dependencies/required_extra.txt', 'SMAC'), 'SMAC': _read_requirements_txt('dependencies/required_extra.txt', 'SMAC'),
'BOHB': _read_requirements_txt('dependencies/required_extra.txt', 'BOHB'), 'BOHB': _read_requirements_txt('dependencies/required_extra.txt', 'BOHB'),
'PPOTuner': _read_requirements_txt('dependencies/required_extra.txt', 'PPOTuner'), 'PPOTuner': _read_requirements_txt('dependencies/required_extra.txt', 'PPOTuner'),
......
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