Skip to content

Fix Gamma Mixture example broken by Optim v2.3.2 - #105

Merged
bvdmitri merged 1 commit into
mainfrom
fix/gamma-mixture-optim
Oct 12, 2026
Merged

bvdmitri merged 1 commit into
mainfrom
fix/gamma-mixture-optim

Conversation

@bvdmitri

Copy link
Copy Markdown
Member

Summary

Scheduled CI has been failing since 2026-09-21. The only failing notebook is Problem Specific/Gamma Mixture, which errors with Optimisation procedure for point mass estimation did not converge.

Root cause

  • Optim v2.3.2 (Compute the line search's alpha = 0 slope from the gradient again JuliaNLSolvers/Optim.jl#1286, released 2026-09-14) changed how the line search computes its initial slope.
  • RxInfer's default point-mass optimizer for bounded parameters is Fminbox(GradientDescent()). With the new Optim it now reaches the iteration limit on the Gamma shape parameters as, even though it has effectively converged.
  • Bisected locally on Julia 1.10: pinning Optim to 2.3.1 fixes it, while pinning LineSearches to 7.8.1 does not.

Fix

  • Pass a custom optimizer to PointMassFormConstraint that uses Fminbox(LBFGS()).
  • Add Optim to the notebook's Project.toml.

Verification

  • make examples FILTER="Gamma Mixture" (Julia 1.13): 1 successful, 0 failed.
  • Results match the currently published page to about 1e-6 (inferred mixing 0.3728 / 0.6272).

Follow-up worth considering: a more robust default in RxInfer's default_point_mass_form_constraint_optimizer.

🤖 Generated with Claude Code

Optim v2.3.2 changed the line search's initial slope computation, which made
RxInfer's default Fminbox(GradientDescent()) point-mass optimizer hit its
iteration limit on the Gamma shape parameters, failing scheduled CI since
2026-09-21. Pass a custom L-BFGS-based optimizer instead.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@bvdmitri
bvdmitri merged commit e20283a into main Oct 12, 2026
5 checks passed
@bvdmitri
bvdmitri deleted the fix/gamma-mixture-optim branch October 12, 2026 10:58
bvdmitri added a commit that referenced this pull request Oct 12, 2026
…105)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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