Aesara stopped working under new version of vscode/xcode

I have been using pymc4 on Jupiter notebook through vscode and I use a mac. Everything has been working fine. I understand any tensor-based software like aesara requires access to C which on mac is taken care of somehow by xcode. Recently, all of sudden I start getting the error
WARNING (aesara.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
when I import

import pymc as pm
import aesara.tensor as at

Then I start getting errors like

ERROR (aesara.graph.opt): Optimization failure due to: constant_folding
ERROR (aesara.graph.opt): node: InplaceDimShuffle{}(TensorConstant{(1,) of 91})

On my pymc code that used to work. From my understanding, this error means aesara can’t access Cython. Weirdly, if I use pymc on mere terminal (that is not vscode jupyter notebook), this error doesn’t come up. It must be either vscode or xcode update that somehow made them incompatible? Has anyone else encountered a similar issue?

Have you made sure you are using the same python/conda/mamba environments in both the terminal and vscode/xcode? That is sometimes a source of these kinds of situations.

Yes. I activate the same anaconda environment before running anything. What’s especially weird is my workflow hasn’t changed at all. This error just pops out out of thin air today, which is really frustrating :frowning: I was running the same script that used to work. I also tried online pyMC examples. I also tried reinstalling pyMC, restarting the computer, reinstalling vscode, and reinstalling xcode.

I don’t know what happened. But when I tried again this morning, it all of sudden worked again… I swear I didn’t do anything. This problem magically appeared and then magically disappeared. Kinda like the black death…

2 Likes