You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- README has been simplified, many docs transfered to docs: https://turinglang.org/AdvancedHMC.jl/dev/.
6
+
- ADTypes.jl can be used for specifying the AD backend in `Hamiltonian(metric, ℓπ, AutoForwardDiff())`.
7
+
- SimpleUnpack.jl and Requires.jl are removed from the dependency.
8
+
-`find_good_stepsize` now has fewer allocations.
9
+
10
+
## v0.7.0
11
+
12
+
- Type piracies of Base.rand and Base.randn for vectors of RNGs are removed: Replace `rand(rngs::AbstractVector{<:Random.AbstractRNG})` with `map(rand, rngs)`, `randn(rngs::AbstractVector{<:Random.AbstractRNG})` with `map(randn, rngs)`, `rand(rngs::AbstractVector{<:Random.AbstractRNG}, T, n::Int) (for n == length(rngs))` with `map(Base.Fix2(rand, T), rngs)`, and `randn(rngs::AbstractVector{<:Random.AbstractRNG}, T, m::Int, n::Int) (for n == length(rngs))` with eg `reduce(hcat, map(rng -> randn(rng, T, m), rngs))`.
13
+
- Type piracy `Base.isfinite(x::AbstractVecOrMat)` is removed: Switch to `all(isfinite, x)` if you (possibly implicitly) relied on this definition
14
+
- Abstract fields of `NesterovDualAveraging`, `HMCDA`, `SliceTS`, and `MultinomialTS` are made concrete by adding type parameters: Update occurrences of these types (eg. in function signatures) if necessary
15
+
- Definitions of Base.rand for metrics are removed: Use the (internal) `AdvancedHMC.rand_momentum` function if you depend on this functionality and open an issue to further discuss the API
16
+
17
+
## v0.5.0
18
+
19
+
Convenience constructors for common samplers changed to:
AdvancedHMC.jl supports automatic differentiation using [`LogDensityProblemsAD`](https://github.com/tpapp/LogDensityProblemsAD.jl) across various AD backends and allows user-specified gradients. While the default AD backend for AdvancedHMC.jl is ForwardDiff.jl, we can seamlessly change to other backend like Mooncake.jl using various syntax like `Hamiltonian(metric, ℓπ, AutoZygote())`. Different AD backend can also be pluged in using `Hamiltonian(metric, ℓπ, Zygote)`, `Hamiltonian(metric, ℓπ, Val(:Zygote))` but we recommend using ADTypes since that would allow you to have more freedom for specifying the AD backend.
3
+
AdvancedHMC.jl supports automatic differentiation using [`LogDensityProblemsAD`](https://github.com/tpapp/LogDensityProblemsAD.jl) across various AD backends and allows user-specified gradients. While the default AD backend for AdvancedHMC.jl is ForwardDiff.jl, we can seamlessly change to other backend like Mooncake.jl using various syntax like `Hamiltonian(metric, ℓπ, AutoMooncake(; config = nothing))`. While some AD backends support syntax like `Hamiltonian(metric, ℓπ, Zygote)`, `Hamiltonian(metric, ℓπ, Val(:Zygote))`, we recommend using ADTypes since that would allow you to have more freedom for specifying the AD backend:
4
+
5
+
```julia
6
+
using AdvancedHMC, ADTypes, DifferentiationInterface, Mooncake, Zygote
In order to use user-specified gradients, please replace ForwardDiff.jl with `ℓπ_grad` in the `Hamiltonian` constructor as `Hamiltonian(metric, ℓπ, ℓπ_grad)`, where the gradient function `ℓπ_grad` should return a tuple containing both the log-posterior and its gradient, for example `ℓπ_grad(x) = (log_posterior, grad)`.
0 commit comments