Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8478e2f

Browse files
committedApr 7, 2025·
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‎

Lines changed: 1 addition & 0 deletions
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)
Please sign in to comment.