BlueBrain / NeuroM

Neuronal Morphology Analysis Tool
https://neurom.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
102 stars 55 forks source link

One test failing with 4.0.0: `Arrays are not almost equal to 5 decimals` #1126

Closed sanjayankur31 closed 3 months ago

sanjayankur31 commented 4 months ago

While updating the package to 4.0.0 in Fedora rawhide (the dev branch), we see one test failing:

>       assert_almost_equal(s.volume, 3160.274957542371, decimal=5)
tests/core/test_soma.py:263: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
args = (3160.2749000561025, 3160.274957542371), kwds = {'decimal': 5}
    @wraps(func)
    def inner(*args, **kwds):
        with self._recreate_cm():
>           return func(*args, **kwds)
E           AssertionError: 
E           Arrays are not almost equal to 5 decimals
E            ACTUAL: 3160.2749000561025
E            DESIRED: 3160.274957542371
/usr/lib64/python3.12/contextlib.py:81: AssertionError

The values are close, but not as close as they should be. How should we handle this please? Complete log is here:

fedora-rawhide-neuroml-build-log.txt

eleftherioszisis commented 4 months ago

I ran the tests with VirtualBox and the latest Fedora rawhide ISO (first iso in the list) I found: https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Workstation/x86_64/iso/ And they seem to be passing.

Is there a particular architecture to take into account to repro this difference in the value?

I could relax the test accuracy, however it would be interesting to know why the test fails.

sanjayankur31 commented 4 months ago

Here are two build tasks:

https://koji.fedoraproject.org/koji/taskinfo?taskID=118149185 -> s390x https://koji.fedoraproject.org/koji/taskinfo?taskID=118149298 -> x86_64

You can see the hardware info in the hw_info.log file.

Could you run a dnf update in your rawhide box, just in case any packages have been updated that may introduce the error? All the "dependencies" pulled in during the build will also be listed in the root.log file.

eleftherioszisis commented 4 months ago

@sanjayankur31 would it be possible to test if #1128 fixes the error?

sanjayankur31 commented 4 months ago

Sure, I'll test it out now and report back.

sanjayankur31 commented 4 months ago

That does seem to fix it now:

https://koji.fedoraproject.org/koji/taskinfo?taskID=118282452

This was on ppc64le, I'll force it to run on all arches to confirm too.

sanjayankur31 commented 4 months ago

Also passes on s390x: https://koji.fedoraproject.org/koji/taskinfo?taskID=118285306

eleftherioszisis commented 3 months ago

v4.0.2 has been released with the fix for this issue. Please feel free to open a new issue if you encounter something else.