Skip to content

Commit 6e15762

Browse files
committed
Use model context in ValueGradFunction to respect check_bounds
1 parent e9e850c commit 6e15762

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: pymc/model/core.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,8 @@ def __init__(
253253
)
254254
inputs = grad_vars
255255

256-
self._pytensor_function = compile(inputs, outputs, givens=givens, **kwargs)
256+
with model:
257+
self._pytensor_function = compile(inputs, outputs, givens=givens, **kwargs)
257258
self._raveled_inputs = ravel_inputs
258259

259260
def set_weights(self, values):

0 commit comments

Comments
 (0)