blackjax icon indicating copy to clipboard operation
blackjax copied to clipboard

Refactor the potential fun flip in HMC

Open junpenglao opened this issue 1 year ago • 3 comments

We internally flip the sign of log_prob_fn and use potential_fun instead - this start to create more headache in the code base, we should refactor to use log_prob_fn directly.

junpenglao avatar Sep 17 '22 06:09 junpenglao

I'm not sure I'm ready to forego the physical system analogy in the code.

rlouf avatar Sep 17 '22 10:09 rlouf

Think of it this way: you can get rid of 100s lines of codes

junpenglao avatar Sep 17 '22 11:09 junpenglao

100s? I see max 20?

rlouf avatar Sep 17 '22 11:09 rlouf

Even if it doesn't remove many lines of code this is nevertheless a simplifying change. You were right, adding this to the 1.0 milestone as this would be a breaking change for those using the internals.

rlouf avatar Oct 24 '22 06:10 rlouf