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
5 changes: 5 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 0.40.16

Fixed `Base.copy` for `VNTAccumulator` and `TSVNTAccumulator` to also copy the `acc.f` field, not just `acc.values`.
This makes sure that the accumulator is thread-safe if `acc.f` contains some mutable state.

# 0.40.15

DynamicPPL now allows you to set the type that log-probabilities are initialised with, using the `DynamicPPL.set_logprob_type!` function.
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.40.15"
version = "0.40.16"

[deps]
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
Expand Down
2 changes: 1 addition & 1 deletion src/accumulators/vnt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ end
for acc_type in (:VNTAccumulator, :TSVNTAccumulator)
@eval begin
function Base.copy(acc::$acc_type{AccName}) where {AccName}
return $acc_type{AccName}(acc.f, copy(acc.values))
return $acc_type{AccName}(copy(acc.f), copy(acc.values))
end
accumulator_name(::$acc_type{AccName}) where {AccName} = AccName

Expand Down
Loading