Skip to content

Effect handlers Tutorial#2169

Merged
fehiepsi merged 6 commits intopyro-ppl:masterfrom
juanitorduz:effect-handlers-tutorial
May 1, 2026
Merged

Effect handlers Tutorial#2169
fehiepsi merged 6 commits intopyro-ppl:masterfrom
juanitorduz:effect-handlers-tutorial

Conversation

@juanitorduz
Copy link
Copy Markdown
Collaborator

Here is a relatively extensive tutorial on effect handlers. This was hard for me to wrap my head around at the beginning, and I wished something like this existed :)

Open for feedback :)

@review-notebook-app
Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@damonbayer
Copy link
Copy Markdown
Contributor

Really nice tutorial, @juanitorduz! I was wondering if you could explain why you used

    email = numpyro.sample(
        "email", dist.Bernoulli(email_prob).expand([n_obs]).to_event(1), obs=email
    )

instead of a plate? Or instead of expanding without using to_event?. Is it related to the do handler?

@juanitorduz
Copy link
Copy Markdown
Collaborator Author

Really nice tutorial, @juanitorduz! I was wondering if you could explain why you used

    email = numpyro.sample(
        "email", dist.Bernoulli(email_prob).expand([n_obs]).to_event(1), obs=email
    )

instead of a plate? Or instead of expanding without using to_event?. Is it related to the do handler?

hey @damonbayer ! Thanks! There is no particular reason, I could use a plate handler :)

@fehiepsi
Copy link
Copy Markdown
Member

fehiepsi commented May 1, 2026

Beautiful tutorial!!

@fehiepsi fehiepsi merged commit 78c281c into pyro-ppl:master May 1, 2026
9 checks passed
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