| Conditions | 1 |
| Total Lines | 18 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import copy |
||
| 59 | def test_callback_2(): |
||
| 60 | def callback_1(access): |
||
| 61 | access.pass_through["stuff1"] = 1 |
||
| 62 | |||
| 63 | def objective_function(access): |
||
| 64 | assert access.pass_through["stuff1"] == 1 |
||
| 65 | |||
| 66 | return 0 |
||
| 67 | |||
| 68 | hyper = Hyperactive() |
||
| 69 | hyper.add_search( |
||
| 70 | objective_function, |
||
| 71 | search_space, |
||
| 72 | n_iter=100, |
||
| 73 | callbacks={"before": [callback_1]}, |
||
| 74 | pass_through={"stuff1": 0}, |
||
| 75 | ) |
||
| 76 | hyper.run() |
||
| 77 | |||
| 100 |