Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 928600 - dev-python/scikit-image-0.23.0_rc2 fails tests with weird FP non-equality
Summary: dev-python/scikit-image-0.23.0_rc2 fails tests with weird FP non-equality
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords: TESTFAILURE
Depends on:
Blocks:
 
Reported: 2024-04-04 20:44 UTC by Agostino Sarubbo
Modified: 2024-04-05 16:17 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log.xz (build.log.xz,125.96 KB, application/x-xz)
2024-04-04 20:44 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2024-04-04 20:44:50 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: dev-python/scikit-image-0.23.0_rc2 fails tests.
Discovered on: amd64 (internal ref: ci)

Info about the issue:
https://wiki.gentoo.org/wiki/Project:Tinderbox/Common_Issues_Helper#CF0015
Comment 1 Agostino Sarubbo gentoo-dev 2024-04-04 20:44:53 UTC
Created attachment 889460 [details]
build.log.xz

build log and emerge --info (compressed because it exceeds attachment limit, use 'xzless' to read it)
Comment 2 Agostino Sarubbo gentoo-dev 2024-04-04 20:44:54 UTC
Error(s) that match a know pattern in addition to what has been reported in the summary:


E           AssertionError: 
E           ImportError: PyWavelets is not installed. Please ensure it is installed in order to use this function.
E           ModuleNotFoundError: No module named 'pywt'
        except ImportError:
