From bbdee34ce71d31ace9b653d8179d8bf0a684f20f Mon Sep 17 00:00:00 2001 From: Nikita Titov Date: Mon, 3 Jan 2022 04:23:56 +0300 Subject: [PATCH] Relax assert for number of non-zero elements in test (#191) * Update test_primal_cd.py * address review comments --- lightning/impl/tests/test_primal_cd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightning/impl/tests/test_primal_cd.py b/lightning/impl/tests/test_primal_cd.py index bc317bc7..b8711ae1 100644 --- a/lightning/impl/tests/test_primal_cd.py +++ b/lightning/impl/tests/test_primal_cd.py @@ -172,7 +172,7 @@ def test_debiasing_l1l2(): max_iter=20, C=0.01, random_state=0) clf.fit(mult_csc, mult_target) assert clf.score(mult_csc, mult_target) > 0.75 - assert clf.n_nonzero(percentage=True) == 0.08 + assert 0.0 <= clf.n_nonzero(percentage=True) <= 0.1 def test_debiasing_warm_start():