Skip to content

Commit

Permalink
Conditionally disable caching of to_tuple helper due to failure in …
Browse files Browse the repository at this point in the history
…Python 3.10
  • Loading branch information
ricardoV94 committed Dec 3, 2024
1 parent c715295 commit 07bd48d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pytensor/link/numba/dispatch/blockwise.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import sys
from typing import cast

from numba.core.extending import overload
Expand Down Expand Up @@ -60,7 +61,10 @@ def numba_funcify_Blockwise(op: BlockwiseWithCoreShape, node, **kwargs):
src,
"to_tuple",
global_env={"to_fixed_tuple": to_fixed_tuple},
)
),
# cache=True leads to a numba.cloudpickle dump failure in Python 3.10
# May be fine in Python 3.11, but I didn't test. It was fine in 3.12
cache=sys.version_info >= (3, 12),
)

def blockwise_wrapper(*inputs_and_core_shapes):
Expand Down

0 comments on commit 07bd48d

Please sign in to comment.