Skip to content
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

Deprecate initval at the distribution level #7528

Open
ricardoV94 opened this issue Oct 8, 2024 · 0 comments
Open

Deprecate initval at the distribution level #7528

ricardoV94 opened this issue Oct 8, 2024 · 0 comments
Labels
maintenance major Include in major changes release notes section

Comments

@ricardoV94
Copy link
Member

ricardoV94 commented Oct 8, 2024

Description

initvals are not a real property of the model, but an aspect of the sampler. We already have a initvals kwarg in pm.sample that can be used to customize initial values when needed.

We can also allow extra kwargs to be passed from model.initial_point to make_initial_point_fn to allow the equivalent behavior of initval=x used in conjunction with model.initial_point()

Removing them would make our distribution and model objects simpler, and provide one consistent way of defining initvals.

On purpose, I did not make initvals part of the fgraph representation of models, which raises NotImplementedError when custom ones are set. This forces an error in utilities that make use of it: model.copy(), pm.observe, pm.do , etc...

If people really object to not removing them from the model, we have to go and make it part of the fgraph representation.
If we accept it, we should deprecate them for a while since they are an old API and used many times in conjunction with ordered transforms (which are mostly used because we don't have #7297 yet)

@ricardoV94 ricardoV94 added maintenance major Include in major changes release notes section labels Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance major Include in major changes release notes section
Projects
None yet
Development

No branches or pull requests

1 participant