Skip to content

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