Releases: TuringLang/AbstractPPL.jl
v0.13.0
AbstractPPL v0.13.0
There are no breaking changes; however, we opted to make a minor release given the substantial amount of new code.
Minimum compatibility has been bumped to Julia 1.10.
Added the new functions hasvalue(container::T, ::VarName[, ::Distribution])
and getvalue(container::T, ::VarName[, ::Distribution])
, where T
is either NamedTuple
or AbstractDict{<:VarName}
.
These functions check whether a given VarName
has a value in the given NamedTuple
or AbstractDict
, and return the value if it exists.
The optional Distribution
argument allows one to reconstruct a full value from its component indices.
For example, if container
has x[1]
and x[2]
, then hasvalue(container, @varname(x), dist)
will return true if size(dist) == (2,)
(for example, MvNormal(zeros(2), I)
).
In this case plain hasvalue(container, @varname(x))
would return false
, since we can not know whether the vector-valued variable x
has all of its elements specified in container
(there might be an x[3]
missing).
These functions (without the Distribution
argument) were previously in DynamicPPL.jl (albeit unexported).
Merged pull requests:
- Move
hasvalue
andgetvalue
from DynamicPPL; implement extra Distributions-based methods (#125) (@penelopeysm)
Closed issues:
- hasvalue and getvalue (#124)
v0.12.0
AbstractPPL v0.12.0
Breaking changes
VarName constructors
Removed the constructors VarName(vn, optic)
(this wasn't deprecated, but was dangerous as it would silently discard the existing optic in vn
), and VarName(vn, ::Tuple)
(which was deprecated).
Usage of VarName(vn, optic)
can be directly replaced with VarName{getsym(vn)}(optic)
.
Other changes
Optic normalisation
In the inner constructor of a VarName, its optic is now normalised to ensure that the associativity of ComposedFunction is always the same, and that compositions with identity are removed.
This helps to prevent subtle bugs where VarNames with semantically equal optics are not considered equal.
Merged pull requests:
- Normalise optics when constructing VarName; remove extra constructors (#123) (@penelopeysm)
Closed issues:
v0.11.0
AbstractPPL v0.11.0
Breaking changes
- Added
prefix
andunprefix
functions forVarName
s, please see documentation for details.
Merged pull requests:
- Documentation and Turing Navigation CI improvement (#115) (@shravanngoswamii)
- Implement varname prefix / unprefix (#119) (@penelopeysm)
Closed issues:
v0.10.1
AbstractPPL v0.10.1
StatsBase.predict
in v0.10.0 calls a four argument implementation of predict
, which is a mistake. This release resolves this by removing the unintended NamedTuple
argument. Now it called the intended three-argument StatsBase.predict(Random.default_rng(), model, params)
.
Merged pull requests:
v0.10.0
AbstractPPL v0.10.0
Breaking changes
- In this release, we add an interface function
StatsBase.predict
, which draws posterior predictive samples
Merged pull requests:
- Add StatsBase.predict to the interface (#81) (@sethaxen)
- Update CompatHelper.yml (#105) (@penelopeysm)
- CompatHelper: bump compat for Documenter to 1 for package test, (keep existing compat) (#106) (@github-actions[bot])
- CompatHelper: add new compat entry for Accessors at version 0.1 for package test, (keep existing compat) (#107) (@github-actions[bot])
- Add
fix
andunfix
functions for parameter fixing and unfixing (#109) (@sunxd3) - Use new GitHub actions (#110) (@penelopeysm)
- Add varname tests from DPPL + format repo (#111) (@penelopeysm)
v0.9.0
AbstractPPL v0.9.0
Merged pull requests:
- Conversion of VarName to/from string (#100) (@penelopeysm)
- Build and publish API docs (#101) (@penelopeysm)
- Add compat bounds for JSON (#102) (@penelopeysm)
Closed issues:
v0.8.4
AbstractPPL v0.8.4
Merged pull requests:
v0.8.3
AbstractPPL v0.8.3
Merged pull requests:
v0.8.2
AbstractPPL v0.8.2
Merged pull requests: