Skip to content

check_bounds rewrite should be implemented in the model not in compile #8038

@ricardoV94

Description

@ricardoV94

Description

This is mixing behavior. check_bounds is mostly a rewrite to avoid ParameterCheckBounds in the logp-related functions obtained from the model. Therefore it should be the one handling it.

pymc/pymc/pytensorf.py

Lines 948 to 958 in 056e80c

# If called inside a model context, see if check_bounds flag is set to False
try:
from pymc.model import modelcontext
model = modelcontext(None)
check_bounds = model.check_bounds
except TypeError:
check_bounds = True
check_parameter_opt = (
"local_check_parameter_to_ninf_switch" if check_bounds else "local_remove_check_parameter"
)

We may however decide to remove the functionality altogether. See ...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions