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

Don't get stuck in an infinite loop if HMC can't find an initial point #2392

Merged
merged 4 commits into from
Nov 7, 2024

Conversation

penelopeysm
Copy link
Member

@penelopeysm penelopeysm commented Nov 6, 2024

Quick fix for #2389.

See also TuringLang/AdvancedHMC.jl#381 for added context.

Closes #2389

Copy link

codecov bot commented Nov 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.93%. Comparing base (397d1a7) to head (6fd59ac).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2392      +/-   ##
==========================================
+ Coverage   76.81%   83.93%   +7.12%     
==========================================
  Files          22       22              
  Lines        1570     1575       +5     
==========================================
+ Hits         1206     1322     +116     
+ Misses        364      253     -111     

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

@coveralls
Copy link

coveralls commented Nov 6, 2024

Pull Request Test Coverage Report for Build 11724704847

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 2 (0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.1%) to 78.585%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/mcmc/hmc.jl 0 2 0.0%
Totals Coverage Status
Change from base Build 11594848843: -0.1%
Covered Lines: 1233
Relevant Lines: 1569

💛 - Coveralls

Copy link
Member

@yebai yebai left a comment

Choose a reason for hiding this comment

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

Thanks, @penelopeysm -- it looks good to me.

@yebai yebai requested a review from willtebbutt November 7, 2024 11:38
@willtebbutt
Copy link
Member

Also LGTM -- definitely a drastic improvement over hanging.

@penelopeysm penelopeysm merged commit 5b24ceb into master Nov 7, 2024
8 of 9 checks passed
@penelopeysm penelopeysm deleted the py/no-infinite-loop branch November 7, 2024 14:52
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.

Sampling with HMC can hang if AD is bugged
4 participants