Skip to content

Commit 905b874

Browse files
committed
Merge branch 'breaking' into mhauru/custom-accumulators
2 parents 4fef20f + 8135113 commit 905b874

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "DynamicPPL"
22
uuid = "366bfd00-2699-11ea-058f-f148b4cae6d8"
3-
version = "0.36.0"
3+
version = "0.37.0"
44

55
[deps]
66
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"

src/simple_varinfo.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ function SimpleVarInfo{T}(
231231
end
232232

233233
# Constructor from `VarInfo`.
234-
function SimpleVarInfo(vi::VarInfo{<:NamedTuple{names}}, ::Type{D}) where {names,D}
234+
function SimpleVarInfo(vi::NTVarInfo, ::Type{D}) where {names,D}
235235
values = values_as(vi, D)
236236
return SimpleVarInfo(values, vi.accs)
237237
end

test/varinfo.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,18 @@ end
467467

468468
## `untyped_varinfo`
469469
vi = DynamicPPL.untyped_varinfo(model)
470+
471+
## `untyped_varinfo`
472+
vi = DynamicPPL.untyped_varinfo(model)
473+
vi = DynamicPPL.settrans!!(vi, true, vn)
474+
# Sample in unconstrained space.
475+
vi = last(DynamicPPL.evaluate!!(model, vi, SamplingContext()))
476+
f = DynamicPPL.from_linked_internal_transform(vi, vn, dist)
477+
x = f(DynamicPPL.getindex_internal(vi, vn))
478+
@test getlogjoint(vi) Bijectors.logpdf_with_trans(dist, x, true)
479+
480+
## `typed_varinfo`
481+
vi = DynamicPPL.typed_varinfo(model)
470482
vi = DynamicPPL.settrans!!(vi, true, vn)
471483
# Sample in unconstrained space.
472484
vi = last(DynamicPPL.evaluate!!(model, vi, SamplingContext()))

0 commit comments

Comments
 (0)