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

BUG: Compiler error when calling pm.sample() #7359

Open
muntazirabidi opened this issue Jun 15, 2024 · 2 comments
Open

BUG: Compiler error when calling pm.sample() #7359

muntazirabidi opened this issue Jun 15, 2024 · 2 comments
Labels
bug needs info Additional information required

Comments

@muntazirabidi
Copy link

Describe the issue:

ERROR (pytensor.graph.rewriting.basic): Rewrite failure due to: constant_folding
ERROR (pytensor.graph.rewriting.basic): node: Cast{float64}(0)
ERROR (pytensor.graph.rewriting.basic): TRACEBACK:
ERROR (pytensor.graph.rewriting.basic): Traceback (most recent call last):
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/graph/rewriting/basic.py", line 1919, in process_node
    replacements = node_rewriter.transform(fgraph, node)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/graph/rewriting/basic.py", line 1081, in transform
    return self.fn(fgraph, node)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/tensor/rewriting/basic.py", line 1120, in constant_folding
    thunk = node.op.make_thunk(node, storage_map, compute_map, no_recycling=[])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/op.py", line 119, in make_thunk
    return self.make_c_thunk(node, storage_map, compute_map, no_recycling)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/op.py", line 84, in make_c_thunk
    outputs = cl.make_thunk(
              ^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/basic.py", line 1190, in make_thunk
    cthunk, module, in_storage, out_storage, error_storage = self.__compile__(
                                                             ^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/basic.py", line 1110, in __compile__
    thunk, module = self.cthunk_factory(
                    ^^^^^^^^^^^^^^^^^^^^
...
           ^~~~~~~~~~
7 errors generated.


Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?85d2c47e-6f93-45c4-9cd4-51f3559d78d2) or open in a [text editor](command:workbench.action.openLargeOutput?85d2c47e-6f93-45c4-9cd4-51f3559d78d2). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)...

You can find the C code in this temporary file: [/var/folders/fc/xqlqp1_91msbj5k907rjvrm80000gn/T/pytensor_compilation_error_m54fx0m6](https://file+.vscode-resource.vscode-cdn.net/var/folders/fc/xqlqp1_91msbj5k907rjvrm80000gn/T/pytensor_compilation_error_m54fx0m6)
ERROR (pytensor.graph.rewriting.basic): Rewrite failure due to: constant_folding
ERROR (pytensor.graph.rewriting.basic): node: DropDims{axis=0}([2])
ERROR (pytensor.graph.rewriting.basic): TRACEBACK:
ERROR (pytensor.graph.rewriting.basic): Traceback (most recent call last):
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/graph/rewriting/basic.py", line 1919, in process_node
    replacements = node_rewriter.transform(fgraph, node)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/graph/rewriting/basic.py", line 1081, in transform
    return self.fn(fgraph, node)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/tensor/rewriting/basic.py", line 1120, in constant_folding
    thunk = node.op.make_thunk(node, storage_map, compute_map, no_recycling=[])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/op.py", line 119, in make_thunk
    return self.make_c_thunk(node, storage_map, compute_map, no_recycling)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/op.py", line 84, in make_c_thunk
    outputs = cl.make_thunk(
              ^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/basic.py", line 1190, in make_thunk
    cthunk, module, in_storage, out_storage, error_storage = self.__compile__(
                                                             ^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/basic.py", line 1110, in __compile__
    thunk, module = self.cthunk_factory(
                    ^^^^^^^^^^^^^^^^^^^^
...
           ^~~~~~~~~~
7 errors generated.


Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?a9c4bc36-001c-4233-b3c0-ec8a40f583fe) or open in a [text editor](command:workbench.action.openLargeOutput?a9c4bc36-001c-4233-b3c0-ec8a40f583fe). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)...

You can find the C code in this temporary file: [/var/folders/fc/xqlqp1_91msbj5k907rjvrm80000gn/T/pytensor_compilation_error_9_cnifx5](https://file+.vscode-resource.vscode-cdn.net/var/folders/fc/xqlqp1_91msbj5k907rjvrm80000gn/T/pytensor_compilation_error_9_cnifx5)
ERROR (pytensor.graph.rewriting.basic): Rewrite failure due to: constant_folding
ERROR (pytensor.graph.rewriting.basic): node: Cast{float32}(1)
ERROR (pytensor.graph.rewriting.basic): TRACEBACK:
ERROR (pytensor.graph.rewriting.basic): Traceback (most recent call last):
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/graph/rewriting/basic.py", line 1919, in process_node
    replacements = node_rewriter.transform(fgraph, node)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/graph/rewriting/basic.py", line 1081, in transform
    return self.fn(fgraph, node)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/tensor/rewriting/basic.py", line 1120, in constant_folding
    thunk = node.op.make_thunk(node, storage_map, compute_map, no_recycling=[])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/op.py", line 119, in make_thunk
    return self.make_c_thunk(node, storage_map, compute_map, no_recycling)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/op.py", line 84, in make_c_thunk
    outputs = cl.make_thunk(
              ^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/basic.py", line 1190, in make_thunk
    cthunk, module, in_storage, out_storage, error_storage = self.__compile__(
                                                             ^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/basic.py", line 1110, in __compile__
    thunk, module = self.cthunk_factory(
                    ^^^^^^^^^^^^^^^^^^^^
...
           ^~~~~~~~~~
7 errors generated.


Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?bda15d87-5c57-40ae-abfb-3c68accfbb80) or open in a [text editor](command:workbench.action.openLargeOutput?bda15d87-5c57-40ae-abfb-3c68accfbb80). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)...

You can find the C code in this temporary file: [/var/folders/fc/xqlqp1_91msbj5k907rjvrm80000gn/T/pytensor_compilation_error_hq9mi7__](https://file+.vscode-resource.vscode-cdn.net/var/folders/fc/xqlqp1_91msbj5k907rjvrm80000gn/T/pytensor_compilation_error_hq9mi7__)
ERROR (pytensor.graph.rewriting.basic): Rewrite failure due to: constant_folding
ERROR (pytensor.graph.rewriting.basic): node: Cast{float64}(0)
ERROR (pytensor.graph.rewriting.basic): TRACEBACK:
ERROR (pytensor.graph.rewriting.basic): Traceback (most recent call last):
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/graph/rewriting/basic.py", line 1919, in process_node
    replacements = node_rewriter.transform(fgraph, node)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/graph/rewriting/basic.py", line 1081, in transform
    return self.fn(fgraph, node)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/tensor/rewriting/basic.py", line 1120, in constant_folding
    thunk = node.op.make_thunk(node, storage_map, compute_map, no_recycling=[])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/op.py", line 119, in make_thunk
    return self.make_c_thunk(node, storage_map, compute_map, no_recycling)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/op.py", line 84, in make_c_thunk
    outputs = cl.make_thunk(
              ^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/basic.py", line 1190, in make_thunk
    cthunk, module, in_storage, out_storage, error_storage = self.__compile__(
                                                             ^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/basic.py", line 1110, in __compile__
    thunk, module = self.cthunk_factory(
                    ^^^^^^^^^^^^^^^^^^^^
...
           ^~~~~~~~~~
7 errors generated.


Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?fc256f94-8376-4e96-8523-c15e500f10c1) or open in a [text editor](command:workbench.action.openLargeOutput?fc256f94-8376-4e96-8523-c15e500f10c1). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)...

You can find the C code in this temporary file: [/var/folders/fc/xqlqp1_91msbj5k907rjvrm80000gn/T/pytensor_compilation_error_jy0cd6x7](https://file+.vscode-resource.vscode-cdn.net/var/folders/fc/xqlqp1_91msbj5k907rjvrm80000gn/T/pytensor_compilation_error_jy0cd6x7)
ERROR (pytensor.graph.rewriting.basic): Rewrite failure due to: constant_folding
ERROR (pytensor.graph.rewriting.basic): node: DropDims{axis=0}([2])
ERROR (pytensor.graph.rewriting.basic): TRACEBACK:
ERROR (pytensor.graph.rewriting.basic): Traceback (most recent call last):
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/graph/rewriting/basic.py", line 1919, in process_node
    replacements = node_rewriter.transform(fgraph, node)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/graph/rewriting/basic.py", line 1081, in transform
    return self.fn(fgraph, node)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/tensor/rewriting/basic.py", line 1120, in constant_folding
    thunk = node.op.make_thunk(node, storage_map, compute_map, no_recycling=[])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/op.py", line 119, in make_thunk
    return self.make_c_thunk(node, storage_map, compute_map, no_recycling)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/op.py", line 84, in make_c_thunk
    outputs = cl.make_thunk(
              ^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/basic.py", line 1190, in make_thunk
    cthunk, module, in_storage, out_storage, error_storage = self.__compile__(
                                                             ^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/basic.py", line 1110, in __compile__
    thunk, module = self.cthunk_factory(
                    ^^^^^^^^^^^^^^^^^^^^
...
           ^~~~~~~~~~
7 errors generated.


Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?18155b83-1180-48f3-b549-4782f452a695) or open in a [text editor](command:workbench.action.openLargeOutput?18155b83-1180-48f3-b549-4782f452a695). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)...

You can find the C code in this temporary file: [/var/folders/fc/xqlqp1_91msbj5k907rjvrm80000gn/T/pytensor_compilation_error_pmkk0bbv](https://file+.vscode-resource.vscode-cdn.net/var/folders/fc/xqlqp1_91msbj5k907rjvrm80000gn/T/pytensor_compilation_error_pmkk0bbv)
ERROR (pytensor.graph.rewriting.basic): Rewrite failure due to: constant_folding
ERROR (pytensor.graph.rewriting.basic): node: Cast{float64}(1)
ERROR (pytensor.graph.rewriting.basic): TRACEBACK:
ERROR (pytensor.graph.rewriting.basic): Traceback (most recent call last):
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/graph/rewriting/basic.py", line 1919, in process_node
    replacements = node_rewriter.transform(fgraph, node)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/graph/rewriting/basic.py", line 1081, in transform
    return self.fn(fgraph, node)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/tensor/rewriting/basic.py", line 1120, in constant_folding
    thunk = node.op.make_thunk(node, storage_map, compute_map, no_recycling=[])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/op.py", line 119, in make_thunk
    return self.make_c_thunk(node, storage_map, compute_map, no_recycling)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/op.py", line 84, in make_c_thunk
    outputs = cl.make_thunk(
              ^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/basic.py", line 1190, in make_thunk
    cthunk, module, in_storage, out_storage, error_storage = self.__compile__(
                                                             ^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/basic.py", line 1110, in __compile__
    thunk, module = self.cthunk_factory(
                    ^^^^^^^^^^^^^^^^^^^^
...
           ^~~~~~~~~~
7 errors generated.


Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?dbb04a6e-9d4f-421b-9a94-f07200c0489d) or open in a [text editor](command:workbench.action.openLargeOutput?dbb04a6e-9d4f-421b-9a94-f07200c0489d). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)...

You can find the C code in this temporary file: [/var/folders/fc/xqlqp1_91msbj5k907rjvrm80000gn/T/pytensor_compilation_error_w5w60_ob](https://file+.vscode-resource.vscode-cdn.net/var/folders/fc/xqlqp1_91msbj5k907rjvrm80000gn/T/pytensor_compilation_error_w5w60_ob)
ERROR (pytensor.graph.rewriting.basic): Rewrite failure due to: constant_folding
ERROR (pytensor.graph.rewriting.basic): node: Cast{float64}(0)
ERROR (pytensor.graph.rewriting.basic): TRACEBACK:
ERROR (pytensor.graph.rewriting.basic): Traceback (most recent call last):
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/graph/rewriting/basic.py", line 1919, in process_node
    replacements = node_rewriter.transform(fgraph, node)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/graph/rewriting/basic.py", line 1081, in transform
    return self.fn(fgraph, node)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/tensor/rewriting/basic.py", line 1120, in constant_folding
    thunk = node.op.make_thunk(node, storage_map, compute_map, no_recycling=[])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/op.py", line 119, in make_thunk
    return self.make_c_thunk(node, storage_map, compute_map, no_recycling)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/op.py", line 84, in make_c_thunk
    outputs = cl.make_thunk(
              ^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/basic.py", line 1190, in make_thunk
    cthunk, module, in_storage, out_storage, error_storage = self.__compile__(
                                                             ^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/basic.py", line 1110, in __compile__
    thunk, module = self.cthunk_factory(
                    ^^^^^^^^^^^^^^^^^^^^
...
           ^~~~~~~~~~
7 errors generated.


Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?80daa58b-8668-4001-a220-d5c7b17d4915) or open in a [text editor](command:workbench.action.openLargeOutput?80daa58b-8668-4001-a220-d5c7b17d4915). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)...

You can find the C code in this temporary file: [/var/folders/fc/xqlqp1_91msbj5k907rjvrm80000gn/T/pytensor_compilation_error_v51bqnq5](https://file+.vscode-resource.vscode-cdn.net/var/folders/fc/xqlqp1_91msbj5k907rjvrm80000gn/T/pytensor_compilation_error_v51bqnq5)
ERROR (pytensor.graph.rewriting.basic): Rewrite failure due to: constant_folding
ERROR (pytensor.graph.rewriting.basic): node: DropDims{axis=0}([2])
ERROR (pytensor.graph.rewriting.basic): TRACEBACK:
ERROR (pytensor.graph.rewriting.basic): Traceback (most recent call last):
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/graph/rewriting/basic.py", line 1919, in process_node
    replacements = node_rewriter.transform(fgraph, node)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/graph/rewriting/basic.py", line 1081, in transform
    return self.fn(fgraph, node)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/tensor/rewriting/basic.py", line 1120, in constant_folding
    thunk = node.op.make_thunk(node, storage_map, compute_map, no_recycling=[])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/op.py", line 119, in make_thunk
    return self.make_c_thunk(node, storage_map, compute_map, no_recycling)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/op.py", line 84, in make_c_thunk
    outputs = cl.make_thunk(
              ^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/basic.py", line 1190, in make_thunk
    cthunk, module, in_storage, out_storage, error_storage = self.__compile__(
                                                             ^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/basic.py", line 1110, in __compile__
    thunk, module = self.cthunk_factory(
                    ^^^^^^^^^^^^^^^^^^^^
...
           ^~~~~~~~~~
7 errors generated.


Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?ad644fe2-f670-4391-8cb0-7def9e4d57be) or open in a [text editor](command:workbench.action.openLargeOutput?ad644fe2-f670-4391-8cb0-7def9e4d57be). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)...

You can find the C code in this temporary file: [/var/folders/fc/xqlqp1_91msbj5k907rjvrm80000gn/T/pytensor_compilation_error_g9xiogsb](https://file+.vscode-resource.vscode-cdn.net/var/folders/fc/xqlqp1_91msbj5k907rjvrm80000gn/T/pytensor_compilation_error_g9xiogsb)
ERROR (pytensor.graph.rewriting.basic): Rewrite failure due to: constant_folding
ERROR (pytensor.graph.rewriting.basic): node: Cast{float64}(1)
ERROR (pytensor.graph.rewriting.basic): TRACEBACK:
ERROR (pytensor.graph.rewriting.basic): Traceback (most recent call last):
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/graph/rewriting/basic.py", line 1919, in process_node
    replacements = node_rewriter.transform(fgraph, node)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/graph/rewriting/basic.py", line 1081, in transform
    return self.fn(fgraph, node)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/tensor/rewriting/basic.py", line 1120, in constant_folding
    thunk = node.op.make_thunk(node, storage_map, compute_map, no_recycling=[])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/op.py", line 119, in make_thunk
    return self.make_c_thunk(node, storage_map, compute_map, no_recycling)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/op.py", line 84, in make_c_thunk
    outputs = cl.make_thunk(
              ^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/basic.py", line 1190, in make_thunk
    cthunk, module, in_storage, out_storage, error_storage = self.__compile__(
                                                             ^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/basic.py", line 1110, in __compile__
    thunk, module = self.cthunk_factory(
                    ^^^^^^^^^^^^^^^^^^^^
...
           ^~~~~~~~~~
7 errors generated.


Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?0af331cf-c5a3-4a57-926a-bbb617d9e0eb) or open in a [text editor](command:workbench.action.openLargeOutput?0af331cf-c5a3-4a57-926a-bbb617d9e0eb). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)...

You can find the C code in this temporary file: [/var/folders/fc/xqlqp1_91msbj5k907rjvrm80000gn/T/pytensor_compilation_error_8e_z6g4h](https://file+.vscode-resource.vscode-cdn.net/var/folders/fc/xqlqp1_91msbj5k907rjvrm80000gn/T/pytensor_compilation_error_8e_z6g4h)
ERROR (pytensor.graph.rewriting.basic): Rewrite failure due to: constant_folding
ERROR (pytensor.graph.rewriting.basic): node: Cast{float64}(0)
ERROR (pytensor.graph.rewriting.basic): TRACEBACK:
ERROR (pytensor.graph.rewriting.basic): Traceback (most recent call last):
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/graph/rewriting/basic.py", line 1919, in process_node
    replacements = node_rewriter.transform(fgraph, node)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/graph/rewriting/basic.py", line 1081, in transform
    return self.fn(fgraph, node)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/tensor/rewriting/basic.py", line 1120, in constant_folding
    thunk = node.op.make_thunk(node, storage_map, compute_map, no_recycling=[])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/op.py", line 119, in make_thunk
    return self.make_c_thunk(node, storage_map, compute_map, no_recycling)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/op.py", line 84, in make_c_thunk
    outputs = cl.make_thunk(
              ^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/basic.py", line 1190, in make_thunk
    cthunk, module, in_storage, out_storage, error_storage = self.__compile__(
                                                             ^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/basic.py", line 1110, in __compile__
    thunk, module = self.cthunk_factory(
                    ^^^^^^^^^^^^^^^^^^^^
...
           ^~~~~~~~~~
7 errors generated.


Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?01f67d7c-6aa5-4339-8c9f-c641080947a2) or open in a [text editor](command:workbench.action.openLargeOutput?01f67d7c-6aa5-4339-8c9f-c641080947a2). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)...

You can find the C code in this temporary file: [/var/folders/fc/xqlqp1_91msbj5k907rjvrm80000gn/T/pytensor_compilation_error_t3471my9](https://file+.vscode-resource.vscode-cdn.net/var/folders/fc/xqlqp1_91msbj5k907rjvrm80000gn/T/pytensor_compilation_error_t3471my9)
ERROR (pytensor.graph.rewriting.basic): Rewrite failure due to: constant_folding
ERROR (pytensor.graph.rewriting.basic): node: DropDims{axis=0}([2])
ERROR (pytensor.graph.rewriting.basic): TRACEBACK:
ERROR (pytensor.graph.rewriting.basic): Traceback (most recent call last):
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/graph/rewriting/basic.py", line 1919, in process_node
    replacements = node_rewriter.transform(fgraph, node)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/graph/rewriting/basic.py", line 1081, in transform
    return self.fn(fgraph, node)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/tensor/rewriting/basic.py", line 1120, in constant_folding
    thunk = node.op.make_thunk(node, storage_map, compute_map, no_recycling=[])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/op.py", line 119, in make_thunk
    return self.make_c_thunk(node, storage_map, compute_map, no_recycling)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/op.py", line 84, in make_c_thunk
    outputs = cl.make_thunk(
              ^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/basic.py", line 1190, in make_thunk
    cthunk, module, in_storage, out_storage, error_storage = self.__compile__(
                                                             ^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/basic.py", line 1110, in __compile__
    thunk, module = self.cthunk_factory(
                    ^^^^^^^^^^^^^^^^^^^^
...
           ^~~~~~~~~~
7 errors generated.


Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?ff9dfcd3-96b3-4456-9447-18ce634cffba) or open in a [text editor](command:workbench.action.openLargeOutput?ff9dfcd3-96b3-4456-9447-18ce634cffba). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)...

You can find the C code in this temporary file: [/var/folders/fc/xqlqp1_91msbj5k907rjvrm80000gn/T/pytensor_compilation_error_cyj_s6gg](https://file+.vscode-resource.vscode-cdn.net/var/folders/fc/xqlqp1_91msbj5k907rjvrm80000gn/T/pytensor_compilation_error_cyj_s6gg)
ERROR (pytensor.graph.rewriting.basic): Rewrite failure due to: constant_folding
ERROR (pytensor.graph.rewriting.basic): node: Cast{float64}(1)
ERROR (pytensor.graph.rewriting.basic): TRACEBACK:
ERROR (pytensor.graph.rewriting.basic): Traceback (most recent call last):
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/graph/rewriting/basic.py", line 1919, in process_node
    replacements = node_rewriter.transform(fgraph, node)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/graph/rewriting/basic.py", line 1081, in transform
    return self.fn(fgraph, node)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/tensor/rewriting/basic.py", line 1120, in constant_folding
    thunk = node.op.make_thunk(node, storage_map, compute_map, no_recycling=[])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/op.py", line 119, in make_thunk
    return self.make_c_thunk(node, storage_map, compute_map, no_recycling)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/op.py", line 84, in make_c_thunk
    outputs = cl.make_thunk(
              ^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/basic.py", line 1190, in make_thunk
    cthunk, module, in_storage, out_storage, error_storage = self.__compile__(
                                                             ^^^^^^^^^^^^^^^^^
  File "/Users/muntazirabidi/miniforge3/envs/pymc/lib/python3.12/site-packages/pytensor/link/c/basic.py", line 1110, in __compile__
    thunk, module = self.cthunk_factory(
                    ^^^^^^^^^^^^^^^^^^^^
...
           ^~~~~~~~~~
7 errors generated.


Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?dad86ac2-950b-4067-b089-33d5f1edc59e) or open in a [text editor](command:workbench.action.openLargeOutput?dad86ac2-950b-4067-b089-33d5f1edc59e). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)...

You can find the C code in this temporary file: [/var/folders/fc/xqlqp1_91msbj5k907rjvrm80000gn/T/pytensor_compilation_error__sb_w708](https://file+.vscode-resource.vscode-cdn.net/var/folders/fc/xqlqp1_91msbj5k907rjvrm80000gn/T/pytensor_compilation_error__sb_w708)

You can find the C code in this temporary file: [/var/folders/fc/xqlqp1_91msbj5k907rjvrm80000gn/T/pytensor_compilation_error_2ntheoqf](https://file+.vscode-resource.vscode-cdn.net/var/folders/fc/xqlqp1_91msbj5k907rjvrm80000gn/T/pytensor_compilation_error_2ntheoqf)

Reproduceable code example:

just calling pymc.sample() on a simple model

Error message:

No response

PyMC version information:

pymc 5.12.1

Context for the issue:

No response

Copy link

welcome bot commented Jun 15, 2024

Welcome Banner]
🎉 Welcome to PyMC! 🎉 We're really excited to have your input into the project! 💖

If you haven't done so already, please make sure you check out our Contributing Guidelines and Code of Conduct.

@ricardoV94
Copy link
Member

We'll need more info, how did you install PyMC and can you provide a minimal reproducible example?

@ricardoV94 ricardoV94 added the needs info Additional information required label Jun 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs info Additional information required
Projects
None yet
Development

No branches or pull requests

2 participants