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

Hmc proposed sample handling refactor #468

Merged
merged 11 commits into from
Feb 17, 2025

Conversation

Micki-D
Copy link
Collaborator

@Micki-D Micki-D commented Feb 12, 2025

This adds a modified version of the function transition() from AdvancedHMC.jl to make the points that are proposed during the HMC algorithm accessible in BAT.

Also refactors StanHMCTuning() to work in the transformation based sampling framework.

Original Function:
https://github.com/TuringLang/AdvancedHMC.jl/blob/878efce497852dfe0b6918e9de4b825706fa848a/src/trajectory.jl#L674

Copy link

codecov bot commented Feb 12, 2025

Codecov Report

Attention: Patch coverage is 95.65217% with 5 lines in your changes missing coverage. Please review.

Project coverage is 50.08%. Comparing base (bf65463) to head (68565f2).
Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
ext/ahmc_impl/ahmc_stan_tuner_impl.jl 95.00% 2 Missing ⚠️
ext/ahmc_impl/ahmc_sampler_impl.jl 97.14% 1 Missing ⚠️
src/samplers/mcmc/mcmc_tuning/mcmc_ram_tuner.jl 90.90% 1 Missing ⚠️
src/variates/shaped_variates.jl 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #468      +/-   ##
==========================================
+ Coverage   49.63%   50.08%   +0.45%     
==========================================
  Files         121      122       +1     
  Lines        5815     5872      +57     
==========================================
+ Hits         2886     2941      +55     
- Misses       2929     2931       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@oschulz
Copy link
Member

oschulz commented Feb 13, 2025

Can you remote the stuff that only changes whitespace from the PR (for the files where only whitespace is affected)?

Actually, let's leave it as it is, so we can keep the history.

@oschulz
Copy link
Member

oschulz commented Feb 14, 2025

Looks good to me, just have to figure out the test failures.

@oschulz oschulz force-pushed the hmc_proposed_sample_handling_refactor branch from 0b5e29f to 68565f2 Compare February 17, 2025 15:20
@oschulz oschulz merged commit d260b69 into main Feb 17, 2025
7 of 8 checks passed
@oschulz oschulz deleted the hmc_proposed_sample_handling_refactor branch February 17, 2025 15:21
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