Skip to content

Commit 8478e2f

Browse files
committed
Do not garbage collect logp_dlogp function
1 parent 3182248 commit 8478e2f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pymc/step_methods/hmc/integration.py

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def __init__(self, potential: QuadPotential, logp_dlogp_func):
4242
self._potential = potential
4343
# Sidestep logp_dlogp_function.__call__
4444
pytensor_function = logp_dlogp_func._pytensor_function
45+
pytensor_function.vm.allow_gc = False
4546
# Create some wrappers for backwards compatibility during transition
4647
# When raveled_inputs=False is forbidden, func = pytensor_function
4748
if logp_dlogp_func._raveled_inputs:

0 commit comments

Comments
 (0)