[Wave RHO][2/4] Adapt solutions to new initial-guess grids - #1073
[Wave RHO][2/4] Adapt solutions to new initial-guess grids#1073mickaelbegon wants to merge 3 commits into
Conversation
7a4d5cc to
8a881e2
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1073 +/- ##
==========================================
+ Coverage 77.26% 77.89% +0.63%
==========================================
Files 196 196
Lines 21506 21571 +65
==========================================
+ Hits 16616 16803 +187
+ Misses 4890 4768 -122
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
pariterre
left a comment
There was a problem hiding this comment.
@pariterre reviewed 4 files and all commit messages, and made 3 comments.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on mickaelbegon).
bioptim/optimization/solution/solution.py line 739 at r1 (raw file):
return new def to_initial_guesses(
Is this used anywhere?
bioptim/optimization/solution/utils.py line 38 at r1 (raw file):
if interpolation == InterpolationType.CONSTANT: return 1 if interpolation == InterpolationType.CONSTANT_WITH_FIRST_AND_LAST_DIFFERENT:
elif, as they are mutually exclusive
bioptim/optimization/solution/utils.py line 63 at r1 (raw file):
if key not in source_phases[phase]: raise KeyError(f"{group_name} '{key}' is absent from the solution phase {phase}") values = _resample_initial_guess(source_phases[phase][key], _target_column_count(target_guess))
Resampling as a linear interpolation won't work for certain InterpolationTypes. Check/raise should be done here
|
@pariterre While working on cocofest (especially with Acados), I was obliged to warm-start problems in many ways... Idea: |
Note
Wave RHO 2/4 — Draft/WIP. Tracking issue: #1086.
This wave and its decomposition come from an analysis performed by OpenAI Codex. Maintainer review is required before these proposals are considered ready.
Wave RHO context
The overall goal is to upstream generic, application-independent foundations for reliable receding-horizon workflows with IPOPT and Acados: solver-input correctness, supported warm-start grid transfer, explicit window outcomes/diagnostics/hooks, and finally supported solver tuning.
Proposed review/merge order:
Role of this PR: generic warm-start transfer foundation across shooting and collocation grids.
Interaction: Can be reviewed in parallel with #1075; its public grid-transfer path supports the workflow discussed in #1072.
All four PRs target
masterindependently; this is an interaction/review order, not a stacked Git dependency.What changed
Solution.to_initial_guesses(...)adapt_solution_to_initial_guesses(...)InitialGuessList.values()or private attributesWhy
Warm starts between windows or solvers need a supported way to adapt solutions when node counts and transcription grids differ.
Validation
pytest -q tests/shard4/test_solution_grid_adaptation.pyThis change is