| Conditions | 1 |
| Total Lines | 21 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import numpy as np |
||
| 10 | def test_argument_0(): |
||
| 11 | def objective_function(para): |
||
| 12 | |||
| 13 | print("\npara.nth_iter", para.nth_iter) |
||
| 14 | print("nth_iter_local", para.pass_through["nth_iter_local"]) |
||
| 15 | |||
| 16 | assert para.nth_iter == para.pass_through["nth_iter_local"] |
||
| 17 | |||
| 18 | para.pass_through["nth_iter_local"] += 1 |
||
| 19 | |||
| 20 | return 0 |
||
| 21 | |||
| 22 | hyper = Hyperactive() |
||
| 23 | hyper.add_search( |
||
| 24 | objective_function, |
||
| 25 | search_space, |
||
| 26 | n_iter=100, |
||
| 27 | pass_through={"nth_iter_local": 0}, |
||
| 28 | memory=False, |
||
| 29 | ) |
||
| 30 | hyper.run() |
||
| 31 |