Turing.jl icon indicating copy to clipboard operation
Turing.jl copied to clipboard

Reenable PriorContext for Optimization

Open alyst opened this issue 5 months ago • 3 comments

This PR reenables the support for PriorContext in optimization, which was disabled by #2022. While it is not directly supported by the current optim_problem() interface (only MLE/MAP are supported, although adding MaxPrior is possible), I think it is useful to support PriorContext for Turing.OptimLogDensity(). In my code I use it for multi-objective Pareto optimization (prior + llh).

alyst avatar Feb 03 '24 23:02 alyst

This PR reenables the support for PriorContext in optimization, which was disabled by #2022.

AFAICT support for PriorContext has never existed and has never been tested. The check in the PR was only introduced to communicate this more clearly and provide a better error message.

devmotion avatar Feb 03 '24 23:02 devmotion

AFAICT support for PriorContext has never existed and has never been tested.

I see. It was working before though. Do you think it makes sense to support it for some of the user use cases?

alyst avatar Feb 04 '24 00:02 alyst

IMO if we 're allowing both DefaultContext and LikelihoodContext, I feel like allowing PriorContext also seems reasonable (i.e. all the leaf-contexts).

torfjelde avatar Feb 04 '24 15:02 torfjelde