You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/mcmc/hmc.jl
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -181,6 +181,11 @@ function DynamicPPL.initialstep(
181
181
if init_attempt_count ==10
182
182
@warn"failed to find valid initial parameters in $(init_attempt_count) tries; consider providing explicit initial parameters using the `initial_params` keyword"
183
183
end
184
+
if init_attempt_count ==1000
185
+
error(
186
+
"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",
187
+
)
188
+
end
184
189
185
190
# NOTE: This will sample in the unconstrained space.
186
191
vi =last(DynamicPPL.evaluate!!(model, rng, vi, SampleFromUniform()))
0 commit comments