Releases: TuringLang/JuliaBUGS.jl
JuliaBUGS-v0.11.1
JuliaBUGS JuliaBUGS-v0.11.1
Merged pull requests:
- DoodleBUGS: Make zooming smooth (#360) (#384) (@Govindggupta)
- Add DoodleBUGS PR Preview cleanup workflow (#387) (@Copilot)
- Use dependence vectors to support generating Julia code for more models (#390) (@sunxd3)
- DoodleBUGS: Implement Undo/Redo functionality (#398) (@kundangosavii)
- CompatHelper: bump compat for JSON to 1 for package JuliaBUGS, (keep existing compat) (#399) (@github-actions[bot])
- Use
invokelatestin tests (because of Julia 1.12) (#404) (@sunxd3) - DoodleBUGS: fix Dependabot security alerts (#407) (@shravanngoswamii)
- DoodleBUGS: Use
PrimeVuefor UI & Implement “Figma-like” Layout & Model Sharing Feature (#408) (@shravanngoswamii) - DoodleBUGS: fix sharing model with validation errors (#410) (@shravanngoswamii)
- DoodleBUGS: Remove node only when
Alt/Option (⌥)is pressed (#413) (@shravanngoswamii)
Closed issues:
- Compile to JAX to enable GPU/TPU acceleration and
vmap. (#209) - DoodleBUGS: Add GHA for PR Preview cleanup (#342)
- DoodleBUGS: Backend (#355)
- DoodleBUGS: Allow plate resizing (#358)
- DoodleBUGS: Undo/Redo Functionality (#359)
- DoodleBUGS: Make zooming smooth (#360)
- JuliaBUGS: Plates not supported in plotting (#412)
JuliaBUGS-v0.11.0
JuliaBUGS JuliaBUGS-v0.11.0
v0.11.0 Breaking Changes
Simplified sampling API in AbstractPPL.evaluate!!: Replaced sample_all and respect_observed (added in 0.10.5) kwargs with sample_observed.
Migration:
- From 0.10.5: Default behavior unchanged (samples latents, keeps observed fixed)
sample_all=true, respect_observed=false→sample_observed=true- Other uses → remove (now default)
- From 0.10.4 or earlier: Default behavior changed
- Old default sampled all nodes including observed
- New default keeps observed fixed; use
sample_observed=truefor old behavior
Merged pull requests:
JuliaBUGS-v0.10.5
JuliaBUGS JuliaBUGS-v0.10.5
Merged pull requests:
JuliaBUGS-v0.10.4
JuliaBUGS JuliaBUGS-v0.10.4
Merged pull requests:
- DoodleBUGS: Now works in WebKit broswers (Safari, all iPad/iOS browsers) (#402) (@shravanngoswamii)
- Allow disabling source generation during compilation (#403) (@sunxd3)
Closed issues:
JuliaBUGS-v0.10.3
JuliaBUGS JuliaBUGS-v0.10.3
Merged pull requests:
JuliaBUGS-v0.10.2
JuliaBUGS JuliaBUGS-v0.10.2
Merged pull requests:
- Fix typos, improve clarity and standardize spelling in documentation (#386) (@Copilot)
- DoodleBUGS Project: Phase 2 (Backend) (#388) (@shravanngoswamii)
- R interface for JuliaBUGS.jl from the
rjuliabugspackage (#389) (@MateusMaiaDS) - store manual layout and fix linting and typescript errors (#393) (@shravanngoswamii)
- Add an argument to
conditionfunction to skip generating and evaling log density function (#394) (@sunxd3)
Closed issues:
JuliaBUGS-v0.10.1
Expose docs for changes in v0.10
Improvements and fixes:
- Fixed Tagbot issues #377
- Add
tag_prefixoption in Docs.yml so versioned docs gets deployed when Tagbot releases 977711a - Updated Documenter.jl version in for JuliaBUGS docs for support of
tag_prefixoption #378 - Finally, explosed new docs files for v0.10
Auto-Generated Release Notes
What's Changed
- fix TagBot by @shravanngoswamii in #377
- Update JuliaBUGS/docs/Project.toml by @shravanngoswamii in #378
- JuliaBUGS: Expose new docs files and few minor updates by @shravanngoswamii in #376
Full Changelog: JuliaBUGS-v0.10.0...JuliaBUGS-v0.10.1
JuliaBUGS-v0.10.0
JuliaBUGS JuliaBUGS-v0.10.0
This is a major overhaul since v0.9.0. It introduces a faster evaluation mode, a refactored Gibbs sampler API, a new conditioning workflow, and a Turing-like modeling macro along with an ergonomic type system for model parameters.
Highlights
-
New evaluation mode: generated log-density function
- Add
UseGeneratedLogDensityFunction()andUseGraph()evaluation modes; switch withset_evaluation_mode(model, mode). Falls back to graph traversal when generation isn’t available. - Works in transformed (unconstrained) space only; call
settrans(model, true)before enabling. If the model is untransformed, enabling the generated mode throws a helpful error. - Supported AD backends: Mooncake and Enzyme only, because the generated function mutates; other AD backends are not compatible with this mode for now.
- Brings significant speedups on supported models; fixes cover conditioned models and discrete evaluation paths.
- Related: #278, #276, #289, #279, #315, #318, #314.
- Add
-
Refactored Gibbs sampler and samplers API
- New
GibbsAPI supports mapping variable groups to samplers viaOrderedDict, with automatic expansion of subsuming variables (e.g.,@varname(x)coversx[i]). - Gradient-based samplers now require an explicit AD backend passed as a tuple
(sampler, ad_backend)(from ADTypes); the previous default wrapper approach was removed. MHFromPriorwas renamed/replaced by a clearerIndependentMHsingle-site sampler; supports standalone use and within Gibbs viagibbs_internal.- Uses
AbstractMCMC.setparams!!to keep stateful samplers in sync during Gibbs updates; includes multi-threaded sampling tests. - Related: #320, #329, #330, #332.
- New
-
Conditioning API overhaul (no subgraph creation)
condition(model, ...)now marks variables as observed in the same graph instead of creating a subgraph, and updates parameter sets accordingly. Newdeconditionrestores parameters and observation status.- Accepts
Dict{VarName,Any},Vector{VarName}(uses current values), or aNamedTuplefor simple names; handles subsumption (e.g.,xcovers allx[i]) with diagnostics. - Related: #309, #314, #318, #313.
-
New modeling APIs:
@modelmacro andoftypes@modelmacro creates a model-generating function from a function definition. The first argument destructures stochastic parameters(; ...)and may carry anoftype annotation to validate structure and shapes.ofand@ofdefine type-level parameter specs with bounds, symbolic dimensions, and constants (e.g.,@of(n=of(Int; constant=true), data=of(Array, n, 2))). These integrate with@modeland provide helpers likezero(T)and instance constructionT(; kwargs...).- Related: #291, #331.
Breaking changes
-
Gradient samplers must specify AD backend explicitly
- Pass
(HMC(...), AutoForwardDiff()),(NUTS(...), AutoReverseDiff()), or anotherADTypesbackend in the Gibbs map. The old default AD wrapper pattern was removed. (#330)
- Pass
-
Renamed/updated MH sampler
- Replace
MHFromPrior()withIndependentMH(). Update Gibbs sampler maps accordingly. (#329)
- Replace
-
Conditioning semantics and API
-
Primitive registration macro rename
- The macro to register custom callables for
@bugsis now@bugs_primitive(replacing the old name in code). Adjust any usage accordingly.
- The macro to register custom callables for
New features
- Generated evaluation mode:
UseGeneratedLogDensityFunction()withset_evaluation_mode(model, ...)andsettrans(model, ...)guards. (#278, #315, #318) - Turing-like
@modelmacro that builds a compiledBUGSModelfunction; supportsoftype annotations on the destructured parameter arg. (#291) of/@oftype system for parameter specs with constants, bounds, symbolic dims, and convenient constructors/utilities. (#331)IndependentMHsampler usable standalone or within Gibbs. (#329)decondition(model[, vars])to reverse conditioning. (#314)
Improvements and fixes
-
Model and evaluation
- Fix and refine generated log-density for conditioned models; recursive handling of discrete computations; parameter sorting now includes only true model parameters. (#292, #289, #315, #318)
- Refactor model internals into a
Modelmodule and movelogdensityproblemsintegration there. (#306, #313) - Light refactors to
BUGSModeland evaluation utilities. (#310, #314)
-
Graphs and utilities
-
Examples and docs
-
Test, CI, and infra
-
Compatibility
Usage notes and migration tips
-
Enabling the generated evaluation mode
model = compile(@bugs begin # ... end, data) model = settrans(model, true) # generated mode requires transformed space model = set_evaluation_mode(model, UseGeneratedLogDensityFunction()) # falls back to UseGraph() automatically if generation isn’t supported
-
Gibbs with explicit AD backends for gradient samplers
using ADTypes: AutoForwardDiff, AutoReverseDiff sampler_map = OrderedDict( @varname(μ) => (HMC(0.01, 10), AutoReverseDiff()), @varname(σ) => (NUTS(0.65), AutoForwardDiff()), @varname(k) => IndependentMH(), # discrete or non-gradient ) gibbs = Gibbs(model, sampler_map)
-
Conditioning and deconditioning
using JuliaBUGS.Model: condition, decondition m1 = condition(model, Dict(@varname(x[1]) => 1.0, @varname(x[2]) => 2.0)) m2 = decondition(m1) # restore to the unconditioned parameterization
-
Defining models with
@modelandofRegressionParams = @of( y = of(Array, 100), # observed beta = of(Array, 3), # parameter sigma = of(Real, 0, nothing), # parameter with lower bound ) @model function regression((; y, beta, sigma)::RegressionParams, X, N) for i in 1:N mu[i] = X[i, :] ⋅ beta y[i] ~ dnorm(mu[i], sigma) end beta ~ dnorm(0, 0.001) sigma ~ dgamma(0.001, 0.001) end model = regression((; y = y_obs), X, N)
Additional notes
- DoodleBUGS project (not part of this release): Substantial progress (Phase 1, code generation, data input, nested plates, exports, state persistence) and workflow isolation landed in this repo. These changes are present but out of scope for 0.10 and will be kept under a dedicated subfolder. See #339, #347, #357, #340, #341.
Thanks to everyone who contributed issues, PRs, reviews, and ideas across this cycle!
v0.9.0
JuliaBUGS v0.9.0
Breaking changes
- With this release, the Julia compat version is bumped to 1.10.8 for JuliaBUGS (same as Bijectors v0.15.5)
Merged pull requests:
- CompatHelper: bump compat for Bijectors to 0.15, (keep existing compat) (#242) (@github-actions[bot])
- Update benchmarking code (#248) (@sunxd3)
- CompatHelper: bump compat for AbstractPPL to 0.10, (keep existing compat) (#266) (@github-actions[bot])
- CompatHelper: bump compat for GLMakie in [weakdeps] to 0.11, (keep existing compat) (#268) (@github-actions[bot])
- Translating BUGSgraph to BayesianNetwork definition (#270) (@naseweisssss)
- Modularising Bayesian Network (Experimental) (#271) (@naseweisssss)
- Adding node type, and add back missing function (#272) (@naseweisssss)
- Enable github action for experimental tests (#273) (@sunxd3)
- Documentation and Turing Navigation CI improvement (#274) (@shravanngoswamii)
Closed issues:
- [feature request] more robust serialization (#254)