Skip to content

Commit fdf378f

Browse files
fix issue #381 (#382)
* fixed method and added test * added changelog entry * Prepared changelog for release
1 parent a2a7699 commit fdf378f

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

CHANGELOG.rst

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,25 @@ Changelog
88
=========
99

1010
Unreleased
11+
----------
12+
13+
14+
1.4.2 - 2021-06-15
1115
------------------
12-
**Tutorials and documenation improvements**:
16+
17+
**Tutorials and documenation improvements:**
18+
1319
- Adding tutorials to the documentation
1420
- Additional documentation improvements
1521

22+
**Bug fix:**
23+
24+
- Verbose progress bar now working again.
25+
1626
**Other:**
27+
1728
- Small improvement in documentation for the ``alpha_index`` argument to :func:`quantcore.glm.GeneralizedLinearRegressor.predict`.
29+
- Pinned pre-commit hooks versions.
1830

1931
1.4.1 - 2021-05-01
2032
------------------

src/quantcore/glm/_solvers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ def _update(self, n_iter, iteration_runtime, cur_grad_norm):
407407
step = max(self.n_bar_steps - (np.log10(cur_grad_norm) - np.log10(self.tol)), 0)
408408
# round to two digits for beauty
409409
self.t.n = np.round(step, 2)
410-
self.t._update(0)
410+
self.t.update(0)
411411

412412

413413
class IRLSData:

tests/glm/test_glm.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1810,3 +1810,11 @@ def test_alpha_parametrization_fail(kwargs, regression_data):
18101810
with pytest.raises((ValueError, TypeError)):
18111811
model = GeneralizedLinearRegressor(**kwargs)
18121812
model.fit(X=X, y=y)
1813+
1814+
1815+
def test_verbose(regression_data, capsys):
1816+
X, y = regression_data
1817+
mdl = GeneralizedLinearRegressor(verbose=1)
1818+
mdl.fit(X=X, y=y)
1819+
captured = capsys.readouterr()
1820+
assert "Iteration" in captured.err

0 commit comments

Comments
 (0)