Skip to content

Releases: TuringLang/Turing.jl

v0.37.0

19 Mar 11:32
e4cd6a2
Compare
Choose a tag to compare

Turing v0.37.0

Diff since v0.36.3

Breaking changes

Gibbs constructors

0.37 removes the old Gibbs constructors deprecated in 0.36.

Remove Zygote support

Zygote is no longer officially supported as an automatic differentiation backend, and AutoZygote is no longer exported. You can continue to use Zygote by importing AutoZygote from ADTypes and it may well continue to work, but it is no longer tested and no effort will be expended to fix it if something breaks.

Mooncake is the recommended replacement for Zygote.

DynamicPPL 0.35

Turing.jl v0.37 uses DynamicPPL v0.35, which brings with it several breaking changes:

  • The right hand side of .~ must from now on be a univariate distribution.
  • Indexing VarInfo objects by samplers has been removed completely.
  • The order in which nested submodel prefixes are applied has been reversed.
  • The arguments for the constructor of LogDensityFunction have changed. LogDensityFunction also now satisfies the LogDensityProblems interface, without needing a wrapper object.

For more details about all of the above, see the changelog of DynamicPPL here.

Export list

Turing.jl's export list has been cleaned up a fair bit. This affects what is imported into your namespace when you do an unqualified using Turing. You may need to import things more explicitly than before.

  • The DynamicPPL and AbstractMCMC modules are no longer exported. You will need to import DynamicPPL or using DynamicPPL: DynamicPPL (likewise AbstractMCMC) yourself, which in turn means that they have to be made available in your project environment.

  • @logprob_str and @prob_str have been removed following a long deprecation period.

  • We no longer re-export everything from Bijectors and Libtask. To get around this, add using Bijectors or using Libtask at the top of your script (but we recommend using more selective imports).

    • We no longer export Bijectors.ordered. If you were using ordered, even Bijectors does not (currently) export this. You will have to manually import it with using Bijectors: ordered.

On the other hand, we have added a few more exports:

  • DynamicPPL.returned and DynamicPPL.prefix are exported (for use with submodels).
  • LinearAlgebra.I is exported for convenience.

Merged pull requests:

Closed issues:

  • Improper initial values when supports of the prior distribution are themselves random (#1270)
  • Specify which variables to track (#1444)
  • Calibration Example of Complex Model (#1516)
  • Errors in Sampling When Parameter Bounds Depend on Parameters (#1558)
  • Gibbs gives different sampling results with fixed rng (#1731)
  • Performance regression for BernoulliLogit (#1934)
  • Create a package extension for JuliaBUGS (#2104)
  • Setup continuous benchmarking for Tuirng/DynamicPPL (#2238)
  • Using @distributed to accelerate but getting wrong results (#2265)
  • AD with Tracker.jl versus Zygote.jl and Mooncake.jl. For BNN. (#2454)
  • Remove Zygote from tests and docs (#2504)

v0.36.3

11 Mar 18:08
1397d69
Compare
Choose a tag to compare

Turing v0.36.3

Diff since v0.36.2

Merged pull requests:

Closed issues:

  • @model treats an observed variable as a random variable if it's provided by unpacking (#1978)
  • Adding new issues and PRs to Project Board automatically. (#2315)
  • ForwardDiff Optimization test failing (#2369)
  • test/mcmc/Inference.jl segfaults on GHA Windows runner (sometimes) (#2379)
  • filldist/arraydist construct NIW prior? (#2391)
  • Performance hints (#2416)
  • JuliaBUGS Meta Issue (#2435)
  • Keeping a nice changelog (#2463)
  • master -> main (#2479)
  • How important is 32-bit testing? (#2486)

v0.36.2

23 Jan 14:57
ea35bb7
Compare
Choose a tag to compare

Turing v0.36.2

Diff since v0.36.1

Merged pull requests:

  • Fix a Gibbs bug with models where linking changes variable dimension (#2472) (@mhauru)

v0.36.1

23 Jan 13:30
8bf98e1
Compare
Choose a tag to compare

Turing v0.36.1

Diff since v0.36.0

  • This is a release for compatibility with DynamicPPL 0.33 and 0.34.

Merged pull requests:

Closed issues:

  • Reduce iteration counts in tests (#2338)

v0.36.0

15 Jan 12:18
24d5556
Compare
Choose a tag to compare

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)

v0.35.5

18 Dec 19:31
2707d12
Compare
Choose a tag to compare

Turing v0.35.5

Diff since v0.35.4

v0.35.4

18 Dec 19:08
700a19a
Compare
Choose a tag to compare

Turing v0.35.4

Diff since v0.35.3

Merged pull requests:

Closed issues:

  • Update MCMC sampler wrappers in Turing.jl to use AbstractMCMC (#2426)
  • JuliaBUGS Meta Issue (#2435)

v0.35.3

02 Dec 00:39
c0a4ee9
Compare
Choose a tag to compare

Turing v0.35.3

Diff since v0.35.2

Merged pull requests:

Closed issues:

  • Using Bayesian Inference for noise free Likelihood (#1914)
  • Depreciate MCMC-interface code in favour of AbstractMCMC. (#2281)
  • Using the score function estimator as gradient for VI (#2287)
  • How to save a model / fit and load it? Issue with JLD2 for "reconstructing" (#2309)
  • Nested sampling integration (#2329)
  • MethodError matching getϵ for AdvancedHMC Adaption (#2400)

v0.35.2

07 Nov 15:19
5b24ceb
Compare
Choose a tag to compare

Turing v0.35.2

Diff since v0.35.1

Merged pull requests:

Closed issues:

  • update() method for updating a fitted model with new data (#2308)
  • Drop support for Tracker (#2356)
  • Upgrade julia-actions/cache to v2 (#2370)
  • AdvancedMH external-sampler tests fail intermittently with 2 threads (#2371)
  • Use version = "min" in CI (#2373)
  • Data transformation code slows down sampling? (#2380)
  • New predict() behaviour and syntax? (#2388)
  • Sampling with HMC can hang if AD is bugged (#2389)

v0.35.1

25 Oct 16:49
42189fd
Compare
Choose a tag to compare

Turing v0.35.1

Diff since v0.35.0

  • Bump Optimization compat to v4
  • Bump DynamicPPL compat to v0.30.2

Merged pull requests: