Skip to content

Pass kwargs on to Libtask #118

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Pass kwargs on to Libtask #118

wants to merge 1 commit into from

Conversation

penelopeysm
Copy link
Member

@penelopeysm penelopeysm commented Aug 18, 2025

This PR modifies LibtaskExt to allow sampling from Turing models with keyword arguments with SMC or PG. See TuringLang/Turing.jl#2660 for usage.

It's hacky: it assumes that AbstractGenericModel has fields called fargs and kwargs. (Or at least, it assumes that any AbstractGenericModel that you might ever want to pass to LibtaskModel has those fields.) This is certainly wrong. If the plan is to eventually move all of LibtaskExt to Turing.jl itself, then this can be fixed nicely by dispatching on a type that Turing owns. For this reason, I don't consider this ready for merging; but I wanted to put the code up so that it can be discussed if needed.

@yebai
Copy link
Member

yebai commented Aug 19, 2025

Yes, we'd like to merge the AdvancedPS code to Turing.jl. Libtask was holding us back; now, it is ready.

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

Successfully merging this pull request may close these issues.

2 participants