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

Allow returning deterministic sites from guide in Predictive #3361

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

OlaRonning
Copy link
Member

Related to #3358.

@OlaRonning OlaRonning added the WIP label Apr 22, 2024
@@ -284,7 +290,7 @@ def check_model_guide_match(model_trace, guide_trace, max_plate_nesting=math.inf
warnings.warn(
"Found auxiliary vars in the model: {}".format(aux_vars & model_vars)
)
if not (guide_vars <= model_vars | aux_vars):
if not (guide_vars <= model_vars | aux_vars | det_vars):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fritzo, it looks like deterministic sites are currently treated as (auxiliary) sample sites in the guide when comparing the model to the guide. Do you know if this is the intended behavior? I assumed it wasn't and sketched the following solution.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @OlaRonning, I'm unsure as I seldom use predictive, preferring custom predictive utilities.

@fehiepsi do you have an opinion? It would be nice to keep similar behavior in pyro and numpyro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants