Bug#1019384: scikit-learn: ppc64el fails tolerance in test_mlp with scipy 1.8

Drew Parsons dparsons at debian.org
Thu Sep 8 09:59:45 BST 2022


Source: scikit-learn
Version: 1.1.2+dfsg-5
Severity: normal

scikit-learn fails debci tests when running with scipy 1.8.

The failing test is test_mlp_regressor_dtypes_casting in test_mlp.py

It's not a "large" failure, just that the tolerance rtol=0.0001 is not
met by a small amount. rtol=0.0002 would pass.

The error message is

______________________ test_mlp_regressor_dtypes_casting _______________________

    def test_mlp_regressor_dtypes_casting():
        mlp_64 = MLPRegressor(
            alpha=1e-5, hidden_layer_sizes=(5, 3), random_state=1, max_iter=50
        )
        mlp_64.fit(X_digits[:300], y_digits[:300])
        pred_64 = mlp_64.predict(X_digits[300:])
    
        mlp_32 = MLPRegressor(
            alpha=1e-5, hidden_layer_sizes=(5, 3), random_state=1, max_iter=50
        )
        mlp_32.fit(X_digits[:300].astype(np.float32), y_digits[:300])
        pred_32 = mlp_32.predict(X_digits[300:].astype(np.float32))
    
>       assert_allclose(pred_64, pred_32, rtol=1e-04)
E       AssertionError: 
E       Not equal to tolerance rtol=0.0001, atol=0
E       
E       Mismatched elements: 1 / 60 (1.67%)
E       Max absolute difference: 1.77346709e-06
E       Max relative difference: 0.00013333
E        x: array([-1.624248e-02,  2.327707e+00,  6.674963e-01,  4.904700e-01,
E               6.739288e-01,  3.166697e+00,  4.548126e-01,  6.674963e-01,
E              -3.220949e-02, -6.899952e-01,  6.674963e-01, -6.329127e-01,...
E        y: array([-1.624250e-02,  2.327706e+00,  6.674960e-01,  4.904711e-01,
E               6.739284e-01,  3.166698e+00,  4.548138e-01,  6.674960e-01,
E              -3.220773e-02, -6.899955e-01,  6.674960e-01, -6.329128e-01,...

/usr/lib/python3/dist-packages/sklearn/neural_network/tests/test_mlp.py:872: AssertionError



More information about the debian-science-maintainers mailing list