Hi all!
First of all, thank you very much for all of your help. It was a pleasure to use PyMC. This is my first post so please excuse me if I might not ask an interesting question.
I am using PyMC version 5.6.1 and I have a project using Ordinary Differential Equations and PyMC.
Essentially, my codes is this model:
mcmc_ode = DifferentialEquation(
func=ode_model,
times=tspan,
n_states=26,
n_theta=37,
t0=t0,
)
I am using
from pymc.ode import DifferentialEquation
and the solver is
from scipy.integrate import odeint
- which was specified inside ode_model
I have successfully run this project for maybe thousands times already (it is fairly complicated) and did not have any problems on my Macbook M1 on PyMC version 5.6.1
Today, I decided that it is time to upgrade to version 5.16.2 but I have this weird error here:
File ~/opt/anaconda3/envs/pymc5_16_env/lib/python3.11/site-packages/pytensor/link/c/cmodule.py:2654 in compile_str
raise CompileError(
CompileError: Compilation failed (return status=1):
/Users/ducquangnguyen/opt/anaconda3/envs/pymc5_16_env/bin/clang++ -dynamiclib -g -O3 -fno-math-errno -Wno-unused-label -Wno-unused-variable -Wno-write-strings -Wno-c++11-narrowing -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -fPIC -undefined dynamic_lookup -I/Users/ducquangnguyen/opt/anaconda3/envs/pymc5_16_env/lib/python3.11/site-packages/numpy/core/include -I/Users/ducquangnguyen/opt/anaconda3/envs/pymc5_16_env/include/python3.11 -I/Users/ducquangnguyen/opt/anaconda3/envs/pymc5_16_env/lib/python3.11/site-packages/pytensor/link/c/c_code -L/Users/ducquangnguyen/opt/anaconda3/envs/pymc5_16_env/lib -fvisibility=hidden -o /Users/ducquangnguyen/.pytensor/compiledir_macOS-14.6.1-arm64-arm-64bit-arm-3.11.8-64/tmp2bepk3qv/m847b81085fa430c45d8c59a1335e47f53e5f3c808c86bb220d8048e364d86d74.so /Users/ducquangnguyen/.pytensor/compiledir_macOS-14.6.1-arm64-arm-64bit-arm-3.11.8-64/tmp2bepk3qv/mod.cpp
/Users/ducquangnguyen/.pytensor/compiledir_macOS-14.6.1-arm64-arm-64bit-arm-3.11.8-64/tmp2bepk3qv/mod.cpp:26069:32: fatal error: bracket nesting level exceeded maximum of 256
26069 | if (!PyErr_Occurred()) {
| ^
/Users/ducquangnguyen/.pytensor/compiledir_macOS-14.6.1-arm64-arm-64bit-arm-3.11.8-64/tmp2bepk3qv/mod.cpp:26069:32: note: use -fbracket-depth=N to increase maximum nesting level
1 error generated.
└─ ···
← add [id BJ] <float64> 'o34'
└─ ···
← add [id BK] <float64> 'o35'
└─ ···
← add [id BL] <float64> 'o36'
└─ ···
← add [id BM] <float64> 'o37'
└─ ···
HINT: Use a linker other than the C linker to print the inputs' shapes and strides.
HINT: Re-running with most PyTensor optimizations disabled could provide a back-trace showing when this node was created. This can be done by setting the PyTensor flag 'optimizer=fast_compile'. If that does not work, PyTensor optimizations can be disabled with 'optimizer=None'.
HINT: Use the PyTensor flag `exception_verbosity=high` for a debug print-out and storage map footprint of this Apply node.
I suppose this might be something related to an upgrade that was done for PyMC - which somehow broke my codes.
I have tried to run ‘exception_verbosity=high’ but to be honest, a lot of those outputs do not make sense to me…
I have never experienced this issue with 5.6.1 so I am not too sure where to start from.
If you could have any ideas, please let me know