From edc7c266996167198bb2c88412a9b5b4a3c63cea Mon Sep 17 00:00:00 2001 From: Joppe Geluykens Date: Mon, 27 Jun 2022 14:53:00 +0200 Subject: [PATCH] SEARCH_ALG_IMPORT from ray.search instead of ray.suggest for ray >= 1.14 (#2196) --- ludwig/hyperopt/execution.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ludwig/hyperopt/execution.py b/ludwig/hyperopt/execution.py index 0411b8aa4d8..bff2e457c53 100644 --- a/ludwig/hyperopt/execution.py +++ b/ludwig/hyperopt/execution.py @@ -37,13 +37,15 @@ from ray import tune from ray.tune import register_trainable, Stopper from ray.tune.schedulers.resource_changing_scheduler import DistributeResources, ResourceChangingScheduler - from ray.tune.suggest import BasicVariantGenerator, ConcurrencyLimiter, SEARCH_ALG_IMPORT + from ray.tune.suggest import BasicVariantGenerator, ConcurrencyLimiter _ray_114 = version.parse(ray.__version__) >= version.parse("1.14") if _ray_114: + from ray.tune.search import SEARCH_ALG_IMPORT from ray.tune.syncer import get_node_to_storage_syncer, SyncConfig else: from ray.tune.syncer import get_cloud_sync_client + from ray.tune.suggest import SEARCH_ALG_IMPORT from ray.tune.utils import wait_for_gpu from ray.tune.utils.placement_groups import PlacementGroupFactory