From 3fe757391b8878173116075948a999945f807b85 Mon Sep 17 00:00:00 2001 From: Sumanth Ratna Date: Thu, 15 Oct 2020 00:41:47 -0400 Subject: [PATCH] [tune] Add Basic Variant Generator to search algorithm shim function (#11334) * Add Basic Variant Generator * Add 'random' key to SEARCH_ALG_IMPORT Co-authored-by: Kai Fricke Co-authored-by: Kai Fricke --- python/ray/tune/suggest/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python/ray/tune/suggest/__init__.py b/python/ray/tune/suggest/__init__.py index f3f332f1f..437ca0653 100644 --- a/python/ray/tune/suggest/__init__.py +++ b/python/ray/tune/suggest/__init__.py @@ -31,6 +31,9 @@ def create_searcher( >>> search_alg = tune.create_searcher('ax') """ + def _import_variant_generator(): + return BasicVariantGenerator + def _import_ax_search(): from ray.tune.suggest.ax import AxSearch return AxSearch @@ -72,6 +75,8 @@ def create_searcher( return SigOptSearch SEARCH_ALG_IMPORT = { + "variant_generator": _import_variant_generator, + "random": _import_variant_generator, "ax": _import_ax_search, "dragonfly": _import_dragonfly_search, "skopt": _import_skopt_search,