-
Notifications
You must be signed in to change notification settings - Fork 17
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
[WIP] MCMC updates (gradient-based variants and ESJD) #339
Open
odunbar
wants to merge
20
commits into
main
Choose a base branch
from
orad/autodiff-mcmc
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+883
−56
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
odunbar
changed the title
MCMC updates (gradient-based variants and ESJD)
[WIP] MCMC updates (gradient-based variants and ESJD calculation with the chain)
Jan 16, 2025
odunbar
changed the title
[WIP] MCMC updates (gradient-based variants and ESJD calculation with the chain)
[WIP] MCMC updates (gradient-based variants and ESJD)
Jan 16, 2025
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #339 +/- ##
==========================================
- Coverage 88.82% 81.58% -7.25%
==========================================
Files 7 7
Lines 1271 1455 +184
==========================================
+ Hits 1129 1187 +58
- Misses 142 268 +126 ☔ View full report in Codecov by Sentry. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
Closes #341
Closes #342
Closes #343
Closes #344
Closes #345
To-do
ln(pi)
andf
in the following:pi = exp (-f)
and therefore\nabla ln(pi) = - \nabla f
. (Replacing autodiff with - autodiff dramatically improves the MALA and infMALA performance. though did not improve HMC performance)Content
From a private repos of @KotaOK-00 - with some small changes
AutodiffProtocol
containing derived typesGradFreeProtocol
ForwardDiffProtocol
(and in future others such asBackwardDiffProtocol
etc.)When constructing an MCMCProtocol, default (and choosable) autodiff options are created, e.g.,
within the MCMC
propose
method direct calls toAre replaced with
autodiff_gradient
andautodiff_hessian
that dispatch off the pre-specified autodiff protocol in the
sampler
. This will make adding new autodiff options easierAGPJL
for AbstractGPs. When building an emulator with AGPJL, As there is no optimizer of such kernels, we allow users to train e.g. with GPJL, then do the following:If the user does not provide kernel_params, a useful error message appears to direct them what to do.
GaussianProcesses/runtests.jl
for AGP interface as above, and that GPJL vs AGP gives very similar emulator predicitionsMarkovChainMonteCarlo/runtests.jl
for AGP on RWM and pCN sampling - give similar posterior means to GPJL (NB it is much slower, 5-10x)MarkovChainMonteCarlo/runtests.jl
for all other algorithms. Except for Barker: many tests fail due to non-convergent step-size calculation, or incorrect final posterior mean.