From 6288d954b52af4082b302b5aa1396d5789da3c24 Mon Sep 17 00:00:00 2001 From: Sumanth Ratna Date: Fri, 2 Oct 2020 21:32:14 -0400 Subject: [PATCH] [tune] Use isinstance instead of type in PBT (#11175) --- python/ray/tune/schedulers/pbt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ray/tune/schedulers/pbt.py b/python/ray/tune/schedulers/pbt.py index 200785bac..d1bd6c286 100644 --- a/python/ray/tune/schedulers/pbt.py +++ b/python/ray/tune/schedulers/pbt.py @@ -77,7 +77,7 @@ def explore(config: Dict, mutations: Dict, resample_probability: float, new_config[key] = config[key] * 1.2 else: new_config[key] = config[key] * 0.8 - if type(config[key]) is int: + if isinstance(config[key], int): new_config[key] = int(new_config[key]) if custom_explore_fn: new_config = custom_explore_fn(new_config)