Skip to content

Commit bfa88b2

Browse files
torfjeldemhauru
andauthored
applied suggestions from @mhauru
Co-authored-by: Markus Hauru <[email protected]>
1 parent 17b6ec9 commit bfa88b2

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

ext/DynamicPPLJETExt.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ function DynamicPPL.Experimental._determine_varinfo_jet(
2828
)
2929
# First we try with the typed varinfo.
3030
varinfo = DynamicPPL.typed_varinfo(model, context)
31-
issuccess = true
3231

3332
# Let's make sure that both evaluation and sampling doesn't result in type errors.
3433
issuccess, result = DynamicPPL.Experimental.is_suitable_varinfo(

src/DynamicPPL.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ if !isdefined(Base, :get_extension)
206206
using Requires
207207
end
208208

209-
# Better error message if users forget to load the AD package
209+
# Better error message if users forget to load JET
210210
if isdefined(Base.Experimental, :register_error_hint)
211211
function __init__()
212212
Base.Experimental.register_error_hint(MethodError) do io, exc, argtypes, _

src/experimental.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ module Experimental
22

33
using DynamicPPL: DynamicPPL
44

5+
# This file only defines the names of the functions, and their docstrings. The actual implementations are in `ext/DynamicPPLJETExt.jl`, since we don't want to depend on JET.jl other than as a weak dependency.
56
"""
67
is_suitable_varinfo(model::Model, context::AbstractContext, varinfo::AbstractVarInfo; kwargs...)
78
@@ -11,7 +12,7 @@ Check if the `model` supports evaluation using the provided `context` and `varin
1112
Loading JET.jl is required before calling this function.
1213
1314
# Arguments
14-
- `model`: The model to to verify the support for.
15+
- `model`: The model to verify the support for.
1516
- `context`: The context to use for the model evaluation.
1617
- `varinfo`: The varinfo to verify the support for.
1718
@@ -28,7 +29,7 @@ function is_suitable_varinfo end
2829
function _determine_varinfo_jet end
2930

3031
"""
31-
determine_suitable_varinfo(model[, context]; verbose::Bool=false, only_ddpl::Bool=true)
32+
determine_suitable_varinfo(model[, context]; only_ddpl::Bool=true)
3233
3334
Return a suitable varinfo for the given `model`.
3435

0 commit comments

Comments
 (0)