mirror of
https://github.com/wassname/ray.git
synced 2026-07-02 22:13:16 +08:00
[tune] Use isinstance instead of type in PBT (#11175)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user