Commit 1284136
solver options: migrate PHBase-based readers off current_solver_options (#702)
Replace the remaining `self.current_solver_options` reads in
PHBase-based code with `self._effective_solver_options(self._PHIter)`
(or `opt._effective_solver_options(opt._PHIter)` from extensions).
This pulls fwph, aph, and the cross-scenario extension onto the
layered representation alongside PH's own iter0/iterk solves, and
is a real fix beyond just-a-refactor: `current_solver_options`
defaults to `{}` after the phase-2 changes, so user-supplied
`--solver-options "..."` were being silently dropped on these
solve paths. Now they get the full per-iteration fold.
Touched:
* mpisppy/opt/fwph.py (2 callsites)
* mpisppy/opt/aph.py (1 callsite)
* mpisppy/extensions/cross_scen_extension.py (1 callsite)
The migration is mechanical: each line previously passed
`current_solver_options` (a plain dict) and now passes the fold
returned by `_effective_solver_options`. The fold's final layer
is still `current_solver_options` (the back-compat overlay path),
so any Gapper auto-mode mipgap written there still flows through.
xhat_eval and lshaped_bounder (the other current_solver_options
readers) are SPOpt-based, not PHBase-based — they need
`_effective_solver_options` pushed up to SPOpt before they can
migrate. That's a separate follow-up; design doc §6.3 updated to
reflect the new split.
No new tests in this PR: the existing test_aph and the example
runs that exercise fwph and cross_scen catch regressions
(_effective_solver_options is well-tested in
test_solver_options_layers and test_options_reach_solver).
Local: full sweep stays at 229/229 pass (+ 29 expected legacy
deprecation warnings); ruff clean.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 18f94fe commit 1284136
4 files changed
Lines changed: 5 additions & 5 deletions
File tree
- doc/designs
- mpisppy
- extensions
- opt
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
841 | 841 | | |
842 | 842 | | |
843 | 843 | | |
844 | | - | |
| 844 | + | |
845 | 845 | | |
846 | 846 | | |
847 | 847 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
934 | 934 | | |
935 | 935 | | |
936 | 936 | | |
937 | | - | |
| 937 | + | |
938 | 938 | | |
939 | 939 | | |
940 | 940 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
| 148 | + | |
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
| 241 | + | |
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
| |||
0 commit comments