Skip to content

Bumps fit: iteration counting wrong for lm/newton; success always fabricated; empty-history crash #268

Open

Description

@rozyczko

Findings F-H6, F-L15 in DEEP_ANALYSIS.md (parent #261). Verified against bumps 1.0.4.

minimizer_bumps.py:235-236, 765-781:

  • The "+1 because steps are zero-based" assumption holds for amoeba only. LevenbergMarquardtFit always reports history.step[0] == 1 (no per-iteration streaming), so results.iterations is always 2 and budget exhaustion is never detected for Bumps_lm.
  • For newton the last step index equals the budget (1-based), so a run that legitimately converges on the last allowed step is misreported as success=False ("reached maximum optimizer steps").
  • OptimizeResult(..., success=True, status=0) is fabricated (lines 237-244): a diverged bumps fit can never report engine failure; results.success depends solely on the budget heuristic.
  • If a fitter never streams a step, int(history_step.step[0]) raises IndexError inside the success path and converts a successful fit into FitError (line 236).

Activity

  1. added
    [scope] bug
    [area] fitting
    [priority] high
    on Jun 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [area] fitting[priority] high[scope] bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions