Skip to content

Commit a8a7026

Browse files
authored
Make LDF <: AbstractModel (#937)
1 parent e350cd3 commit a8a7026

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

HISTORY.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# DynamicPPL Changelog
22

3+
## 0.36.8
4+
5+
Made `LogDensityFunction` a subtype of `AbstractMCMC.AbstractModel`.
6+
37
## 0.36.7
48

59
Added compatibility with MCMCChains 7.0.

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.7"
3+
version = "0.36.8"
44

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

src/logdensityfunction.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using AbstractMCMC: AbstractModel
12
import DifferentiationInterface as DI
23

34
"""
@@ -95,7 +96,7 @@ julia> LogDensityProblems.logdensity_and_gradient(f, [0.0])
9596
"""
9697
struct LogDensityFunction{
9798
M<:Model,V<:AbstractVarInfo,C<:AbstractContext,AD<:Union{Nothing,ADTypes.AbstractADType}
98-
}
99+
} <: AbstractModel
99100
"model used for evaluation"
100101
model::M
101102
"varinfo used for evaluation"

0 commit comments

Comments
 (0)