|
25 | 25 |
|
26 | 26 | function AI.step!( |
27 | 27 | problem::TestProblem, algorithm::TestAlgorithmStep, state::AIE.DefaultState; |
28 | | - logging_context_prefix = Symbol() |
| 28 | + kwargs... |
29 | 29 | ) |
30 | 30 | state.iterate .+= 2 # Different increment step |
31 | 31 | return state |
|
58 | 58 | state = AIE.DefaultState(; iterate = [0.0, 0.0], stopping_criterion_state) |
59 | 59 |
|
60 | 60 | initial_iterate = [1.0, 2.0] |
61 | | - AIE.AI.initialize_state!(problem, algorithm, state; iterate = initial_iterate) |
| 61 | + AI.initialize_state!(problem, algorithm, state; iterate = initial_iterate) |
62 | 62 | @test state.iterate == initial_iterate |
63 | 63 | @test state.iteration == 0 |
64 | 64 | end |
|
68 | 68 | problem = TestProblem([1.0, 2.0]) |
69 | 69 | algorithm = TestAlgorithm() |
70 | 70 |
|
71 | | - state = AIE.AI.initialize_state(problem, algorithm; iterate = [0.0, 0.0]) |
| 71 | + state = AI.initialize_state(problem, algorithm; iterate = [0.0, 0.0]) |
72 | 72 | @test state isa AIE.DefaultState |
73 | 73 | @test state.iteration == 0 |
74 | 74 | end |
@@ -363,14 +363,14 @@ end |
363 | 363 | ) |
364 | 364 |
|
365 | 365 | problem = TestProblem([1.0, 2.0]) |
366 | | - state = AIE.AI.initialize_state(problem, flattened_alg; iterate = [0.0, 0.0]) |
| 366 | + state = AI.initialize_state(problem, flattened_alg; iterate = [0.0, 0.0]) |
367 | 367 |
|
368 | 368 | # Manually step through to test step! functionality |
369 | | - AIE.AI.increment!(problem, flattened_alg, state) |
| 369 | + AI.increment!(problem, flattened_alg, state) |
370 | 370 | @test state.parent_iteration == 1 |
371 | 371 | @test state.child_iteration == 1 |
372 | 372 |
|
373 | | - AIE.AI.step!(problem, flattened_alg, state) |
| 373 | + AI.step!(problem, flattened_alg, state) |
374 | 374 | # The nested algorithm runs TestAlgorithmStep with 2 iterations, each incrementing by 2 |
375 | 375 | @test state.iterate ≈ [4.0, 4.0] |
376 | 376 | end |
|
0 commit comments