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

NumPy 1.26 causes error #1513

Open
maresb opened this issue Sep 20, 2023 · 6 comments
Open

NumPy 1.26 causes error #1513

maresb opened this issue Sep 20, 2023 · 6 comments

Comments

@maresb
Copy link
Contributor

maresb commented Sep 20, 2023

Description of your problem or feature request

import aesara

Please provide the full tracebacks for any relevant errors and/or warning messages.

Traceback (most recent call last):
  File "/opt/conda/lib/python3.11/site-packages/aesara/configparser.py", line 234, in fetch_val_for_key
    return self._aesara_cfg.get(section, option)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/configparser.py", line 797, in get
    d = self._unify_values(section, vars)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/configparser.py", line 1168, in _unify_values
    raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'blas'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/conda/lib/python3.11/site-packages/aesara/configparser.py", line 350, in __get__
    val_str = cls.fetch_val_for_key(self.name, delete_key=delete_key)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/aesara/configparser.py", line 238, in fetch_val_for_key
    raise KeyError(key)
KeyError: 'blas__ldflags'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/conda/lib/python3.11/site-packages/aesara/__init__.py", line 120, in <module>
    from aesara import scalar, tensor
  File "/opt/conda/lib/python3.11/site-packages/aesara/tensor/__init__.py", line 106, in <module>
    from aesara.tensor import (  # noqa
  File "/opt/conda/lib/python3.11/site-packages/aesara/tensor/blas.py", line 162, in <module>
    from aesara.tensor.blas_headers import blas_header_text, blas_header_version
  File "/opt/conda/lib/python3.11/site-packages/aesara/tensor/blas_headers.py", line 1015, in <module>
    if not config.blas__ldflags:
           ^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/aesara/configparser.py", line 354, in __get__
    val_str = self.default()
              ^^^^^^^^^^^^^^
  File "/opt/conda/lib/python3.11/site-packages/aesara/link/c/cmodule.py", line 2725, in default_blas_ldflags
    blas_info = np.__config__.get_info("blas_opt")
                ^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'numpy.__config__' has no attribute 'get_info'

Please provide any additional information below.

Versions and main components

  • Aesara version: 2.9.1
  • Python version: 3.11.5
  • Operating system: Ubuntu 22.04
  • How did you install Aesara: micromamba install -c conda-forge aesara-base
Aesara config:

Place the results of python -c "import aesara; print(aesara.config)" here.

N/A

@brandonwillard
Copy link
Member

#1512 was merged recently as a fix for that specific issue, but it doesn't necessarily address all the potential issues with NumPy 1.26, since the CI tests don't cover that version yet.

@maresb
Copy link
Contributor Author

maresb commented Sep 21, 2023

Ah, very nice. I wanted to fix the feedstock and didn't check for duplicates.

@brandonwillard
Copy link
Member

Ah, very nice. I wanted to fix the feedstock and didn't check for duplicates.

No problem; it's probably best to bound the version for now, as you did in the feedstock.

@maresb
Copy link
Contributor Author

maresb commented Sep 21, 2023

Ah, so to be clear <1.26 should apply also in 2.9.2?

@maresb
Copy link
Contributor Author

maresb commented Sep 21, 2023

If so, should probably be added to pyproject.toml

@brandonwillard
Copy link
Member

brandonwillard commented Sep 21, 2023

If so, should probably be added to pyproject.toml

True. I might have time to set up the tests in CI soon, in which case bounding the version might not be necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants