| Conditions | 3 |
| Total Lines | 27 |
| Code Lines | 22 |
| Lines | 27 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | # Author: Simon Blanke |
||
| 9 | View Code Duplication | def _process_(optimizer): |
|
|
|
|||
| 10 | if "progress_bar" in optimizer.verbosity: |
||
| 11 | p_bar = tqdm( |
||
| 12 | position=optimizer.nth_process, |
||
| 13 | total=optimizer.n_iter, |
||
| 14 | ascii=" ─", |
||
| 15 | colour="Yellow", |
||
| 16 | ) |
||
| 17 | else: |
||
| 18 | p_bar = None |
||
| 19 | |||
| 20 | optimizer._search(p_bar) |
||
| 21 | |||
| 22 | if p_bar: |
||
| 23 | p_bar.colour = "GREEN" |
||
| 24 | p_bar.refresh() |
||
| 25 | p_bar.close() |
||
| 26 | |||
| 27 | return { |
||
| 28 | "nth_process": optimizer.nth_process, |
||
| 29 | "best_para": optimizer.best_para, |
||
| 30 | "best_score": optimizer.best_score, |
||
| 31 | "best_iter": optimizer.best_since_iter, |
||
| 32 | "eval_times": optimizer.eval_times, |
||
| 33 | "iter_times": optimizer.iter_times, |
||
| 34 | "search_data": optimizer.search_data, |
||
| 35 | "random_seed": optimizer.random_seed, |
||
| 36 | } |
||
| 37 |