Skip to content

Commit d73bb14

Browse files
committed
Make VarInfo actually mandatory in check_model
1 parent e534434 commit d73bb14

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/debug_utils.jl

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -394,17 +394,15 @@ function check_model_and_trace(
394394
end
395395

396396
"""
397-
check_model([rng, ]model::Model; kwargs...)
397+
check_model(model::Model, varinfo::AbstractVarInfo; error_on_failure=false)
398398
399-
Check that `model` is valid, warning about any potential issues.
400-
401-
See [`check_model_and_trace`](@ref) for more details on supported keyword arguments
402-
and details of which types of checks are performed.
399+
Check that `model` is valid, warning about any potential issues (or erroring if
400+
`error_on_failure` is `true`).
403401
404402
# Returns
405403
- `issuccess::Bool`: Whether the model check succeeded.
406404
"""
407-
check_model(model::Model, varinfo::AbstractVarInfo=VarInfo(model); error_on_failure=false) =
405+
check_model(model::Model, varinfo::AbstractVarInfo; error_on_failure=false) =
408406
first(check_model_and_trace(model, varinfo; error_on_failure=error_on_failure))
409407

410408
# Convenience method used to check if all elements in a list are the same.
@@ -421,7 +419,7 @@ function all_the_same(xs)
421419
end
422420

423421
"""
424-
has_static_constraints([rng, ]model::Model; num_evals=5, kwargs...)
422+
has_static_constraints([rng, ]model::Model; num_evals=5, error_on_failure=false)
425423
426424
Return `true` if the model has static constraints, `false` otherwise.
427425

0 commit comments

Comments
 (0)