Strategy to convert Model.logpt
from property to more flexible method.
#5333
Labels
Model.logpt
from property to more flexible method.
#5333
Uh oh!
There was an error while loading. Please reload this page.
In #5320 We removed most of the Factor property variations in favor of 3 methods that accept optional
vars
andjacobian
arguments (andsum
in the case oflogp
).This was pretty painless except for the need to add (or rather make use of the not yet implemented) but verbose
Model.logp_elemwiset
as the default flexible method to extractlogp
terms. Ideally this would be done by aModel.logpt(vars=None, jacobian=True, sum=True)
method in line with theModel.dlogpt
andModel.d2logpt
, but since themodel.logpt
is a property (and a commonly used one I guess), this is not trivial to refactor without breaking changes.Unless we are okay with a breaking change in time for V4, this is the strategy I could see:
Model.logpt
(property) ->Model.scalar_logpt
(property); FutureWarning:Model.logpt
will become a method in the next release.Model.logp_elemwiset
(method) ->Model.logpt
(method) (GOAL); FutureWarningModel.logp_elemwiset
andModel.scalar_logpt
will be deprecated in favor ofModel.logpt
.Model.scalar_logpt
andModel.logp_elemwiset
.The whole
Factor
BaseClass is also pretty useless at this point since onlyModel
inherits from it inV4
.The text was updated successfully, but these errors were encountered: