mirror of
https://github.com/wassname/ray.git
synced 2026-07-16 11:21:10 +08:00
[Tune]Add integer loguniform support (#12994)
* Add integer quantization and loguniform support * Fix hyperopt qloguniform not being np.log'd first * Add tests, __init__ * Try to fix tests, better exceptions * Tweak docstrings * Type checks in SearchSpaceTest * Update docs * Lint, tests * Update doc/source/tune/api_docs/search_space.rst Co-authored-by: Kai Fricke <krfricke@users.noreply.github.com> Co-authored-by: Kai Fricke <krfricke@users.noreply.github.com>
This commit is contained in:
co-authored by
Kai Fricke
parent
d37e2c3a20
commit
a4f2dd2138
@@ -192,10 +192,18 @@ For a high-level overview, see this example:
|
||||
# Sample a integer uniformly between -9 (inclusive) and 15 (exclusive)
|
||||
"randint": tune.randint(-9, 15),
|
||||
|
||||
# Sample a integer uniformly between 1 (inclusive) and 10 (exclusive),
|
||||
# while sampling in log space
|
||||
"lograndint": tune.lograndint(1, 10),
|
||||
|
||||
# Sample a random uniformly between -21 (inclusive) and 12 (inclusive (!))
|
||||
# rounding to increments of 3 (includes 12)
|
||||
"qrandint": tune.qrandint(-21, 12, 3),
|
||||
|
||||
# Sample a integer uniformly between 1 (inclusive) and 10 (inclusive (!)),
|
||||
# while sampling in log space and rounding to increments of 2
|
||||
"qlograndint": tune.qlograndint(1, 10, 2),
|
||||
|
||||
# Sample an option uniformly from the specified choices
|
||||
"choice": tune.choice(["a", "b", "c"]),
|
||||
|
||||
@@ -266,4 +274,4 @@ Grid Search API
|
||||
References
|
||||
----------
|
||||
|
||||
See also :ref:`tune-basicvariant`.
|
||||
See also :ref:`tune-basicvariant`.
|
||||
|
||||
Reference in New Issue
Block a user