I am having nearly the exact same error. My PyMC is in a virtual environment, installed from the instructions on the website. My PyMC version is 5.0.1, and my error when I run the same code is:
ERROR (pytensor.graph.rewriting.basic): Rewrite failure due to: constant_folding
ERROR (pytensor.graph.rewriting.basic): node: InplaceDimShuffle{}(TensorConstant{(1,) of 102})
ERROR (pytensor.graph.rewriting.basic): TRACEBACK:
ERROR (pytensor.graph.rewriting.basic): Traceback (most recent call last):
File "/Users/joshgen/miniconda3/envs/pymc_env/lib/python3.11/site-packages/pytensor/graph/rewriting/basic.py", line 1933, in process_node
replacements = node_rewriter.transform(fgraph, node)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/joshgen/miniconda3/envs/pymc_env/lib/python3.11/site-packages/pytensor/graph/rewriting/basic.py", line 1092, in transform
return self.fn(fgraph, node)
^^^^^^^^^^^^^^^^^^^^^
File "/Users/joshgen/miniconda3/envs/pymc_env/lib/python3.11/site-packages/pytensor/tensor/rewriting/basic.py", line 1141, in constant_folding
thunk = node.op.make_thunk(node, storage_map, compute_map, no_recycling=[])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/joshgen/miniconda3/envs/pymc_env/lib/python3.11/site-packages/pytensor/link/c/op.py", line 131, in make_thunk
return self.make_c_thunk(node, storage_map, compute_map, no_recycling)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/joshgen/miniconda3/envs/pymc_env/lib/python3.11/site-packages/pytensor/link/c/op.py", line 96, in make_c_thunk
outputs = cl.make_thunk(
^^^^^^^^^^^^^^
File "/Users/joshgen/miniconda3/envs/pymc_env/lib/python3.11/site-packages/pytensor/link/c/basic.py", line 1202, in make_thunk
cthunk, module, in_storage, out_storage, error_storage = self.__compile__(
^^^^^^^^^^^^^^^^^
File "/Users/joshgen/miniconda3/envs/pymc_env/lib/python3.11/site-packages/pytensor/link/c/basic.py", line 1122, in __compile__
thunk, module = self.cthunk_factory(
^^^^^^^^^^^^^^^^^^^^
...
^~~~~~~~~~
1 error generated.
You can find the C code in this temporary file: /var/folders/2k/10t0ng3n1pdd4bxjxwf5z3xw0000gn/T/pytensor_compilation_error_7lyujdty
Output exceeds the size limit. Open the full output data in a text editor
ERROR (pytensor.graph.rewriting.basic): Rewrite failure due to: constant_folding
ERROR (pytensor.graph.rewriting.basic): node: InplaceDimShuffle{}(TensorConstant{(1,) of 102})
ERROR (pytensor.graph.rewriting.basic): TRACEBACK:
ERROR (pytensor.graph.rewriting.basic): Traceback (most recent call last):
File "/Users/joshgen/miniconda3/envs/pymc_env/lib/python3.11/site-packages/pytensor/graph/rewriting/basic.py", line 1933, in process_node
replacements = node_rewriter.transform(fgraph, node)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/joshgen/miniconda3/envs/pymc_env/lib/python3.11/site-packages/pytensor/graph/rewriting/basic.py", line 1092, in transform
return self.fn(fgraph, node)
^^^^^^^^^^^^^^^^^^^^^
File "/Users/joshgen/miniconda3/envs/pymc_env/lib/python3.11/site-packages/pytensor/tensor/rewriting/basic.py", line 1141, in constant_folding
thunk = node.op.make_thunk(node, storage_map, compute_map, no_recycling=[])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/joshgen/miniconda3/envs/pymc_env/lib/python3.11/site-packages/pytensor/link/c/op.py", line 131, in make_thunk
return self.make_c_thunk(node, storage_map, compute_map, no_recycling)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/joshgen/miniconda3/envs/pymc_env/lib/python3.11/site-packages/pytensor/link/c/op.py", line 96, in make_c_thunk
outputs = cl.make_thunk(
^^^^^^^^^^^^^^
File "/Users/joshgen/miniconda3/envs/pymc_env/lib/python3.11/site-packages/pytensor/link/c/basic.py", line 1202, in make_thunk
cthunk, module, in_storage, out_storage, error_storage = self.__compile__(
^^^^^^^^^^^^^^^^^
File "/Users/joshgen/miniconda3/envs/pymc_env/lib/python3.11/site-packages/pytensor/link/c/basic.py", line 1122, in __compile__
thunk, module = self.cthunk_factory(
^^^^^^^^^^^^^^^^^^^^
...
^~~~~~~~~~
1 error generated.
You can find the C code in this temporary file: /var/folders/2k/10t0ng3n1pdd4bxjxwf5z3xw0000gn/T/pytensor_compilation_error_py60q6h0
Output exceeds the size limit. Open the full output data in a text editor
ERROR (pytensor.graph.rewriting.basic): Rewrite failure due to: constant_folding
ERROR (pytensor.graph.rewriting.basic): node: InplaceDimShuffle{}(TensorConstant{(1,) of 102})
ERROR (pytensor.graph.rewriting.basic): TRACEBACK:
ERROR (pytensor.graph.rewriting.basic): Traceback (most recent call last):
File "/Users/joshgen/miniconda3/envs/pymc_env/lib/python3.11/site-packages/pytensor/graph/rewriting/basic.py", line 1933, in process_node
replacements = node_rewriter.transform(fgraph, node)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/joshgen/miniconda3/envs/pymc_env/lib/python3.11/site-packages/pytensor/graph/rewriting/basic.py", line 1092, in transform
return self.fn(fgraph, node)
^^^^^^^^^^^^^^^^^^^^^
File "/Users/joshgen/miniconda3/envs/pymc_env/lib/python3.11/site-packages/pytensor/tensor/rewriting/basic.py", line 1141, in constant_folding
thunk = node.op.make_thunk(node, storage_map, compute_map, no_recycling=[])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/joshgen/miniconda3/envs/pymc_env/lib/python3.11/site-packages/pytensor/link/c/op.py", line 131, in make_thunk
return self.make_c_thunk(node, storage_map, compute_map, no_recycling)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/joshgen/miniconda3/envs/pymc_env/lib/python3.11/site-packages/pytensor/link/c/op.py", line 96, in make_c_thunk
outputs = cl.make_thunk(
^^^^^^^^^^^^^^
File "/Users/joshgen/miniconda3/envs/pymc_env/lib/python3.11/site-packages/pytensor/link/c/basic.py", line 1202, in make_thunk
cthunk, module, in_storage, out_storage, error_storage = self.__compile__(
^^^^^^^^^^^^^^^^^
File "/Users/joshgen/miniconda3/envs/pymc_env/lib/python3.11/site-packages/pytensor/link/c/basic.py", line 1122, in __compile__
thunk, module = self.cthunk_factory(
^^^^^^^^^^^^^^^^^^^^
...
^~~~~~~~~~
1 error generated.
You can find the C code in this temporary file: /var/folders/2k/10t0ng3n1pdd4bxjxwf5z3xw0000gn/T/pytensor_compilation_error_mdh0fve1
I am using VS Code but have tried using Jupyter notebook; I have removed the pymc environment and redownloaded, I have also deleted all pymc, theano, and pytensor from everything except that environment. Any suggestions?