Skip to content

Update to v0.39 #612

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 55 additions & 56 deletions Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

julia_version = "1.11.5"
manifest_format = "2.0"
project_hash = "93e3f90921e5771e56e7b8d21131b1107faa4765"
project_hash = "5ea45087374f193fc9b541533d3ffc8025f44bcd"

[[deps.ADTypes]]
git-tree-sha1 = "e2478490447631aedba0823d4d7a80b2cc8cdb32"
Expand Down Expand Up @@ -127,17 +127,14 @@ weakdeps = ["Libtask"]
AdvancedPSLibtaskExt = "Libtask"

[[deps.AdvancedVI]]
deps = ["ADTypes", "Bijectors", "DiffResults", "Distributions", "DistributionsAD", "DocStringExtensions", "ForwardDiff", "LinearAlgebra", "ProgressMeter", "Random", "Requires", "StatsBase", "StatsFuns", "Tracker"]
git-tree-sha1 = "e913c2794cf9d2db9d36d28f67abd27595101f49"
deps = ["ADTypes", "Accessors", "DiffResults", "DifferentiationInterface", "Distributions", "DocStringExtensions", "FillArrays", "Functors", "LinearAlgebra", "LogDensityProblems", "Optimisers", "ProgressMeter", "Random", "StatsBase"]
git-tree-sha1 = "59c9723a71ed815eafec430d4cafa592b5889b96"
uuid = "b5ca4192-6429-45e5-a2d9-87aec30a685c"
version = "0.2.12"
weakdeps = ["Enzyme", "Flux", "ReverseDiff", "Zygote"]
version = "0.4.1"
weakdeps = ["Bijectors"]

[deps.AdvancedVI.extensions]
AdvancedVIEnzymeExt = ["Enzyme"]
AdvancedVIFluxExt = ["Flux"]
AdvancedVIReverseDiffExt = ["ReverseDiff"]
AdvancedVIZygoteExt = ["Zygote"]
AdvancedVIBijectorsExt = "Bijectors"

[[deps.AliasTables]]
deps = ["PtrArrays", "Random"]
Expand Down Expand Up @@ -747,9 +744,9 @@ version = "6.176.0"

[[deps.DiffEqCallbacks]]
deps = ["ConcreteStructs", "DataStructures", "DiffEqBase", "DifferentiationInterface", "Functors", "LinearAlgebra", "Markdown", "RecipesBase", "RecursiveArrayTools", "SciMLBase", "StaticArraysCore"]
git-tree-sha1 = "b1f970a2873a2cf76ce35fb0ed2b755a11b31052"
git-tree-sha1 = "76292e889472e810d40a844b714743c0ffb1c53b"
uuid = "459566f4-90b8-5000-8ac3-15dfb0a30def"
version = "4.1.0"
version = "4.6.0"

[[deps.DiffEqNoiseProcess]]
deps = ["DiffEqBase", "Distributions", "GPUArraysCore", "LinearAlgebra", "Markdown", "Optim", "PoissonRandom", "QuadGK", "Random", "Random123", "RandomNumbers", "RecipesBase", "RecursiveArrayTools", "ResettableStacks", "SciMLBase", "StaticArraysCore", "Statistics"]
Expand All @@ -773,12 +770,6 @@ git-tree-sha1 = "23163d55f885173722d1e4cf0f6110cdbaf7e272"
uuid = "b552c78f-8df3-52c6-915a-8e097449b14b"
version = "1.15.1"

[[deps.DiffTests]]
deps = ["LinearAlgebra", "SparseArrays", "Statistics"]
git-tree-sha1 = "b92beb1933df01bf4915d3a05e54c2a0aad312c7"
uuid = "de460e47-3fe3-5279-bb4a-814414816d5d"
version = "0.1.2"

[[deps.DifferentialEquations]]
deps = ["BoundaryValueDiffEq", "DelayDiffEq", "DiffEqBase", "DiffEqCallbacks", "DiffEqNoiseProcess", "JumpProcesses", "LinearAlgebra", "LinearSolve", "NonlinearSolve", "OrdinaryDiffEq", "Random", "RecursiveArrayTools", "Reexport", "SciMLBase", "SteadyStateDiffEq", "StochasticDiffEq", "Sundials"]
git-tree-sha1 = "afdc7dfee475828b4f0286d63ffe66b97d7a3fa7"
Expand Down Expand Up @@ -1154,10 +1145,10 @@ uuid = "53c48c17-4a7d-5ca2-90c5-79b7896eea93"
version = "0.8.5"

