TuringLang / DynamicPPL.jl

Implementation of domain-specific language (DSL) for dynamic probabilistic programming
https://turinglang.org/DynamicPPL.jl/
MIT License
157 stars 26 forks source link

Add `getmodel` and `setmodel` from/to `LogDensityFunction` #626

Closed sunxd3 closed 1 month ago

sunxd3 commented 2 months ago

ref: https://github.com/TuringLang/Turing.jl/pull/2231#issuecomment-2192601314

sunxd3 commented 1 month ago

@yebai @torfjelde I don't think we need this PR now. The motivation of this PR was that we want customized setmodel for different AD backend. We more or less established at https://github.com/TuringLang/Turing.jl/pull/2231#issuecomment-2192601314 that we will postpone this until we need it.

yebai commented 1 month ago

@sunxd3 let's still transfer these methods from Turing into DynamicPPL so we can maintain them from DynamicPPL.

coveralls commented 1 month ago

Pull Request Test Coverage Report for Build 9992511738

Details


Files with Coverage Reduction New Missed Lines %
src/model.jl 1 87.0%
src/simple_varinfo.jl 5 82.18%
src/varinfo.jl 6 84.85%
src/threadsafe.jl 12 46.73%
<!-- Total: 24 -->
Totals Coverage Status
Change from base Build 9945722994: 0.03%
Covered Lines: 2807
Relevant Lines: 3448

💛 - Coveralls
sunxd3 commented 1 month ago

@torfjelde another look? 🙏

torfjelde commented 1 month ago

LGTM:)