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

Implement step-size adaptation #41

Merged
merged 7 commits into from Oct 26, 2021
Merged

Implement step-size adaptation #41

merged 7 commits into from Oct 26, 2021

Conversation

rlouf
Copy link
Member

@rlouf rlouf commented Oct 14, 2021

In this PR we implement the following step-size adaptation algorithms:

  • Use DA optimization that adapts the step_size such to reach a target acceptance rate.
  • A simple heuristic algorithm to find a first reasonable value.

This PR closes #40 as well.

@rlouf rlouf changed the title Implement step-size implementation Implement step-size adaptation Oct 14, 2021
@codecov
Copy link

codecov bot commented Oct 14, 2021

Codecov Report

Merging #41 (acdd2dc) into main (f413056) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main       #41   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           10        12    +2     
  Lines          396       442   +46     
  Branches        19        23    +4     
=========================================
+ Hits           396       442   +46     
Impacted Files Coverage Δ
aehmc/nuts.py 100.00% <ø> (ø)
aehmc/algorithms.py 100.00% <100.00%> (ø)
aehmc/hmc.py 100.00% <100.00%> (ø)
aehmc/step_size.py 100.00% <100.00%> (ø)
aehmc/trajectory.py 100.00% <100.00%> (ø)
aehmc/window_adaptation.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f413056...acdd2dc. Read the comment docs.

@rlouf rlouf force-pushed the hmc-kernel-signature branch 3 times, most recently from 207e7d1 to 8898d54 Compare October 15, 2021 15:27
@brandonwillard brandonwillard added enhancement New feature or request important labels Oct 15, 2021
@rlouf rlouf marked this pull request as ready for review October 19, 2021 13:34
@rlouf rlouf force-pushed the hmc-kernel-signature branch 2 times, most recently from 40d49e9 to 5f4d652 Compare October 20, 2021 08:12
brandonwillard
brandonwillard previously approved these changes Oct 22, 2021
Copy link
Member

@brandonwillard brandonwillard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but we definitely need to fix those Aesara errors that are showing up in the notebook.

aehmc/nuts.py Show resolved Hide resolved
aehmc/nuts.py Show resolved Hide resolved
@rlouf
Copy link
Member Author

rlouf commented Oct 25, 2021

I agree. #42 was supposed to keep track of the error, but I need to fix it so the tests fail.

PS: Nothing changed in the PR, I just rebased the branch on main.

@rlouf rlouf merged commit 29f8789 into main Oct 26, 2021
@rlouf rlouf deleted the hmc-kernel-signature branch October 26, 2021 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request important
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kernels should have kernel(state, *parameters) signature
2 participants