[tune] Use isinstance instead of type in PBT (#11175)

This commit is contained in:
Sumanth Ratna
2020-10-02 21:32:14 -04:00
committed by GitHub
parent ff6d412ad9
commit 6288d954b5
+1 -1
View File
@@ -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)