From 84f03abda84b19823b28dee9bf905cf9d0a845d7 Mon Sep 17 00:00:00 2001 From: Xianda Sun <5433119+sunxd3@users.noreply.github.com> Date: Wed, 20 Dec 2023 17:11:45 +0000 Subject: [PATCH 1/4] Update HISTORY.md --- HISTORY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index a205924ee..ebf9c8aee 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,6 +1,6 @@ # Release 0.30.0 -- Replaced global variable-based AD backend mechanism with [`ADTypes.jl`](https://github.com/SciML/ADTypes.jl). Users should now specify the desired `ADType` directly in sampler constructors, e.g., `HMC(0.1, 10; adtype=AutoForwardDiff(; chunksize))`. +- Replaced global variable-based AD backend mechanism with [`ADTypes.jl`](https://github.com/SciML/ADTypes.jl). Users should now specify the desired `ADType` directly in sampler constructors, e.g., `HMC(0.1, 10; adtype=AutoForwardDiff(; chunksize))`, or `HMC(0.1, 10; adtype=AutoReverseDiff(false))` (`false` indicates to not use compiled tape). - Interface functions such as `ADBackend`, `setadbackend`, `setadsafe`, `setchunksize`, and `setrdcache` are deprecated and will be removed in a future release. - Removed the outdated `verifygrad` function. - Updated to a newer version of `LogDensityProblemsAD` (v1.7). From 604f52aea35d85742ef112eadca8478fbd6b6aa8 Mon Sep 17 00:00:00 2001 From: Hong Ge <3279477+yebai@users.noreply.github.com> Date: Wed, 20 Dec 2023 17:39:35 +0000 Subject: [PATCH 2/4] Update HISTORY.md --- HISTORY.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index ebf9c8aee..73c3a39f8 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,21 +1,21 @@ # Release 0.30.0 -- Replaced global variable-based AD backend mechanism with [`ADTypes.jl`](https://github.com/SciML/ADTypes.jl). Users should now specify the desired `ADType` directly in sampler constructors, e.g., `HMC(0.1, 10; adtype=AutoForwardDiff(; chunksize))`, or `HMC(0.1, 10; adtype=AutoReverseDiff(false))` (`false` indicates to not use compiled tape). +- Replaced specifying a global AD backend with [`ADTypes.jl`](https://github.com/SciML/ADTypes.jl). Users should now specify the desired `ADType` directly in sampler constructors, e.g., `HMC(0.1, 10; adtype=AutoForwardDiff(; chunksize))`, or `HMC(0.1, 10; adtype=AutoReverseDiff(false))` (`false` indicates not to use compiled tape). - Interface functions such as `ADBackend`, `setadbackend`, `setadsafe`, `setchunksize`, and `setrdcache` are deprecated and will be removed in a future release. - Removed the outdated `verifygrad` function. - Updated to a newer version of `LogDensityProblemsAD` (v1.7). # Release 0.12.0 -- The interface for defining new distributions with a constrained support and making them compatible with `Turing` has changed. To make a custom distribution type `CustomDistribution` compatible with `Turing`, the user needs to define the method `bijector(d::CustomDistribution)` that returns an instance of type `Bijector` implementing the `Bijectors.Bijector` API. +- The interface for defining new distributions with constrained support and making them compatible with `Turing` has changed. To make a custom distribution type `CustomDistribution` compatible with `Turing`, the user needs to define the method `bijector(d::CustomDistribution)` that returns an instance of type `Bijector` implementing the `Bijectors.Bijector` API. - `~` is now thread-safe when used for observations, but not assumptions yet. -- There were some performance improvements in the automatic differentiation of functions in `DistributionsAD` and `Bijectors` leading to speeds closer to and sometimes faster than Stan's. +- There were some performance improvements in the automatic differentiation of functions in `DistributionsAD` and `Bijectors`, leading to speeds closer to and sometimes faster than Stan's. - An HMC initialization bug was fixed. HMC initialization in Turing is now consistent with Stan's. - Sampling from the prior is now possible using `sample`. -- `psample` is now deprecated, in favor of `sample(model, sampler, parallel_method, n_samples, n_chains)` where `parallel_method` can be either `MCMCThreads()` or `MCMCDistributed()`. `MCMCThreads` will use your available threads to sample each chain (ensure that you have the environment variable `JULIA_NUM_THREADS` set to the number of threads you want to use) and `MCMCDistributed` will dispatch chain sampling to each available processes (you can add processes with `addprocs()`). -- Turing now uses AdvancedMH v0.5, which mostly provides behind-the -scenes restructuring. -- Custom expressions and macros can be interpolated in the `@model` definition with `$` and it is possible to use `@.` also for assumptions and observations. -- The macros `@varinfo`, `@logpdf`, and `@sampler` are removed. Instead one can access the internal variables `_varinfo`, `_model`, `_sampler`, and `_context` in the `@model` definition. +- `psample` is now deprecated in favour of `sample(model, sampler, parallel_method, n_samples, n_chains)` where `parallel_method` can be either `MCMCThreads()` or `MCMCDistributed()`. `MCMCThreads` will use your available threads to sample each chain (ensure that you have the environment variable `JULIA_NUM_THREADS` set to the number of threads you want to use), and `MCMCDistributed` will dispatch chain sampling to each available process (you can add processes with `addprocs()`). +- Turing now uses AdvancedMH v0.5, which mostly provides behind-the-scenes restructuring. +- Custom expressions and macros can be interpolated in the `@model` definition with `$`; it is possible to use `@.` also for assumptions and observations. +- The macros `@varinfo`, `@logpdf`, and `@sampler` are removed. Instead, one can access the internal variables `_varinfo`, `_model`, `_sampler`, and `_context` in the `@model` definition. - Additional constructors for SMC and PG make it easier to choose the resampling method and threshold. # Release 0.11.0 From 9382c086a72ab3bd337a4c6f6b1f32fc957a29e5 Mon Sep 17 00:00:00 2001 From: Hong Ge <3279477+yebai@users.noreply.github.com> Date: Wed, 20 Dec 2023 17:44:11 +0000 Subject: [PATCH 3/4] Update HISTORY.md --- HISTORY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 73c3a39f8..f662f481f 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,6 +1,6 @@ # Release 0.30.0 -- Replaced specifying a global AD backend with [`ADTypes.jl`](https://github.com/SciML/ADTypes.jl). Users should now specify the desired `ADType` directly in sampler constructors, e.g., `HMC(0.1, 10; adtype=AutoForwardDiff(; chunksize))`, or `HMC(0.1, 10; adtype=AutoReverseDiff(false))` (`false` indicates not to use compiled tape). +- [`ADTypes.jl`](https://github.com/SciML/ADTypes.jl) replaced Turing's global AD backend. Users should now specify the desired `ADType` directly in sampler constructors, e.g., `HMC(0.1, 10; adtype=AutoForwardDiff(; chunksize))`, or `HMC(0.1, 10; adtype=AutoReverseDiff(false))` (`false` indicates not to use compiled tape). - Interface functions such as `ADBackend`, `setadbackend`, `setadsafe`, `setchunksize`, and `setrdcache` are deprecated and will be removed in a future release. - Removed the outdated `verifygrad` function. - Updated to a newer version of `LogDensityProblemsAD` (v1.7). From 6e07f06966cf1dee0a981c467fa9232bd4232737 Mon Sep 17 00:00:00 2001 From: Xianda Sun <5433119+sunxd3@users.noreply.github.com> Date: Wed, 20 Dec 2023 18:00:16 +0000 Subject: [PATCH 4/4] Apply suggestions from code review Co-authored-by: Jose Storopoli --- HISTORY.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index f662f481f..4dce00aca 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -8,15 +8,15 @@ # Release 0.12.0 - The interface for defining new distributions with constrained support and making them compatible with `Turing` has changed. To make a custom distribution type `CustomDistribution` compatible with `Turing`, the user needs to define the method `bijector(d::CustomDistribution)` that returns an instance of type `Bijector` implementing the `Bijectors.Bijector` API. -- `~` is now thread-safe when used for observations, but not assumptions yet. -- There were some performance improvements in the automatic differentiation of functions in `DistributionsAD` and `Bijectors`, leading to speeds closer to and sometimes faster than Stan's. -- An HMC initialization bug was fixed. HMC initialization in Turing is now consistent with Stan's. +- `~` is now thread-safe when used for observations, but not assumptions (non-observed model parameters) yet. +- There were some performance improvements in the automatic differentiation (AD) of functions in `DistributionsAD` and `Bijectors`, leading to speeds closer to and sometimes faster than Stan's. +- An `HMC` initialization bug was fixed. `HMC` initialization in Turing is now consistent with Stan's. - Sampling from the prior is now possible using `sample`. - `psample` is now deprecated in favour of `sample(model, sampler, parallel_method, n_samples, n_chains)` where `parallel_method` can be either `MCMCThreads()` or `MCMCDistributed()`. `MCMCThreads` will use your available threads to sample each chain (ensure that you have the environment variable `JULIA_NUM_THREADS` set to the number of threads you want to use), and `MCMCDistributed` will dispatch chain sampling to each available process (you can add processes with `addprocs()`). -- Turing now uses AdvancedMH v0.5, which mostly provides behind-the-scenes restructuring. -- Custom expressions and macros can be interpolated in the `@model` definition with `$`; it is possible to use `@.` also for assumptions and observations. +- Turing now uses `AdvancedMH.jl` v0.5, which mostly provides behind-the-scenes restructuring. +- Custom expressions and macros can be interpolated in the `@model` definition with `$`; it is possible to use `@.` also for assumptions (non-observed model parameters) and observations. - The macros `@varinfo`, `@logpdf`, and `@sampler` are removed. Instead, one can access the internal variables `_varinfo`, `_model`, `_sampler`, and `_context` in the `@model` definition. -- Additional constructors for SMC and PG make it easier to choose the resampling method and threshold. +- Additional constructors for `SMC` and `PG` make it easier to choose the resampling method and threshold. # Release 0.11.0 - Removed some extraneous imports and dependencies ([#1182](https://github.com/TuringLang/Turing.jl/pull/1182))