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

Slow tests are failing for older numpy #1861

Closed
1 of 2 tasks
Zeitsperre opened this issue Aug 1, 2024 · 3 comments
Closed
1 of 2 tasks

Slow tests are failing for older numpy #1861

Zeitsperre opened this issue Aug 1, 2024 · 3 comments
Assignees
Labels
bug Something isn't working priority Immediate priority
Milestone

Comments

@Zeitsperre
Copy link
Collaborator

Zeitsperre commented Aug 1, 2024

Setup Information

  • Xclim version: v0.51.1-dev
  • Python version: Any
  • Operating System: macOS (confirmed), possibly others

Description

Discovered in #1859

It appears that the changes to adapt to the newer numpy version have altered the expected outputs for some of the slow tests. This should be addressed/verified before the next xclim release.

Steps To Reproduce

$ tox -e py3{minor version}-numpy  # older numpy installed and slow tests run

Additional context

Stack Trace: https://github.com/Ouranosinc/xclim/actions/runs/10200661429/job/28220778506

Relevant failures:

  =========================== short test summary info ============================
  FAILED tests/test_indices.py::TestStandardizedIndices::test_standardized_precipitation_index[D-12-gamma-ML-values9-0.02] - AssertionError: 
  Not equal to tolerance rtol=0, atol=0.02
  
  Mismatched elements: 1 / 5 (20%)
  Max absolute difference: 0.12307347
  Max relative difference: 0.12816855
   x: array([-0.158116, -0.049222,  0.672544,  1.08332 ,  0.660903])
   y: array([-0.158854, -0.049165,  0.675863,  0.960247,  0.660831])
  FAILED tests/test_indices.py::TestStandardizedIndices::test_standardized_precipitation_index[D-1-fisk-ML-values10-0.02] - AssertionError: 
  Not equal to tolerance rtol=0, atol=0.02
  
  Mismatched elements: 3 / 5 (60%)
  Max absolute difference: 0.08092193
  Max relative difference: 0.34020486
   x: array([-0.158949,  1.308225,  0.449846,  0.146699, -0.502737])
   y: array([-0.194235,  1.308198,  0.530768,  0.22234 , -0.502635])
  FAILED tests/test_indices.py::TestStandardizedIndices::test_standardized_precipitation_index[D-1-gamma-ML-values8-0.02] - AssertionError: 
  Not equal to tolerance rtol=0, atol=0.02
  
  Mismatched elements: 4 / 5 (80%)
  Max absolute difference: 0.31702955
  Max relative difference: 0.86038048
   x: array([-0.011698,  1.597031,  0.969884,  0.265561, -0.132654])
   y: array([-0.083785,  1.457647,  0.993296,  0.271894, -0.449684])
  = 3 failed, 1564 passed, 73 skipped, 3 xfailed, 8 warnings in 161.20s (0:02:41) =

Contribution

  • I would be willing/able to open a Pull Request to address this bug.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Zeitsperre Zeitsperre added bug Something isn't working priority Immediate priority labels Aug 1, 2024
@aulemahal
Copy link
Collaborator

These tests were explicitly modified by @coxipi to adapt for numpy 2 in #1814. IIUC, I suggest we simply skip them on older numpy.

@Zeitsperre Zeitsperre added this to the Summer 2024 milestone Aug 1, 2024
@coxipi
Copy link
Contributor

coxipi commented Aug 1, 2024

Sorry about that inconvenience

@Zeitsperre
Copy link
Collaborator Author

Closed via #1862

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority Immediate priority
Projects
None yet
Development

No branches or pull requests

3 participants