Skip to content

BUG: L-BFGS-B optimizer ignores disp=False, prints output unconditionally - #9823

Merged
bashtage merged 1 commit into
statsmodels:mainfrom
EdenRochmanSharabi:fix-arima-disp-3191
Jun 7, 2026
Merged

bashtage merged 1 commit into
statsmodels:mainfrom
EdenRochmanSharabi:fix-arima-disp-3191

Conversation

@EdenRochmanSharabi

Copy link
Copy Markdown
Contributor

Summary

disp=False was not silencing L-BFGS-B optimizer output because iprint was hardcoded to 0 (which prints a final convergence message) and was never passed through to fmin_l_bfgs_b.

This fix:

  • Sets iprint=-1 (fully silent) when disp=False, and iprint=1 when disp=True
  • Adds "iprint" to the names tuple so it actually gets forwarded to fmin_l_bfgs_b

Closes #3191

Tests

python -m pytest statsmodels/base/tests/test_optimize.py::test_lbfgs_disp_false_no_output -xvs

Previously iprint was set in kwargs but never passed to the optimizer,
and was hardcoded to 0 (which still prints a final convergence message).
Now iprint is included in the pass-through names tuple and set to -1
when disp=False (fully suppressing output) or 1 when disp=True.

Closes statsmodels#3191
@bashtage
bashtage merged commit 5f34292 into statsmodels:main Jun 7, 2026
8 checks passed
@bashtage

bashtage commented Jun 7, 2026

Copy link
Copy Markdown
Member

Thanks for the PR.

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.

Convergence information being displayed during ARIMA.fit() regardless of disp value

2 participants