[tune] Use isinstance instead of type in assert in HyperOptSearch (#10454)

This commit is contained in:
Sumanth Ratna 2020-08-31 18:26:55 -04:00 committed by GitHub
parent efa1d51aea
commit bac8f14739
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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()