mirror of
https://github.com/wassname/ray.git
synced 2026-08-12 12:20:11 +08:00
[tune] Refactor search algorithms (#7037)
* start refactoring of search algorithms * format * needs tests * fix * suggestions * Fix PBT * lint * refactoring * hyperopt_working * dragonfly * hyperopt * change_half_of_algs * save * code-removed * remove_lots_of_unneccessary * changes * formatting * suggest * reset * rm * tests * search-change * exception * refactor-doc * search * py * moredocs * Update doc/source/tune-searchalg.rst * concurrency * max * tune * betterwarning * bohb * tests * test-change Co-authored-by: ujvl <misraujval@gmail.com>
This commit is contained in:
@@ -57,7 +57,9 @@ See the API documentation (:ref:`repeater-doc`) for more details.
|
||||
|
||||
search_alg = BayesOpt(...)
|
||||
re_search_alg = Repeater(search_alg, repeat=10)
|
||||
tune.run(trainable, search_alg=re_search_alg)
|
||||
|
||||
# Repeat 2 samples 10 times each.
|
||||
tune.run(trainable, num_samples=20, search_alg=re_search_alg)
|
||||
|
||||
.. note:: This does not apply for grid search and random search.
|
||||
.. warning:: It is recommended to not use ``Repeater`` with a TrialScheduler.
|
||||
@@ -352,11 +354,8 @@ If you are interested in implementing or contributing a new Search Algorithm, th
|
||||
Model-Based Suggestion Algorithms
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Often times, hyperparameter search algorithms are model-based and may be quite simple to implement. For this, one can extend the following abstract class and implement ``on_trial_result``, ``on_trial_complete``, and ``suggest``. The abstract class will take care of Tune-specific boilerplate such as creating Trials and queuing trials:
|
||||
Often times, hyperparameter search algorithms are model-based and may be quite simple to implement. For this, one can extend the following abstract class and implement ``on_trial_complete``, and ``suggest``.
|
||||
|
||||
.. autoclass:: ray.tune.suggest.SuggestionAlgorithm
|
||||
.. autoclass:: ray.tune.suggest.Searcher
|
||||
:show-inheritance:
|
||||
:noindex:
|
||||
|
||||
.. automethod:: ray.tune.suggest.SuggestionAlgorithm.suggest
|
||||
:noindex:
|
||||
|
||||
@@ -10,6 +10,11 @@ Repeater
|
||||
|
||||
.. autoclass:: ray.tune.suggest.Repeater
|
||||
|
||||
ConcurrencyLimiter
|
||||
------------------
|
||||
|
||||
.. autoclass:: ray.tune.suggest.ConcurrencyLimiter
|
||||
|
||||
AxSearch
|
||||
--------
|
||||
|
||||
@@ -61,10 +66,10 @@ SearchAlgorithm
|
||||
.. autoclass:: ray.tune.suggest.SearchAlgorithm
|
||||
:members:
|
||||
|
||||
SuggestionAlgorithm
|
||||
-------------------
|
||||
Searcher
|
||||
--------
|
||||
|
||||
.. autoclass:: ray.tune.suggest.SuggestionAlgorithm
|
||||
.. autoclass:: ray.tune.suggest.Searcher
|
||||
:members:
|
||||
:private-members:
|
||||
:show-inheritance:
|
||||
|
||||
Reference in New Issue
Block a user