You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/minimization.md
+44Lines changed: 44 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -95,6 +95,50 @@ This prevents numerical under/overflow across the extreme dynamic range between
95
95
96
96
The step size α is capped at the distance to the nearest bound (α_max), then a line search finds the optimal α in [0, α_max]. If a parameter hits a bound, it becomes an active constraint.
97
97
98
+
## Termination Control (ADABK solvers)
99
+
100
+
Four parameters control when ADABK solvers decide to stop. Pass them via the `options` dict of `minimize()`:
101
+
102
+
```python
103
+
final_params, state = minimize(
104
+
fn=my_loss_fn,
105
+
init_params=params,
106
+
solver_name="ADABK0",
107
+
lower_bound=lower,
108
+
upper_bound=upper,
109
+
options={
110
+
"cooldown": 50, # default: 20
111
+
"min_steps": 200, # default: 10
112
+
"verbose_print": True, # default: False
113
+
"max_linesearch_steps": 100, # default: 50
114
+
},
115
+
)
116
+
```
117
+
118
+
| Parameter | Default | Description |
119
+
|-----------|---------|-------------|
120
+
|`cooldown`|`20`| Steps to suppress termination after a constraint is released. Prevents premature convergence caused by a transient function spike when a bound constraint opens. |
121
+
|`min_steps`|`10`| Minimum iterations before termination is ever considered. Useful when the initial gradient is near zero but the landscape is not yet explored. |
122
+
|`verbose_print`|`False`| Print per-step diagnostics: current `f`, `f_diff`, `best_f`, cooldown status, and termination decision. Uses `jax.debug.print` so it is JIT-compatible. |
123
+
|`max_linesearch_steps`|`50`| Maximum bounded line-search steps per iteration. |
124
+
125
+
### How termination is decided
126
+
127
+
Termination requires **all** of the following to hold simultaneously:
0 commit comments