[[deps.Flux]]
deps = ["Adapt", "ChainRulesCore", "Compat", "Functors", "LinearAlgebra", "MLDataDevices", "MLUtils", "MacroTools", "NNlib", "OneHotArrays", "Optimisers", "Preferences", "ProgressLogging", "Random", "Reexport", "Setfield", "SparseArrays", "SpecialFunctions", "Statistics", "Zygote"]
git-tree-sha1 = "df520a0727f843576801a0294f5be1a94be28e23"
deps = ["Adapt", "ChainRulesCore", "Compat", "EnzymeCore", "Functors", "LinearAlgebra", "MLCore", "MLDataDevices", "MLUtils", "MacroTools", "NNlib", "OneHotArrays", "Optimisers", "Preferences", "ProgressLogging", "Random", "Reexport", "Setfield", "SparseArrays", "SpecialFunctions", "Statistics", "Zygote"]
git-tree-sha1 = "2c35003ec8dafabdc48549102208b1b15552cb33"
uuid = "587475ba-b771-5e3f-ad9e-33799f191a9c"
version = "0.14.25"
version = "0.16.4"

[deps.Flux.extensions]
FluxAMDGPUExt = "AMDGPU"
Expand Down Expand Up @@ -1226,10 +1217,10 @@ uuid = "77dc65aa-8811-40c2-897b-53d922fa7daf"
version = "0.1.3"

[[deps.Functors]]
deps = ["LinearAlgebra"]
git-tree-sha1 = "64d8e93700c7a3f28f717d265382d52fac9fa1c1"
deps = ["Compat", "ConstructionBase", "LinearAlgebra", "Random"]
git-tree-sha1 = "60a0339f28a233601cb74468032b5c302d5067de"
uuid = "d9f16b24-f501-4c13-a1f2-28368ffc5196"
version = "0.4.12"
version = "0.5.2"

[[deps.Future]]
deps = ["Random"]
Expand Down Expand Up @@ -1358,16 +1349,6 @@ weakdeps = ["Distributions"]
[deps.HiddenMarkovModels.extensions]
HiddenMarkovModelsDistributionsExt = "Distributions"

[[deps.Hwloc]]
deps = ["CEnum", "Hwloc_jll", "Printf"]
git-tree-sha1 = "6a3d80f31ff87bc94ab22a7b8ec2f263f9a6a583"
uuid = "0e44f5e4-bd66-52a0-8798-143a42290a1d"
version = "3.3.0"
weakdeps = ["AbstractTrees"]

[deps.Hwloc.extensions]
HwlocTrees = "AbstractTrees"

