Skip to content

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

@rozyczko

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    [area] fittingUmbrella for fitting related work[priority] highShould be prioritized soon[scope] bugBug report or fix (major.minor.PATCH)
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions