[tune] refactor tune search space (#10444)

* Added basic functionality and tests

* Feature parity with old tune search space config

* Convert Optuna search spaces

* Introduced quantized values

* Updated Optuna resolving

* Added HyperOpt search space conversion

* Convert search spaces to AxSearch

* Convert search spaces to BayesOpt

* Added basic functionality and tests

* Feature parity with old tune search space config

* Convert Optuna search spaces

* Introduced quantized values

* Updated Optuna resolving

* Added HyperOpt search space conversion

* Convert search spaces to AxSearch

* Convert search spaces to BayesOpt

* Re-factored samplers into domain classes

* Re-added base classes

* Re-factored into list comprehensions

* Added `from_config` classmethod for config conversion

* Applied suggestions from code review

* Removed truncated normal distribution

* Set search properties in tune.run

* Added test for tune.run search properties

* Move sampler initializers to base classes

* Add tune API sampling test, fixed includes, fixed resampling bug

* Add to API docs

* Fix docs

* Update metric and mode only when set. Set default metric and mode to experiment analysis object.

* Fix experiment analysis tests

* Raise error when delimiter is used in the config keys

* Added randint/qrandint to API docs, added additional check in tune.run

* Fix tests

* Fix linting error

* Applied suggestions from code review. Re-aded tune.function for the time being

* Fix sampling tests

* Fix experiment analysis tests

* Fix tests and linting error

* Removed unnecessary default_config attribute from OptunaSearch

* Revert to set AxSearch default metric

* fix-min-max

* fix

* nits

* Added function check, enhanced loguniform error message

* fix-print

* fix

* fix

* Raise if unresolved values are in config and search space is already set

Co-authored-by: Richard Liaw <rliaw@berkeley.edu>
This commit is contained in:
krfricke
2020-09-03 09:06:13 -07:00
committed by GitHub
co-authored by Richard Liaw
parent 715ee8dfc9
commit 06af62ba91
31 changed files with 1548 additions and 211 deletions
+26 -1
View File
@@ -164,16 +164,41 @@ tune.randn
.. autofunction:: ray.tune.randn
tune.qrandn
~~~~~~~~~~~
.. autofunction:: ray.tune.qrandn
tune.loguniform
~~~~~~~~~~~~~~~
.. autofunction:: ray.tune.loguniform
tune.qloguniform
~~~~~~~~~~~~~~~~
.. autofunction:: ray.tune.qloguniform
tune.uniform
~~~~~~~~~~~~
.. autofunction:: ray.tune.uniform
tune.quniform
~~~~~~~~~~~~~
.. autofunction:: ray.tune.quniform
tune.randint
~~~~~~~~~~~~
.. autofunction:: ray.tune.randint
tune.qrandint
~~~~~~~~~~~~~
.. autofunction:: ray.tune.qrandint
tune.choice
~~~~~~~~~~~
@@ -182,7 +207,7 @@ tune.choice
tune.sample_from
~~~~~~~~~~~~~~~~
.. autoclass:: ray.tune.sample_from
.. autofunction:: ray.tune.sample_from
Grid Search API
---------------