[[deps.Hwloc_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl"]
git-tree-sha1 = "92f65c4d78ce8cdbb6b68daf88889950b0a99d11"
Expand Down Expand Up @@ -1513,10 +1494,10 @@ uuid = "b14d175d-62b4-44ba-8fb7-3064adc8c3ec"
version = "0.2.4"

[[deps.JumpProcesses]]
deps = ["ArrayInterface", "DataStructures", "DiffEqBase", "DocStringExtensions", "FunctionWrappers", "Graphs", "LinearAlgebra", "Markdown", "PoissonRandom", "Random", "RandomNumbers", "RecursiveArrayTools", "Reexport", "SciMLBase", "Setfield", "StaticArrays", "SymbolicIndexingInterface", "UnPack"]
git-tree-sha1 = "f2bdec5b4580414aee3178c8caa6e46c344c0bbc"
deps = ["ArrayInterface", "DataStructures", "DiffEqBase", "DiffEqCallbacks", "DocStringExtensions", "FunctionWrappers", "Graphs", "LinearAlgebra", "Markdown", "PoissonRandom", "Random", "RandomNumbers", "RecursiveArrayTools", "Reexport", "SciMLBase", "Setfield", "StaticArrays", "SymbolicIndexingInterface", "UnPack"]
git-tree-sha1 = "fb7fd516de38db80f50fe15e57d44da2836365e7"
uuid = "ccbc3e58-028d-4f4c-8cd5-9ae44345cda5"
version = "9.14.3"
version = "9.16.0"
weakdeps = ["FastBroadcast"]

[[deps.KernelAbstractions]]
Expand Down Expand Up @@ -1885,10 +1866,10 @@ uuid = "e6f89c97-d47a-5376-807f-9c37f3926c36"
version = "1.1.0"

[[deps.Lux]]
deps = ["ADTypes", "Adapt", "ArgCheck", "ArrayInterface", "ChainRulesCore", "Compat", "ConcreteStructs", "DispatchDoctor", "EnzymeCore", "FastClosures", "ForwardDiff", "Functors", "GPUArraysCore", "LinearAlgebra", "LuxCore", "LuxLib", "MLDataDevices", "MacroTools", "Markdown", "NNlib", "Optimisers", "Preferences", "Random", "Reexport", "SIMDTypes", "Setfield", "Static", "StaticArraysCore", "Statistics", "WeightInitializers"]
git-tree-sha1 = "39cc335d2601d4b0d74b209f718e7e3641771448"
deps = ["ADTypes", "Adapt", "ArgCheck", "ArrayInterface", "ChainRulesCore", "Compat", "ConcreteStructs", "DiffResults", "DispatchDoctor", "EnzymeCore", "FastClosures", "ForwardDiff", "Functors", "GPUArraysCore", "LinearAlgebra", "LuxCore", "LuxLib", "MLDataDevices", "MacroTools", "Markdown", "NNlib", "Optimisers", "Preferences", "Random", "Reexport", "SIMDTypes", "Setfield", "Static", "StaticArraysCore", "Statistics", "WeightInitializers"]
git-tree-sha1 = "4bf87816440bec8e64b610de8724c04a58e65928"
uuid = "b2108857-7c20-44ae-9111-449ecde12c47"
version = "1.2.3"
version = "1.13.4"

[deps.Lux.extensions]
LuxComponentArraysExt = "ComponentArrays"
Expand All @@ -1898,7 +1879,7 @@ version = "1.2.3"
LuxMLUtilsExt = "MLUtils"
LuxMPIExt = "MPI"
LuxMPINCCLExt = ["CUDA", "MPI", "NCCL"]
LuxReactantExt = ["Enzyme", "Reactant"]
LuxReactantExt = ["Enzyme", "Reactant", "ReactantCore"]
LuxReverseDiffExt = ["FunctionWrappers", "ReverseDiff"]
LuxSimpleChainsExt = "SimpleChains"
LuxTrackerExt = "Tracker"
Expand All @@ -1915,28 +1896,30 @@ version = "1.2.3"
MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195"
NCCL = "3fe64909-d7a1-4096-9b7d-7a0f12cf0f6b"
Reactant = "3c362404-f566-11ee-1572-e11a4b42c853"
ReactantCore = "a3311ec8-5e00-46d5-b541-4f83e724a433"
ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267"
SimpleChains = "de6bee2f-e2f4-4ec7-b6ed-219cc6f6e9e5"
Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"

[[deps.LuxCore]]
deps = ["Compat", "DispatchDoctor", "Random"]
git-tree-sha1 = "9f71aea19be890e429ee21adfeda1e63d01ec610"
git-tree-sha1 = "48d45736aae190b1b41c1db5242fad955f0eff1d"
uuid = "bb33d45b-7691-41d6-9220-0943567d0623"
version = "1.1.0"
version = "1.2.6"

[deps.LuxCore.extensions]
LuxCoreArrayInterfaceReverseDiffExt = ["ArrayInterface", "ReverseDiff"]
LuxCoreArrayInterfaceTrackerExt = ["ArrayInterface", "Tracker"]
LuxCoreChainRulesCoreExt = "ChainRulesCore"
LuxCoreEnzymeCoreExt = "EnzymeCore"
LuxCoreFunctorsExt = "Functors"
LuxCoreMLDataDevicesExt = "MLDataDevices"
LuxCoreMLDataDevicesExt = ["Adapt", "MLDataDevices"]
LuxCoreReactantExt = "Reactant"
LuxCoreSetfieldExt = "Setfield"

[deps.LuxCore.weakdeps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869"
Expand All @@ -1948,10 +1931,10 @@ version = "1.1.0"
Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c"

[[deps.LuxLib]]
deps = ["ArrayInterface", "ChainRulesCore", "Compat", "CpuId", "DispatchDoctor", "EnzymeCore", "FastClosures", "ForwardDiff", "Hwloc", "KernelAbstractions", "LinearAlgebra", "LuxCore", "MLDataDevices", "Markdown", "NNlib", "Polyester", "Preferences", "Random", "Reexport", "Static", "StaticArraysCore", "Statistics"]
git-tree-sha1 = "a9e0f1477ac91623079f7a230f4de46170dc8817"
deps = ["ArrayInterface", "CPUSummary", "ChainRulesCore", "Compat", "DispatchDoctor", "EnzymeCore", "FastClosures", "ForwardDiff", "Functors", "KernelAbstractions", "LinearAlgebra", "LuxCore", "MLDataDevices", "Markdown", "NNlib", "Polyester", "Preferences", "Random", "Reexport", "Static", "StaticArraysCore", "Statistics"]
git-tree-sha1 = "b06b83e48cfbfc2ea25ec673537e7eb7e69879e9"
uuid = "82251201-b29d-42c6-8e01-566dec8acb11"
version = "1.3.7"
version = "1.8.0"

[deps.LuxLib.extensions]
LuxLibAppleAccelerateExt = "AppleAccelerate"
Expand All @@ -1961,6 +1944,7 @@ version = "1.3.7"
LuxLibLoopVectorizationExt = "LoopVectorization"
LuxLibMKLExt = "MKL"
LuxLibOctavianExt = ["Octavian", "LoopVectorization"]
LuxLibReactantExt = "Reactant"
LuxLibReverseDiffExt = "ReverseDiff"
LuxLibSLEEFPiratesExt = "SLEEFPirates"
LuxLibTrackerAMDGPUExt = ["AMDGPU", "Tracker"]
Expand All @@ -1976,6 +1960,7 @@ version = "1.3.7"
LoopVectorization = "bdcacae8-1622-11e9-2a5c-532679323890"
MKL = "33e6dc65-8f57-5167-99aa-e5a354878fb2"
Octavian = "6fd5a793-0b7e-452c-907f-f8bfe9c57db4"
Reactant = "3c362404-f566-11ee-1572-e11a4b42c853"
ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267"
SLEEFPirates = "476501e8-09a2-5ece-8869-fb82de89a1fa"
Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c"
Expand Down Expand Up @@ -2007,15 +1992,16 @@ version = "1.0.0"

[[deps.MLDataDevices]]
deps = ["Adapt", "Compat", "Functors", "Preferences", "Random"]
git-tree-sha1 = "85b47bc5a8bf0c886286638585df3bec7c9f8269"
git-tree-sha1 = "a47f08b67298dee5778cf279a9a735ca2d11a890"
uuid = "7e8f7934-dd98-4c1a-8fe8-92b47a384d40"
version = "1.5.3"
version = "1.10.0"

[deps.MLDataDevices.extensions]
MLDataDevicesAMDGPUExt = "AMDGPU"
MLDataDevicesCUDAExt = "CUDA"
MLDataDevicesChainRulesCoreExt = "ChainRulesCore"
MLDataDevicesChainRulesExt = "ChainRules"
MLDataDevicesComponentArraysExt = "ComponentArrays"
MLDataDevicesFillArraysExt = "FillArrays"
MLDataDevicesGPUArraysExt = "GPUArrays"
MLDataDevicesMLUtilsExt = "MLUtils"
Expand All @@ -2035,6 +2021,7 @@ version = "1.5.3"
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2"
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
ComponentArrays = "b0b7db55-cfe3-40fc-9ded-d10e2dbeff66"
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
GPUArrays = "0c68f7d7-f131-5f86-a1c3-88cf8149b2d7"
MLUtils = "f1d291b0-491e-4a28-83b9-f70985020b54"
Expand Down Expand Up @@ -2204,14 +2191,15 @@ uuid = "78c3b35d-d492-501b-9361-3d52fe80e533"
version = "0.8.1"

[[deps.Mooncake]]
deps = ["ADTypes", "ChainRules", "ChainRulesCore", "DiffRules", "DiffTests", "ExprTools", "FunctionWrappers", "GPUArraysCore", "Graphs", "InteractiveUtils", "LinearAlgebra", "MistyClosures", "Random", "Setfield", "Test"]
git-tree-sha1 = "68c31b62f4957a76aaf379092d13475a62f7658b"
deps = ["ADTypes", "ChainRules", "ChainRulesCore", "DiffRules", "ExprTools", "FunctionWrappers", "GPUArraysCore", "Graphs", "InteractiveUtils", "LinearAlgebra", "MistyClosures", "Random", "Test"]
git-tree-sha1 = "e4811fc54aa752d4a9a5cc9bed5cd85b8ab75db0"
uuid = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6"
version = "0.4.104"
version = "0.4.122"

[deps.Mooncake.extensions]
MooncakeAllocCheckExt = "AllocCheck"
MooncakeCUDAExt = "CUDA"
MooncakeFluxExt = "Flux"
MooncakeJETExt = "JET"
MooncakeLuxLibExt = "LuxLib"
MooncakeLuxLibSLEEFPiratesExtension = ["LuxLib", "SLEEFPirates"]
Expand All @@ -2221,6 +2209,7 @@ version = "0.4.104"
[deps.Mooncake.weakdeps]
AllocCheck = "9b6a8646-10ed-4001-bbdc-1d2f46dfbb1a"
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
Flux = "587475ba-b771-5e3f-ad9e-33799f191a9c"
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
LuxLib = "82251201-b29d-42c6-8e01-566dec8acb11"
NNlib = "872c559c-99b0-510c-b3b7-b6c96a88d5cd"
Expand Down Expand Up @@ -2488,10 +2477,20 @@ version = "1.13.1"
MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"

[[deps.Optimisers]]
deps = ["ChainRulesCore", "Functors", "LinearAlgebra", "Random", "Statistics"]
git-tree-sha1 = "c9ff5c686240c31eb8570b662dd1f66f4b183116"
deps = ["ChainRulesCore", "ConstructionBase", "Functors", "LinearAlgebra", "Random", "Statistics"]
git-tree-sha1 = "131dc319e7c58317e8c6d5170440f6bdaee0a959"
uuid = "3bd65402-5787-11e9-1adc-39752487f4e2"
version = "0.3.4"
version = "0.4.6"

[deps.Optimisers.extensions]
OptimisersAdaptExt = ["Adapt"]
OptimisersEnzymeCoreExt = "EnzymeCore"
OptimisersReactantExt = "Reactant"

[deps.Optimisers.weakdeps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869"
Reactant = "3c362404-f566-11ee-1572-e11a4b42c853"

[[deps.Optimization]]
deps = ["ADTypes", "ArrayInterface", "ConsoleProgressMonitor", "DocStringExtensions", "LBFGSB", "LinearAlgebra", "Logging", "LoggingExtras", "OptimizationBase", "Printf", "ProgressLogging", "Reexport", "SciMLBase", "SparseArrays", "TerminalLoggers"]
Expand Down Expand Up @@ -3670,9 +3669,9 @@ version = "1.6.0"

[[deps.Turing]]
deps = ["ADTypes", "AbstractMCMC", "Accessors", "AdvancedHMC", "AdvancedMH", "AdvancedPS", "AdvancedVI", "BangBang", "Bijectors", "Compat", "DataStructures", "Distributions", "DistributionsAD", "DocStringExtensions", "DynamicPPL", "EllipticalSliceSampling", "ForwardDiff", "Libtask", "LinearAlgebra", "LogDensityProblems", "MCMCChains", "NamedArrays", "Optimization", "OptimizationOptimJL", "OrderedCollections", "Printf", "Random", "Reexport", "SciMLBase", "SpecialFunctions", "Statistics", "StatsAPI", "StatsBase", "StatsFuns"]
git-tree-sha1 = "e306992e20e271c9834f65fc41972c7f3877c112"
git-tree-sha1 = "282ca358181f585fbb271eb9301e16b6fe5c80e0"
uuid = "fce5fe82-541a-59a6-adf8-730c64b5f9a0"
version = "0.38.6"
version = "0.39.1"
weakdeps = ["DynamicHMC", "Optim"]

[deps.Turing.extensions]
Expand Down
3 changes: 2 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
DistributionsAD = "ced4e74d-a319-5a8a-b0ac-84af2272839c"
DynamicHMC = "bbc10e6e-7c05-544b-b16e-64fede858acb"
DynamicPPL = "366bfd00-2699-11ea-058f-f148b4cae6d8"
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
Expand Down Expand Up @@ -54,4 +55,4 @@ UnPack = "3a884ed6-31ef-47d7-9d2a-63182c4928ed"
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"

[compat]
Turing = "0.38"
Turing = "0.39"
2 changes: 1 addition & 1 deletion _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ website:
text: Team
right:
# Current version
- text: "v0.38"
- text: "v0.39"
menu:
- text: Changelog
href: https://turinglang.org/docs/changelog.html
Expand Down
2 changes: 1 addition & 1 deletion developers/compiler/minituring-contexts/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ Of course, using an MCMC algorithm to sample from the prior is unnecessary and s
The use of contexts also goes far beyond just evaluating log probabilities and sampling. Some examples from Turing are

* `FixedContext`, which fixes some variables to given values and removes them completely from the evaluation of any log probabilities. They power the `Turing.fix` and `Turing.unfix` functions.
* `ConditionContext` conditions the model on fixed values for some parameters. They are used by `Turing.condition` and `Turing.uncondition`, i.e. the `model | (parameter=value,)` syntax. The difference between `fix` and `condition` is whether the log probability for the corresponding variable is included in the overall log density.
* `ConditionContext` conditions the model on fixed values for some parameters. They are used by `Turing.condition` and `Turing.decondition`, i.e. the `model | (parameter=value,)` syntax. The difference between `fix` and `condition` is whether the log probability for the corresponding variable is included in the overall log density.

* `PriorExtractorContext` collects information about what the prior distribution of each variable is.
* `PrefixContext` adds prefixes to variable names, allowing models to be used within other models without variable name collisions.
Expand Down
8 changes: 4 additions & 4 deletions developers/compiler/model-manual/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,26 @@ using DynamicPPL
function gdemo2(model, varinfo, context, x)
# Assume s² has an InverseGamma distribution.
s², varinfo = DynamicPPL.tilde_assume!!(
context, InverseGamma(2, 3), Turing.@varname(s²), varinfo
context, InverseGamma(2, 3), @varname(s²), varinfo
)

# Assume m has a Normal distribution.
m, varinfo = DynamicPPL.tilde_assume!!(
context, Normal(0, sqrt(s²)), Turing.@varname(m), varinfo
context, Normal(0, sqrt(s²)), @varname(m), varinfo
)

# Observe each value of x[i] according to a Normal distribution.
for i in eachindex(x)
_retval, varinfo = DynamicPPL.tilde_observe!!(
context, Normal(m, sqrt(s²)), x[i], Turing.@varname(x[i]), varinfo
context, Normal(m, sqrt(s²)), x[i], @varname(x[i]), varinfo
)
end

# The final return statement should comprise both the original return
# value and the updated varinfo.
return nothing, varinfo
end
gdemo2(x) = Turing.Model(gdemo2, (; x))
gdemo2(x) = DynamicPPL.Model(gdemo2, (; x))

# Instantiate a Model object with our data variables.
model2 = gdemo2([1.5, 2.0])
Expand Down
4 changes: 2 additions & 2 deletions developers/inference/implementing-samplers/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -403,11 +403,11 @@ As we promised, all of this hassle of implementing our `MALA` sampler in a way t
It also enables use with Turing.jl through the `externalsampler`, but we need to do one final thing first: we need to tell Turing.jl how to extract a vector of parameters from the "sample" returned in our implementation of `AbstractMCMC.step`. In our case, the "sample" is a `MALASample`, so we just need the following line:

```{julia}
# Load Turing.jl.
using Turing
using DynamicPPL

# Overload the `getparams` method for our "sample" type, which is just a vector.
Turing.Inference.getparams(::Turing.Model, sample::MALASample) = sample.x
Turing.Inference.getparams(::DynamicPPL.Model, sample::MALASample) = sample.x
```

And with that, we're good to go!
Expand Down
4 changes: 3 additions & 1 deletion tutorials/bayesian-time-series-analysis/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ scatter!(t, yf; color=2, label="Data")
With the model specified and with a reasonable prior we can now let Turing decompose the time series for us!

```{julia}
using MCMCChains: get_sections

function mean_ribbon(samples)
qs = quantile(samples)
low = qs[:, Symbol("2.5%")]
Expand All @@ -174,7 +176,7 @@ function mean_ribbon(samples)
end

function get_decomposition(model, x, cyclic_features, chain, op)
chain_params = Turing.MCMCChains.get_sections(chain, :parameters)
chain_params = get_sections(chain, :parameters)
return returned(model(x, cyclic_features, op), chain_params)
end

Expand Down
Loading
Loading