Skip to content

Compiler Refactoring

Compare
Choose a tag to compare
@cpfiffer cpfiffer released this 29 Dec 18:41
· 961 commits to master since this release
bf0593a

Much of the back end of how Turing interprets models has changed with the merge of #613. See that issue for more detail.

Summary of changes

  • Models can now have default values in arguments (#544 (comment)). When an argument is not provided, it is treated as a parameter instead of an observation and is instantiated to its default value. The snippet below shows how x will be instantiated with default_x when no value is provided.
@model model_function(x = default_x, y)
	...	
end
  • Numerous improvements to allow greater internal stability and better integration with Julia's compiler.
  • Turing now places nice with other packages! The @model macro no longer needs to be avoided when used inside modules (#592), or inside a Literate.jl or Weave.jl file (#517), among other things.