Skip to content

[HOLD] Track variational solver convergence - #1070

Draft
mickaelbegon wants to merge 3 commits into
pyomeca:masterfrom
mickaelbegon:codex/track-990-convergence
Draft

mickaelbegon wants to merge 3 commits into
pyomeca:masterfrom
mickaelbegon:codex/track-990-convergence

Conversation

@mickaelbegon

@mickaelbegon mickaelbegon commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • add a reusable solver-convergence assertion with an optional iteration ceiling
  • report solver status and iteration count in assertion failures
  • protect four variational-integrator variants against convergence and major iteration regressions

Rationale

Exact IPOPT iteration counts can vary across platforms and dependency versions. This first increment uses a deliberately broad ceiling of 100 iterations for problems that currently converge comfortably below it, detecting meaningful regressions without making CI unnecessarily brittle.

Validation

  • MPLCONFIGDIR=/private/tmp/bioptim-mpl-990 python -m pytest tests/shard4/test_variational_integrator_examples.py -vv (4 passed)
  • git diff --check

Progress toward #990; this does not close the repository-wide tracking issue.


This change is Reviewable

@mickaelbegon mickaelbegon changed the title Track variational solver convergence [HOLD] Track variational solver convergence Jul 22, 2026
Always populate shifted state guesses on the first interpolation conversion,
with deterministic coverage for the first and subsequent windows.

Clear named plotting figures before rebuilding their axes.

Backport the numerical references from pyomeca#1096 without changing tolerances.

Format the solver convergence assertion helper without changing its behavior.
Use unscaled IPOPT convergence for the collocation feasibility regression without relaxing its tolerance.
@codecov

codecov Bot commented Oct 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 77.89%. Comparing base (627c167) to head (a813653).
⚠️ Report is 92 commits behind head on master.

Files with missing lines Patch % Lines
bioptim/gui/ipopt_output_plot.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1070      +/-   ##
==========================================
+ Coverage   77.26%   77.89%   +0.62%     
==========================================
  Files         196      198       +2     
  Lines       21508    21695     +187     
==========================================
+ Hits        16618    16899     +281     
+ Misses       4890     4796      -94     
Flag Coverage Δ
unittests 77.89% <88.88%> (+0.62%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant