From 4a87ea49b8a70f0e986d59b6c58ce190ba7d86b4 Mon Sep 17 00:00:00 2001 From: Jiaming Yuan Date: Tue, 21 Jun 2022 01:05:27 +0800 Subject: [PATCH] Reduce regularization for CPU gblinear. (#8013) --- tests/python/test_linear.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/python/test_linear.py b/tests/python/test_linear.py index 2ea3e44dd..e7574cd03 100644 --- a/tests/python/test_linear.py +++ b/tests/python/test_linear.py @@ -38,9 +38,14 @@ class TestLinear: # Loss is not guaranteed to always decrease because of regularisation parameters # We test a weaker condition that the loss has not increased between the first and last # iteration - @given(parameter_strategy, strategies.integers(10, 50), - tm.dataset_strategy, coord_strategy, strategies.floats(1e-5, 1.0), - strategies.floats(1e-5, 1.0)) + @given( + parameter_strategy, + strategies.integers(10, 50), + tm.dataset_strategy, + coord_strategy, + strategies.floats(1e-5, 0.8), + strategies.floats(1e-5, 0.8) + ) @settings(deadline=None, print_blob=True) def test_coordinate_regularised(self, param, num_rounds, dataset, coord_param, alpha, lambd): param['updater'] = 'coord_descent'