Skip to content

Implement specialized Hurdle distribution #7810

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions pymc/backends/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,9 @@
)

import numpy as np
import pytensor

from pymc.backends.report import SamplerReport
from pymc.model import modelcontext
from pymc.pytensorf import compile
from pymc.util import get_var_name

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -171,10 +169,14 @@ def __init__(

if fn is None:
# borrow=True avoids deepcopy when inputs=output which is the case for untransformed value variables
fn = compile(
inputs=[pytensor.In(v, borrow=True) for v in model.value_vars],
outputs=[pytensor.Out(v, borrow=True) for v in vars],
fn = model.compile_fn(
inputs=model.value_vars,
outputs=vars,
on_unused_input="ignore",
random_seed=False,
borrow_inputs=True,
borrow_outputs=True,
wrap_point_fn=False,
)
fn.trust_input = True

Expand Down
Loading
Loading