You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(peak-performance) ➜ peak-performance python p.py
Traceback (most recent call last):
File "/home/michael/github/peak-performance/p.py", line 5, in <module>
from peak_performance import pipeline as pl
File "/home/michael/github/peak-performance/.venv/lib/python3.12/site-packages/peak_performance/__init__.py", line 3, in <module>
from . import models, pipeline, plots
File "/home/michael/github/peak-performance/.venv/lib/python3.12/site-packages/peak_performance/models.py", line 26, in <module>
import pymc as pm
File "/home/michael/github/peak-performance/.venv/lib/python3.12/site-packages/pymc/__init__.py", line 46, in <module>
__set_compiler_flags()
File "/home/michael/github/peak-performance/.venv/lib/python3.12/site-packages/pymc/__init__.py", line 29, in __set_compiler_flags
import pytensor
File "/home/michael/github/peak-performance/.venv/lib/python3.12/site-packages/pytensor/__init__.py", line 118, in <module>
from pytensor import scalar, tensor
File "/home/michael/github/peak-performance/.venv/lib/python3.12/site-packages/pytensor/tensor/__init__.py", line 103, in <module>
import pytensor.tensor.rewriting
File "/home/michael/github/peak-performance/.venv/lib/python3.12/site-packages/pytensor/tensor/rewriting/__init__.py", line 1, in <module>
import pytensor.tensor.rewriting.basic
File "/home/michael/github/peak-performance/.venv/lib/python3.12/site-packages/pytensor/tensor/rewriting/basic.py", line 43, in <module>
from pytensor.raise_op import Assert, CheckAndRaise, assert_op
File "/home/michael/github/peak-performance/.venv/lib/python3.12/site-packages/pytensor/raise_op.py", line 14, in <module>
from pytensor.tensor.type import DenseTensorType
File "/home/michael/github/peak-performance/.venv/lib/python3.12/site-packages/pytensor/tensor/type.py", line 801, in <module>
cscalar = TensorType("complex64", ())
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/michael/github/peak-performance/.venv/lib/python3.12/site-packages/pytensor/tensor/type.py", line 105, in __init__
if np.obj2sctype(dtype) is None:
^^^^^^^^^^^^^
File "/home/michael/github/peak-performance/.venv/lib/python3.12/site-packages/numpy/__init__.py", line 400, in __getattr__
raise AttributeError(
AttributeError: `np.obj2sctype` was removed in the NumPy 2.0 release. Use `np.dtype(obj).type` instead.
Installing numpy==1.26.1 mitigates the issue - not sure if you guys can pin the exact version?
The text was updated successfully, but these errors were encountered:
This is a bug I've seen multiple times this week, with different projects. I suspect the NumPy pins by PyTensor are not strict enough for all install methods.
I couldn't reproduce it this time, but will nevertheless pin numpy <2 and remove it once PyTensor becomes compatible.
Steps taken to install
uv venv source .venv/bin/activate uv pip install peak-performance
Example code
Error message
Installing numpy==1.26.1 mitigates the issue - not sure if you guys can pin the exact version?
The text was updated successfully, but these errors were encountered: