Skip to content

Releases: nsiccha/StanBlocks.jl

v0.1.5

21 Dec 16:11
dfa2221

Choose a tag to compare

StanBlocks v0.1.5

Diff since v0.1.4

Merged pull requests:

Closed issues:

  • Can't infer shape of parameter from an int argument. (#9)
  • Can't infer shapes from unnamed arguments for UDFs (#11)
  • Can't post-hoc replace return value (#12)
  • Can't "splice" parameters into a model which have not been defined in the model yet (#15)
  • for loop bounds sometimes transpile weirdly (#17)
  • _lcdf type methods don't print with Stan's |-syntax (#18)
  • Submodel name mangling fails for some quantities (#19)
  • Tests fail with tracetype(::StanBlocks.stan.CanonicalExpr{typeof(==)) [...] is ambiguous (#26)
  • forward!(x::ReturnExpr; info) is too verbose (#29)
  • maybe_lazy_size has an error (#45)

v0.1.4

22 Jul 13:04
afb5064

Choose a tag to compare

StanBlocks v0.1.4

Diff since v0.1.3

  • Expose stan_model
  • Add some documentation
  • Add simple_reduce_sum
  • More tests
  • Some quality of life improvements

Merged pull requests:

  • Fixes some bugs, adds documentation, adds simple_reduce_sum. (#8) (@nsiccha)

v0.1.3

17 Jul 11:04
bec918d

Choose a tag to compare

StanBlocks v0.1.3

Diff since v0.1.2

StanBlocks.jl (Stan backend)

Brings Julia syntax to Stan models by implementing a (limited) Julia to Stan transpilation with many caveats.
See test/slic.jl for implementations of a few simple posteriordb models
and see src/slic_stan/builtin.jl for a list of built-in functions and examples of user defined functions.

Current features include

  • activity analysis (automatically determines what is data, transformed_data, parameters, transformed parameters, model, or generated quantities),
  • automatically inferred types, shapes and constraints - including for user defined functions (including the function arguments, function body, and function return type),
  • automatic posterior pointwise likelihood and predictive generation,
  • (variadic) user defined functions,
  • higher order (user defined) functions (such as map, broadcasted, sum and more),
  • sub models,
  • post-hoc model adjustment,
  • named tuples,
  • (approximate) automatic code formatting à la Blue,
  • and more.

Upcoming features include, in order of priority and estimated arrival,

  • custom types (for method dispatch),
  • closures via Julia's Do-Block Syntax (to make within chain parallelization via reduce_sum less painful),
  • a much better user experience,
  • more and better tests,
  • inlining (to reduce potential runtime overhead),
  • array comprehensions,
  • a more complete (and more correct) coverage of built-in Stan functions,
  • better name resolution (currently user defined functions or sub models have to be defined in Main),
  • and more.

Almost anything that's possible in Julia should be possible to be transpiled to Stan.
Of course, unless Stan is much faster than Julia (+Mooncake or Enzyme) for the model in question,
just sticking to Julia comes with many advantages.

Features which are NOT planned:

  • (automatically) transpiling Julia functions which have not been defined via @deffun.

Merged pull requests:

v0.1.2

25 Feb 17:12

Choose a tag to compare

StanBlocks v0.1.2

Diff since v0.1.1

  • Add normal_lpdf overload for scalar scale.
  • Add DifferentiationInterface extension.

v0.1.1

30 Jan 13:58

Choose a tag to compare

StanBlocks v0.1.1

Closed issues:

  • Benchmark results for Mooncake (#1)
  • Question (#2)
  • Rerun Benchmarks with Latest Mooncake Version (#3)
  • Question about Stan syntax and math library coverage (#4)