| @@ 26-37 (lines=12) @@ | ||
| 23 | } |
|
| 24 | ||
| 25 | ||
| 26 | def _get_distribution(distribution): |
|
| 27 | if hasattr(distribution, "__call__"): |
|
| 28 | return (distribution, _process_), {} |
|
| 29 | ||
| 30 | elif isinstance(distribution, dict): |
|
| 31 | dist_key = list(distribution.keys())[0] |
|
| 32 | dist_paras = list(distribution.values())[0] |
|
| 33 | ||
| 34 | return dist_dict[dist_key], dist_paras |
|
| 35 | ||
| 36 | elif isinstance(distribution, str): |
|
| 37 | return dist_dict[distribution], {} |
|
| 38 | ||
| 39 | ||
| 40 | def run_search(opt_pros, distribution, n_processes): |
|
| @@ 26-37 (lines=12) @@ | ||
| 23 | } |
|
| 24 | ||
| 25 | ||
| 26 | def _get_distribution(distribution): |
|
| 27 | if hasattr(distribution, "__call__"): |
|
| 28 | return (distribution, _process_), {} |
|
| 29 | ||
| 30 | elif isinstance(distribution, dict): |
|
| 31 | dist_key = list(distribution.keys())[0] |
|
| 32 | dist_paras = list(distribution.values())[0] |
|
| 33 | ||
| 34 | return dist_dict[dist_key], dist_paras |
|
| 35 | ||
| 36 | elif isinstance(distribution, str): |
|
| 37 | return dist_dict[distribution], {} |
|
| 38 | ||
| 39 | ||
| 40 | def run_search(opt_pros, distribution, n_processes): |
|