FAILED measure/tests/test_fit.py::test_ellipse_parameter_stability - AssertionError: 
filters/rank/tests/test_rank.py::test_1d_input_raises_error[autolevel] <- ../scikit_image-0.23.0rc2-python3_10/install/usr/lib/python3.10/site-packages/skimage/filters/rank/tests/test_rank.py PASSED [1242/8680]
filters/rank/tests/test_rank.py::test_1d_input_raises_error[enhance_contrast] <- ../scikit_image-0.23.0rc2-python3_10/install/usr/lib/python3.10/site-packages/skimage/filters/rank/tests/test_rank.py PASSED [1252/8680]
filters/rank/tests/test_rank.py::test_1d_input_raises_error[entropy] <- ../scikit_image-0.23.0rc2-python3_10/install/usr/lib/python3.10/site-packages/skimage/filters/rank/tests/test_rank.py PASSED [1257/8680]
filters/rank/tests/test_rank.py::test_1d_input_raises_error[equalize] <- ../scikit_image-0.23.0rc2-python3_10/install/usr/lib/python3.10/site-packages/skimage/filters/rank/tests/test_rank.py PASSED [1243/8680]
filters/rank/tests/test_rank.py::test_1d_input_raises_error[geometric_mean] <- ../scikit_image-0.23.0rc2-python3_10/install/usr/lib/python3.10/site-packages/skimage/filters/rank/tests/test_rank.py PASSED [1247/8680]
filters/rank/tests/test_rank.py::test_1d_input_raises_error[gradient] <- ../scikit_image-0.23.0rc2-python3_10/install/usr/lib/python3.10/site-packages/skimage/filters/rank/tests/test_rank.py PASSED [1244/8680]
filters/rank/tests/test_rank.py::test_1d_input_raises_error[majority] <- ../scikit_image-0.23.0rc2-python3_10/install/usr/lib/python3.10/site-packages/skimage/filters/rank/tests/test_rank.py PASSED [1259/8680]
filters/rank/tests/test_rank.py::test_1d_input_raises_error[maximum] <- ../scikit_image-0.23.0rc2-python3_10/install/usr/lib/python3.10/site-packages/skimage/filters/rank/tests/test_rank.py PASSED [1245/8680]
filters/rank/tests/test_rank.py::test_1d_input_raises_error[mean] <- ../scikit_image-0.23.0rc2-python3_10/install/usr/lib/python3.10/site-packages/skimage/filters/rank/tests/test_rank.py PASSED [1246/8680]
filters/rank/tests/test_rank.py::test_1d_input_raises_error[median] <- ../scikit_image-0.23.0rc2-python3_10/install/usr/lib/python3.10/site-packages/skimage/filters/rank/tests/test_rank.py PASSED [1249/8680]
filters/rank/tests/test_rank.py::test_1d_input_raises_error[minimum] <- ../scikit_image-0.23.0rc2-python3_10/install/usr/lib/python3.10/site-packages/skimage/filters/rank/tests/test_rank.py PASSED [1250/8680]
filters/rank/tests/test_rank.py::test_1d_input_raises_error[modal] <- ../scikit_image-0.23.0rc2-python3_10/install/usr/lib/python3.10/site-packages/skimage/filters/rank/tests/test_rank.py PASSED [1251/8680]
filters/rank/tests/test_rank.py::test_1d_input_raises_error[noise_filter] <- ../scikit_image-0.23.0rc2-python3_10/install/usr/lib/python3.10/site-packages/skimage/filters/rank/tests/test_rank.py PASSED [1256/8680]
filters/rank/tests/test_rank.py::test_1d_input_raises_error[otsu] <- ../scikit_image-0.23.0rc2-python3_10/install/usr/lib/python3.10/site-packages/skimage/filters/rank/tests/test_rank.py PASSED [1258/8680]
filters/rank/tests/test_rank.py::test_1d_input_raises_error[pop] <- ../scikit_image-0.23.0rc2-python3_10/install/usr/lib/python3.10/site-packages/skimage/filters/rank/tests/test_rank.py PASSED [1253/8680]
filters/rank/tests/test_rank.py::test_1d_input_raises_error[subtract_mean] <- ../scikit_image-0.23.0rc2-python3_10/install/usr/lib/python3.10/site-packages/skimage/filters/rank/tests/test_rank.py PASSED [1248/8680]
filters/rank/tests/test_rank.py::test_1d_input_raises_error[sum] <- ../scikit_image-0.23.0rc2-python3_10/install/usr/lib/python3.10/site-packages/skimage/filters/rank/tests/test_rank.py PASSED [1254/8680]
filters/rank/tests/test_rank.py::test_1d_input_raises_error[threshold] <- ../scikit_image-0.23.0rc2-python3_10/install/usr/lib/python3.10/site-packages/skimage/filters/rank/tests/test_rank.py PASSED [1255/8680]
measure/tests/test_fit.py::test_ellipse_parameter_stability <- ../scikit_image-0.23.0rc2-python3_10/install/usr/lib/python3.10/site-packages/skimage/measure/tests/test_fit.py FAILED [6064/8680]
SKIPPED [1] ../scikit_image-0.23.0rc2-python3_10/install/usr/lib/python3.10/site-packages/skimage/feature/tests/test_fisher_vector.py:5: could not import 'sklearn': No module named 'sklearn'
SKIPPED [1] ../scikit_image-0.23.0rc2-python3_10/install/usr/lib/python3.10/site-packages/skimage/io/tests/test_fits.py:6: could not import 'astropy': No module named 'astropy'
SKIPPED [1] ../scikit_image-0.23.0rc2-python3_10/install/usr/lib/python3.10/site-packages/skimage/io/tests/test_imread.py:17: could not import 'imread': No module named 'imread'
SKIPPED [1] ../scikit_image-0.23.0rc2-python3_10/install/usr/lib/python3.10/site-packages/skimage/io/tests/test_mpl_imshow.py:7: could not import 'matplotlib.pyplot': No module named 'matplotlib'
SKIPPED [1] ../scikit_image-0.23.0rc2-python3_10/install/usr/lib/python3.10/site-packages/skimage/io/tests/test_simpleitk.py:8: could not import 'SimpleITK': No module named 'SimpleITK'
SKIPPED [1] ../scikit_image-0.23.0rc2-python3_10/install/usr/lib/python3.10/site-packages/skimage/measure/tests/test_regionprops.py:1380: could not import 'numpydoc.docscrape': No module named 'numpydoc'
SKIPPED [1] ../scikit_image-0.23.0rc2-python3_10/install/usr/lib/python3.10/site-packages/skimage/_shared/tests/test_geometry.py:7: could not import 'matplotlib': No module named 'matplotlib'
SKIPPED [1] ../scikit_image-0.23.0rc2-python3_10/install/usr/lib/python3.10/site-packages/skimage/util/tests/test_apply_parallel.py:10: could not import 'dask.array': No module named 'dask'
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-04-05 15:53:43 UTC
The actual error:

