Skip to content

Commit

Permalink
Error if HMC really can't find an initial point
Browse files Browse the repository at this point in the history
  • Loading branch information
penelopeysm committed Nov 6, 2024
1 parent 02944a9 commit 38af713
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mcmc/hmc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ function DynamicPPL.initialstep(
@warn "failed to find valid initial parameters in $(init_attempt_count) tries; consider providing explicit initial parameters using the `initial_params` keyword"
end
if init_attempt_count == 1000
error("failed to find valid initial parameters in $(init_attempt_count) tries")
error("failed to find valid initial parameters in $(init_attempt_count) tries. This may indicate an error with the model or AD backend; please open an issue at https://github.com/TuringLang/Turing.jl/issues")
end

# NOTE: This will sample in the unconstrained space.
Expand Down

0 comments on commit 38af713

Please sign in to comment.