aesara-devs / aehmc

An HMC/NUTS implementation in Aesara
MIT License
33 stars 6 forks source link

Code cleanup #64

Closed rlouf closed 2 years ago

rlouf commented 2 years ago

In this PR I do some light refactoring:

  1. Updating the docstrings (closes #63)
  2. Return is_divergent boolean from HMC transition (closes #24)
  3. Rename s/kernel/new_kernel (closes #28).
rlouf commented 2 years ago

Tests fail for something completely unrelated, same as #61. I will investigate later this week.

brandonwillard commented 2 years ago

The bug seen here should be fixed by https://github.com/aesara-devs/aesara/pull/1035.

rlouf commented 2 years ago

I ran the tests locally with the branch corresponding to https://github.com/aesara-devs/aesara/pull/1035 and they all pass. We can merge this one if the changes are ok with you.

codecov[bot] commented 2 years ago

Codecov Report

Merging #64 (56466db) into main (ede3f37) will not change coverage. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main       #64   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           13        13           
  Lines          535       531    -4     
  Branches        29        30    +1     
=========================================
- Hits           535       531    -4     
Impacted Files Coverage Δ
aehmc/integrators.py 100.00% <ø> (ø)
aehmc/mass_matrix.py 100.00% <ø> (ø)
aehmc/metrics.py 100.00% <ø> (ø)
aehmc/step_size.py 100.00% <ø> (ø)
aehmc/hmc.py 100.00% <100.00%> (ø)
aehmc/nuts.py 100.00% <100.00%> (ø)
aehmc/termination.py 100.00% <100.00%> (ø)
aehmc/trajectory.py 100.00% <100.00%> (ø)
aehmc/utils.py 100.00% <0.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 ede3f37...56466db. Read the comment docs.