From bac8f14739d6e3cd2aa80e36f97b9df63c5ba32f Mon Sep 17 00:00:00 2001 From: Sumanth Ratna Date: Mon, 31 Aug 2020 18:26:55 -0400 Subject: [PATCH] [tune] Use isinstance instead of type in assert in HyperOptSearch (#10454) --- python/ray/tune/suggest/hyperopt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ray/tune/suggest/hyperopt.py b/python/ray/tune/suggest/hyperopt.py index 5bdb1cbbd..73e1af870 100644 --- a/python/ray/tune/suggest/hyperopt.py +++ b/python/ray/tune/suggest/hyperopt.py @@ -121,7 +121,7 @@ class HyperOptSearch(Searcher): self._hpopt_trials = hpo.Trials() self._points_to_evaluate = 0 else: - assert type(points_to_evaluate) == list + assert isinstance(points_to_evaluate, (list, tuple)) self._hpopt_trials = generate_trials_to_calculate( points_to_evaluate) self._hpopt_trials.refresh()