Skip to content
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

Make DynamicHMC and Turing support into extensions #114

Merged
merged 18 commits into from
Feb 1, 2023
Merged

Conversation

sethaxen
Copy link
Member

@sethaxen sethaxen commented Jan 2, 2023

On Julia v1.9 and newer versions, this PR makes the DynamicHMC and Turing support into extensions. This will make it easier to keep compats up-to-date and allows for precompilation of the glue code.

On older Julia versions, Requires is used to conditionally load the extensions.

Until JuliaRegistries/Registrator.jl#397 is merged, this will need to be registered using LocalRegistry#master. Since this usage isn't documented, it's probably best to wait for the above PR to be merged so we can use JuliaRegistrator.

@codecov-commenter
Copy link

codecov-commenter commented Jan 2, 2023

Codecov Report

Base: 92.64% // Head: 92.65% // Increases project coverage by +0.01% 🎉

Coverage data is based on head (71a788c) compared to base (b5d1917).
Patch coverage: 100.00% of modified lines in pull request are covered.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #114      +/-   ##
==========================================
+ Coverage   92.64%   92.65%   +0.01%     
==========================================
  Files          13       13              
  Lines         571      572       +1     
==========================================
+ Hits          529      530       +1     
  Misses         42       42              
Impacted Files Coverage Δ
ext/DynamicHMCExt.jl 100.00% <100.00%> (ø)
ext/TuringExt.jl 96.15% <100.00%> (ø)
src/Pathfinder.jl 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@sethaxen
Copy link
Member Author

sethaxen commented Jan 2, 2023

The following cell in the docs build fails:

samples_transformed = reduce(vcat, fun.transform.(samples)')
varnames = Pathfinder.flattened_varnames_list(model)
chns = MCMCChains.Chains(samples_transformed, varnames)

This happens because flattened_varnames_list is defined in the extension code and is not accessible to the user. We should check if this functionality had made it to Turing or DynamicPPL yet so that we can remove it.

@sethaxen sethaxen merged commit 86b8285 into main Feb 1, 2023
@sethaxen sethaxen deleted the extension branch February 1, 2023 21:13
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