File: 0002-Relax-test-tolerance.patch

package info (click to toggle)
scikit-learn 1.7.2%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 25,752 kB
  • sloc: python: 219,120; cpp: 5,790; ansic: 846; makefile: 191; javascript: 110
file content (38 lines) | stat: -rw-r--r-- 1,687 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From: Andreas Tille <tille@debian.org>
Date: Sun, 12 Oct 2025 01:00:57 +0200
Subject: Relax test tolerance

Last-Update: Tue, 15 Feb 2022 13:33:35 +0100
Origin: https://salsa.debian.org/science-team/scikit-learn/-/jobs/2469653

>       assert_allclose(rbm_64.components_, rbm_32.components_, rtol=1e-03, atol=0)
E       AssertionError:
E       Not equal to tolerance rtol=0.001, atol=0
E
E       Mismatched elements: 1 / 1024 (0.0977%)
E       Max absolute difference: 1.64902041e-07
E       Max relative difference: 0.00120168
E        x: array([[-0.314464, -0.269352, -0.050074, ...,  0.032314, -0.184839,
E               -0.34867 ],
E              [-0.315646, -0.263143, -0.079185, ...,  0.054781, -0.178217,...
E        y: array([[-0.314464, -0.269352, -0.050074, ...,  0.032314, -0.184839,
E               -0.34867 ],
E              [-0.315646, -0.263143, -0.079185, ...,  0.054781, -0.178217,...
sklearn/neural_network/tests/test_rbm.py:239: AssertionError
---
 sklearn/neural_network/tests/test_rbm.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sklearn/neural_network/tests/test_rbm.py b/sklearn/neural_network/tests/test_rbm.py
index 8211c97..adfdc68 100644
--- a/sklearn/neural_network/tests/test_rbm.py
+++ b/sklearn/neural_network/tests/test_rbm.py
@@ -235,7 +235,7 @@ def test_convergence_dtype_consistency():
     assert_allclose(
         rbm_64.intercept_visible_, rbm_32.intercept_visible_, rtol=1e-05, atol=0
     )
-    assert_allclose(rbm_64.components_, rbm_32.components_, rtol=1e-03, atol=0)
+    assert_allclose(rbm_64.components_, rbm_32.components_, rtol=1e-02, atol=1e-06)
     assert_allclose(rbm_64.h_samples_, rbm_32.h_samples_)