diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 9adbe964..c32ea3a6 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -8,13 +8,25 @@ Changelog ========= Unreleased +---------- + + +1.4.2 - 2021-06-15 ------------------ -**Tutorials and documenation improvements**: + +**Tutorials and documenation improvements:** + - Adding tutorials to the documentation - Additional documentation improvements +**Bug fix:** + +- Verbose progress bar now working again. + **Other:** + - Small improvement in documentation for the ``alpha_index`` argument to :func:`quantcore.glm.GeneralizedLinearRegressor.predict`. +- Pinned pre-commit hooks versions. 1.4.1 - 2021-05-01 ------------------ diff --git a/src/quantcore/glm/_solvers.py b/src/quantcore/glm/_solvers.py index fc59dd42..49edf54c 100644 --- a/src/quantcore/glm/_solvers.py +++ b/src/quantcore/glm/_solvers.py @@ -407,7 +407,7 @@ def _update(self, n_iter, iteration_runtime, cur_grad_norm): step = max(self.n_bar_steps - (np.log10(cur_grad_norm) - np.log10(self.tol)), 0) # round to two digits for beauty self.t.n = np.round(step, 2) - self.t._update(0) + self.t.update(0) class IRLSData: diff --git a/tests/glm/test_glm.py b/tests/glm/test_glm.py index 82118b50..cf237007 100644 --- a/tests/glm/test_glm.py +++ b/tests/glm/test_glm.py @@ -1810,3 +1810,11 @@ def test_alpha_parametrization_fail(kwargs, regression_data): with pytest.raises((ValueError, TypeError)): model = GeneralizedLinearRegressor(**kwargs) model.fit(X=X, y=y) + + +def test_verbose(regression_data, capsys): + X, y = regression_data + mdl = GeneralizedLinearRegressor(verbose=1) + mdl.fit(X=X, y=y) + captured = capsys.readouterr() + assert "Iteration" in captured.err