```
=================================== FAILURES ===================================
_______________________ test_ellipse_parameter_stability _______________________

    def test_ellipse_parameter_stability():
        """The fit should be modified so that a > b"""
    
        for angle in np.arange(0, 180 + 1, 1):
            # generate rotation matrix
            theta = np.deg2rad(angle)
            c = np.cos(theta)
            s = np.sin(theta)
            R = np.array([[c, -s], [s, c]])
    
            # generate points on ellipse
            t = np.linspace(0, 2 * np.pi, 20)
            a = 100
            b = 50
            points = np.array([a * np.cos(t), b * np.sin(t)])
            points = R @ points
    
            # fit model to points
            ellipse_model = EllipseModel()
            ellipse_model.estimate(points.T)
            _, _, a_prime, b_prime, theta_prime = ellipse_model.params
    
>           assert_almost_equal(theta_prime, theta)

R          = array([[ 0.70710678, -0.70710678],
       [ 0.70710678,  0.70710678]])
_          = 4.440892098500626e-16
a          = 100
a_prime    = 99.99999999999999
angle      = 45
b          = 50
b_prime    = 49.99999999999999
c          = 0.7071067811865476
ellipse_model = <skimage.measure.fit.EllipseModel object at 0x72e717cce680>
points     = array([[ 70.71067812,  55.39951871,  34.08496184,   9.07677047,
        -16.91502982, -41.07382417, -60.78163234, -73.90280752,
        -79.01546679, -75.56557418, -63.92697909, -45.36090388,
        -21.87927089,   3.97332059,  29.39534113,  51.63192035,
         68.27337984,  77.51635926,  78.35923836,  70.71067812],
       [ 70.71067812,  78.35923836,  77.51635926,  68.27337984,
         51.63192035,  29.39534113,   3.97332059, -21.87927089,
        -45.36090388, -63.92697909, -75.56557418, -79.01546679,
        -73.90280752, -60.78163234, -41.07382417, -16.91502982,
          9.07677047,  34.08496184,  55.39951871,  70.71067812]])
s          = 0.7071067811865475
t          = array([0.        , 0.33069396, 0.66138793, 0.99208189, 1.32277585,
       1.65346982, 1.98416378, 2.31485774, 2.64555171, 2.97624567,
       3.30693964, 3.6376336 , 3.96832756, 4.29902153, 4.62971549,
       4.96040945, 5.29110342, 5.62179738, 5.95249134, 6.28318531])
theta      = 0.7853981633974483
theta_prime = 2.356194490192345

../scikit_image-0.23.0rc2-python3_10/install/usr/lib/python3.10/site-packages/skimage/measure/tests/test_fit.py:263: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = (2.356194490192345, 0.7853981633974483), kwds = {}

    @wraps(func)
    def inner(*args, **kwds):
        with self._recreate_cm():
>           return func(*args, **kwds)
E           AssertionError: 
E           Arrays are not almost equal to 7 decimals
E            ACTUAL: 2.356194490192345
E            DESIRED: 0.7853981633974483

args       = (2.356194490192345, 0.7853981633974483)
func       = <function assert_almost_equal at 0x72e72ba03640>
kwds       = {}
self       = <contextlib._GeneratorContextManager object at 0x72e72b6bd1e0>

/usr/lib/python3.10/contextlib.py:79: AssertionError
```
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-04-05 16:10:35 UTC
That said, I can't reproduce, neither with numpy-1 nor numpy-2.