Skip to content

v0.36.0

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 15 Jan 12:18
24d5556

Turing v0.36.0

Diff since v0.35.5

0.36.0 introduces a new Gibbs sampler. It's been included in several previous releases as Turing.Experimental.Gibbs, but now takes over the old Gibbs sampler, which gets removed completely.

The new Gibbs sampler currently supports the same user-facing interface as the old one, but the old constructors have been deprecated, and will be removed in the future. Also, given that the internals have been completely rewritten in a very different manner, there may be accidental breakage that we haven't anticipated. Please report any you find.

GibbsConditional has also been removed. It was never very user-facing, but it was exported, so technically this is breaking.

The old Gibbs constructor relied on being called with several subsamplers, and each of the constructors of the subsamplers would take as arguments the symbols for the variables that they are to sample, e.g. Gibbs(HMC(:x), MH(:y)). This constructor has been deprecated, and will be removed in the future. The new constructor works by mapping symbols, VarNames, or iterables thereof to samplers, e.g. Gibbs(:x=>HMC(), :y=>MH()), Gibbs(@varname(x) => HMC(), @varname(y) => MH()), Gibbs((:x, :y) => NUTS(), :z => MH()). This allows more granular specification of which sampler to use for which variable.

Likewise, the old constructor for calling one subsampler more often than another, Gibbs((HMC(0.01, 4, :x), 2), (MH(:y), 1)) has been deprecated. The new way to do this is to use RepeatSampler, also introduced at this version: Gibbs(@varname(x) => RepeatSampler(HMC(0.01, 4), 2), @varname(y) => MH()).

Merged pull requests:

  • Replace old Gibbs sampler with the experimental one. (#2328) (@mhauru)
  • CompatHelper: add new compat entry for AbstractPPL at version 0.9 for package test, (keep existing compat) (#2443) (@github-actions[bot])
  • CompatHelper: add new compat entry for BangBang at version 0.4 for package test, (keep existing compat) (#2444) (@github-actions[bot])
  • CompatHelper: bump compat for AbstractPPL to 0.10 for package test, (keep existing compat) (#2447) (@github-actions[bot])
  • CompatHelper: add new compat entry for Combinatorics at version 1 for package test, (keep existing compat) (#2448) (@github-actions[bot])
  • Increase atol on specific tests for x86 (#2449) (@penelopeysm)
  • Rework Gibbs constructors (#2456) (@mhauru)
  • Replace Gibbs inner loop with recursion (#2464) (@mhauru)
  • variable naming / destructuring (#2465) (@penelopeysm)
  • Remove mention of GibbsConditional from API docs (#2467) (@mhauru)

Closed issues:

  • Custom distributions required rand to be implemented when "unnecessary" (#907)
  • Recontruct vs Function with array of parameters (#1969)
  • Import style and modularisation (#2288)
  • Remove old Gibbs sampler, make the experimental one the default (#2318)
  • test/mcmc/Inference.jl segfaults on GHA Windows runner (sometimes) (#2379)
  • Automate choice of AD backend (#2417)
  • Remove Gibbs(; m=HMC(0.2, 3), s=PG(10)) in favour of Gibbs(:m=>HMC(0.2, 3), :s=>PG(10)) (#2442)
  • Gibbs performance regression on Julia v1.11 (#2445)
  • initial_params working incorrectly and differently in v0.34.0 and v0.33.0 (#2452)
  • Question: Getting 404 error when accesing https://turing.ml/v0.22/docs/using-turing/. (#2466)