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

Bump numpy requirement to 1.24, matching Mantid #309

Merged
merged 13 commits into from
Jul 24, 2024
Merged

Bump numpy requirement to 1.24, matching Mantid #309

merged 13 commits into from
Jul 24, 2024

Conversation

ajjackson
Copy link
Collaborator

@ajjackson ajjackson commented Jul 19, 2024

While transitioning to Numpy 2.0 it is helpful to reduce the range of versions being used and tested. As we are changing other requirements in this release, it is a good time to bump Numpy.

Here we also update the build/release workflow to add Python 3.12 and build with Numpy 2.0; these builds should also work with all the supported numpy 1.x.

  • Add a note to changelog that binary wheels are now built against 2.0

While transitioning to Numpy 2.0 it is helpful to reduce the range of
versions being used and tested. As we are changing other requirements
in this release, it is a good time to bump Numpy.

Here we also update the build/release workflow to add Python 3.12 and
build with Numpy 2.0; these builds _should_ also work with all the
supported numpy 1.x.
Copy link
Contributor

github-actions bot commented Jul 19, 2024

Test Results

    22 files  ±0      22 suites  ±0   30m 57s ⏱️ +21s
 1 050 tests ±0   1 044 ✅ ±0   6 💤 ±0  0 ❌ ±0 
10 440 runs  ±0  10 377 ✅ ±0  63 💤 ±0  0 ❌ ±0 

Results for commit dc1d45e. ± Comparison against base commit 833d7a2.

♻️ This comment has been updated with latest results.

@ajjackson
Copy link
Collaborator Author

I'm seeing some slightly scary warnings on the minrequirements tests like this:

  /home/runner/work/Euphonic/Euphonic/.tox/py310-minrequirements-linux/lib/python3.10/site-packages/_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning: Exception ignored on calling ctypes callback function: <function _find_modules_with_dl_iterate_phdr.<locals>.match_module_callback at 0x7f2689f2c550>
  
  Traceback (most recent call last):
    File "/home/runner/work/Euphonic/Euphonic/.tox/py310-minrequirements-linux/lib/python3.10/site-packages/threadpoolctl.py", line 347, in match_module_callback
      _get_module_info_from_path(filepath, prefixes, user_api,
    File "/home/runner/work/Euphonic/Euphonic/.tox/py310-minrequirements-linux/lib/python3.10/site-packages/threadpoolctl.py", line 318, in _get_module_info_from_path
      modules.append(_make_module_info(filepath, info, prefix))
    File "/home/runner/work/Euphonic/Euphonic/.tox/py310-minrequirements-linux/lib/python3.10/site-packages/threadpoolctl.py", line 307, in _make_module_info
      version=_get_version(dynlib, internal_api))
    File "/home/runner/work/Euphonic/Euphonic/.tox/py310-minrequirements-linux/lib/python3.10/site-packages/threadpoolctl.py", line 229, in _get_version
      return _get_openblas_version(dynlib)
    File "/home/runner/work/Euphonic/Euphonic/.tox/py310-minrequirements-linux/lib/python3.10/site-packages/threadpoolctl.py", line 252, in _get_openblas_version
      get_config = getattr(openblas_dynlib, "openblas_get_config")
    File "/home/runner/work/Euphonic/Euphonic/.tox/py310-minrequirements-linux/lib/python3.10/ctypes/__init__.py", line 387, in __getattr__
      func = self.__getitem__(name)
    File "/home/runner/work/Euphonic/Euphonic/.tox/py310-minrequirements-linux/lib/python3.10/ctypes/__init__.py", line 392, in __getitem__
      func = self._FuncPtr((name_or_ordinal, self))
  AttributeError: /home/runner/work/Euphonic/Euphonic/.tox/py310-minrequirements-linux/lib/python3.10/site-packages/numpy/core/../../numpy.libs/libopenblas64_p-r0-15028c96.3.21.so: undefined symbol: openblas_get_config

which suggests some issues with the openblas linking. But... the test still passes?

Pinning numpy to a known-good versions still leads to openblas-related
warnings, let's see if Scipy is involved.
@ajjackson ajjackson added the dependencies Pull requests that update a dependency file label Jul 22, 2024
@ajjackson ajjackson added this to the v1.4.0 milestone Jul 22, 2024
With numpy alone, we see no openblas warnings. Scipy is next
suspect...
Finally we have the culprit: threadpoolctl. That makes sense,
actually, as this library is responsible for getting info about
openblas environment and that can vary between builds.

I note that a very recent (April 2024) threadpoolctl release adds
support for "Scientific Python builds of OpenBLAS." That seems
plausible, but first let's see if a slightly gentler version bump
makes any difference.
@ajjackson ajjackson merged commit 8c87ed6 into master Jul 24, 2024
10 checks passed
@ajjackson ajjackson deleted the py10 branch December 12, 2024 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant