scikit-learn-intelex icon indicating copy to clipboard operation
scikit-learn-intelex copied to clipboard

daal4py patches to scikit-learn cause test_dtype_match to fail

Open oleksandr-pavlyk opened this issue 6 years ago • 0 comments
trafficstars

With https://github.com/IntelPython/daal4py/pull/84 daal4py is used to compute logistic loss and its gradient with solver='newton-cg'. This causes

python -m daal4py -m pytest --pyargs sklearn.linear_model.tests.test_logistic::test_dtype_match -ra

to fail, so it is currently being deselected, see deselected_tests.yaml#L31.

This issue is to document the deselection and the failure:

>       assert_allclose(lr_32.coef_, lr_64.coef_.astype(np.float32), rtol=rtol)
E       AssertionError:
E       Not equal to tolerance rtol=1e-06, atol=0
E
E       Mismatch: 100%
E       Max absolute difference: 0.00011081
E       Max relative difference: 0.00011659
E        x: array([[0.950293, 0.723663]], dtype=float32)
E        y: array([[0.950404, 0.723695]], dtype=float32)

oleksandr-pavlyk avatar Apr 15 '19 14:04 oleksandr-pavlyk