Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nightly action failing for Unpinned releases. #191

Open
MridulS opened this issue Jan 14, 2025 · 2 comments · May be fixed by #193
Open

Nightly action failing for Unpinned releases. #191

MridulS opened this issue Jan 14, 2025 · 2 comments · May be fixed by #193
Assignees

Comments

@MridulS
Copy link
Member

MridulS commented Jan 14, 2025

Looks like there were updates to scipy optimisers in the latest 1.15 release and this messes up the assertions in one of the tests https://github.com/scipp/esssans/actions/workflows/unpinned.yml.

E       AssertionError: 
E       Arrays are not equal
E       when comparing values
E       Mismatched elements: 11 / 100 (11%)
E       Max absolute difference among violations: 4.7683716e-07
E       Max relative difference among violations: 1.1717832e-07
E        ACTUAL: array([4.216311, 4.616472, 4.709669, 4.601788, 4.390278, 4.089487,
E              3.743527, 3.373496, 3.044424, 2.733558, 2.482377, 2.240015,
E              2.070589, 1.893589, 1.749089, 1.633279, 1.532102, 1.421638,...
E        DESIRED: array([4.216311, 4.616472, 4.709668, 4.601788, 4.390278, 4.089487,
E              3.743527, 3.373496, 3.044424, 2.733558, 2.482377, 2.240014,
E              2.070589, 1.893589, 1.749089, 1.633279, 1.532102, 1.421638,...
@jokasimr
Copy link
Contributor

Looks like there were updates to scipy optimisers in the latest 1.15 release and this messes up the assertions in one of the tests

This sounds very likely, last two failing runs use scipy 1.15 and the latest passing run uses scipy 1.14.

But I don't see how it could happen. As far as I can tell scipy.optimize is only used in beam_center_from_iofq() but the failing tests use the other beam center finding routine beam_center_from_center_of_mass().

@jokasimr
Copy link
Contributor

Okay the issue is the new scipy release, but not the changes to the optimizers, it was the changes to the physical constants that made the assertion fail:

In version 1.14.1:

In [1]: import scipy as sp
In [2]: sp.version
Out[2]: '1.14.1'

In [3]: sp.constants.neutron_mass
Out[3]: 1.67492749804e-27

In version 1.15.1:

In [1]: import scipy as sp
In [2]: sp.version
Out[2]: '1.15.1'

In [3]: sp.constants.neutron_mass
Out[3]: 1.67492750056e-27

I've verified that replacing the new neutron mass with the old in scipp.constants makes the failing test pass 👍

@jokasimr jokasimr linked a pull request Jan 17, 2025 that will close this issue
@jokasimr jokasimr moved this from Selected to In progress in Development Board Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In progress
Development

Successfully merging a pull request may close this issue.

2 participants