Skip to content

Improve integration with external samplers#2203

Open
juanitorduz wants to merge 13 commits into
pyro-ppl:masterfrom
juanitorduz:external-samplers
Open

Improve integration with external samplers#2203
juanitorduz wants to merge 13 commits into
pyro-ppl:masterfrom
juanitorduz:external-samplers

Conversation

@juanitorduz

@juanitorduz juanitorduz commented May 29, 2026

Copy link
Copy Markdown
Collaborator

Motivated by #2124 and specifically by #2124 (comment), we suggest a cleaner API to integrate with other samplers. This includes MCLMC from Blackjax. This is illustrated in the notebook.

(most from the code changes come from the notebook)

@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

@juanitorduz juanitorduz changed the title iImprove integration with external samplers Improve integration with external samplers May 29, 2026
@juanitorduz juanitorduz marked this pull request as draft May 29, 2026 10:45
Comment thread numpyro/infer/util.py
Comment thread numpyro/infer/util.py Outdated
Comment thread numpyro/infer/external.py Outdated
@juanitorduz juanitorduz marked this pull request as ready for review May 29, 2026 18:20
@juanitorduz juanitorduz requested a review from fehiepsi May 29, 2026 18:22
@juanitorduz

Copy link
Copy Markdown
Collaborator Author

Thank you for the feedback @fehiepsi . Let me know how this iteration looks. I am happy to keep iterating until we get the best level of abstraction :)

@reubenharry

Copy link
Copy Markdown

Would people be happy merging this? Certainly it looks good from my end

@juanitorduz

Copy link
Copy Markdown
Collaborator Author

I would 😄!

@fehiepsi

fehiepsi commented Jun 9, 2026

Copy link
Copy Markdown
Member

Let's wait a bit to rethink whether the design choices are reasonable. Looking like we are changing other internal codes due to the change. It indicates that we will likely break current user code. Let's see if we can come up with simpler solutions.

@juanitorduz

Copy link
Copy Markdown
Collaborator Author

Great! Always open for feedback 🤗

@juanitorduz

juanitorduz commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator Author

@fehiepsi you were right, there was no need to add such a large change to the internal API 🙈 . In a463116, I simplified the approach and minimized the changes. Now this PR is way less invasive 🤗

fyi @reubenharry

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

Labels

enhancement New feature or request Tutorials/Examples

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants