Turing v0.41.1
The ModeResult struct returned by maximum_a_posteriori and maximum_likelihood can now be wrapped in InitFromParams().
This makes it easier to use the parameters in downstream code, e.g. when specifying initial parameters for MCMC sampling.
For example:
@model function f()
# ...
end
model = f()
opt_result = maximum_a_posteriori(model)
sample(model, NUTS(), 1000; initial_params=InitFromParams(opt_result))If you need to access the dictionary of parameters, it is stored in opt_result.params but note that this field may change in future breaking releases as that Turing's optimisation interface is slated for overhaul in the near future.
Merged pull requests:
- CompatHelper: add new compat entry for DynamicPPL at version 0.38 for package test, (keep existing compat) (#2701) (@github-actions[bot])
- Move external sampler interface to AbstractMCMC (#2704) (@penelopeysm)
- Skip Mooncake on 1.12 (#2705) (@penelopeysm)
- Test on 1.12 (#2707) (@penelopeysm)
- Include parameter dictionary in optimisation return value (#2710) (@penelopeysm)
Closed issues:
- Better support for AbstractSampler (#2011)
- "failed to find valid initial parameters" without the use of
truncated(#2476) - Unify
src/mcmc/Inference.jlmethods (#2631) - Could not run even the sample code for Gaussian Mixture Models or Infinite Mixture Models (#2690)
- type unstable code in Gibbs fails with Enzyme (#2706)