| @@ 322-338 (lines=17) @@ | ||
| 319 | ||
| 320 | return hash2obj_dict |
|
| 321 | ||
| 322 | def _get_para_hash_list(self): |
|
| 323 | para_hash_list = [] |
|
| 324 | for key in self._space_.search_space.keys(): |
|
| 325 | values = self._space_.search_space[key] |
|
| 326 | ||
| 327 | for value in values: |
|
| 328 | if ( |
|
| 329 | not isinstance(value, int) |
|
| 330 | and not isinstance(value, float) |
|
| 331 | and not isinstance(value, str) |
|
| 332 | ): |
|
| 333 | ||
| 334 | para_dill = dill.dumps(value) |
|
| 335 | para_hash = self._get_hash(para_dill) |
|
| 336 | para_hash_list.append(para_hash) |
|
| 337 | ||
| 338 | return para_hash_list |
|
| 339 | ||
| 340 | def _get_pkl_hash(self, hash): |
|
| 341 | paths = glob.glob(self.func_path + hash + "*.pkl") |
|
| @@ 306-322 (lines=17) @@ | ||
| 303 | ||
| 304 | return hash2obj_dict |
|
| 305 | ||
| 306 | def _get_para_hash_list(self): |
|
| 307 | para_hash_list = [] |
|
| 308 | for key in self._space_.search_space.keys(): |
|
| 309 | values = self._space_.search_space[key] |
|
| 310 | ||
| 311 | for value in values: |
|
| 312 | if ( |
|
| 313 | not isinstance(value, int) |
|
| 314 | and not isinstance(value, float) |
|
| 315 | and not isinstance(value, str) |
|
| 316 | ): |
|
| 317 | ||
| 318 | para_dill = dill.dumps(value) |
|
| 319 | para_hash = self._get_hash(para_dill) |
|
| 320 | para_hash_list.append(para_hash) |
|
| 321 | ||
| 322 | return para_hash_list |
|
| 323 | ||
| 324 | def _get_pkl_hash(self, hash): |
|
| 325 | paths = glob.glob(self.func_path + hash + "*.pkl") |
|