Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# DynamicPPL Changelog

## 0.36.1

Fixed a missing method for `tilde_assume`.

## 0.36.0

**Breaking changes**
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "DynamicPPL"
uuid = "366bfd00-2699-11ea-058f-f148b4cae6d8"
version = "0.36.0"
version = "0.36.1"

[deps]
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
Expand Down
7 changes: 7 additions & 0 deletions src/context_implementations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
return tilde_assume(NodeTrait(tilde_assume, context), context, args...)
end
function tilde_assume(::IsLeaf, context::AbstractContext, right, vn, vi)
# no rng nor sampler
return assume(right, vn, vi)
end
function tilde_assume(::IsParent, context::AbstractContext, args...)
Expand All @@ -69,11 +70,17 @@
function tilde_assume(
::IsLeaf, rng::Random.AbstractRNG, context::AbstractContext, sampler, right, vn, vi
)
# rng and sampler
return assume(rng, sampler, right, vn, vi)
end
function tilde_assume(::IsLeaf, context::AbstractContext, sampler, right, vn, vi)

Check warning on line 76 in src/context_implementations.jl

View check run for this annotation

Codecov / codecov/patch

src/context_implementations.jl#L76

Added line #L76 was not covered by tests
# sampler but no rng
return assume(Random.default_rng(), sampler, right, vn, vi)

Check warning on line 78 in src/context_implementations.jl

View check run for this annotation

Codecov / codecov/patch

src/context_implementations.jl#L78

Added line #L78 was not covered by tests
end
function tilde_assume(
::IsParent, rng::Random.AbstractRNG, context::AbstractContext, args...
)
# rng but no sampler
return tilde_assume(rng, childcontext(context), args...)
end

Expand Down
Loading