You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During @PavanChaggar's work on implementing the simple graph model here, it turned out that we end up with something close to the DynamicPPL.jl approach: a generic evaluator function with context dispatch.
I therefore propose to move AbstractContext and evaluate!! from DynamicPPL.jl here, into a new file evaluation.jl. This would then not become a required part of the AbstractModel interface, but an opt-in abstraction open possibilities for reuse and common terminology.
(The concrete contexts existing in DynamicPPL.jl should IMHO not be moved here, as they use a very specific system to achieve correct, complex nesting, which is not required everywhere. But maybe the leaf contexts could be moved?.)
The text was updated successfully, but these errors were encountered:
Proposed function signature is to be consistent with DynamicPPL.jl:
function evaluate!!(m::Model, trace::AbstractModelTrace, ctx::AbstractContext)
...
end
Possibly with some extension to allow for empty trace, in which case a new 'empty' trace would be created, e.g. through trace = empty(m). In the case of models using GraphInfo, the first two arguments are containing within the Model. In the first instance, we'll choose to keep the two argument form to remain consistent with DynamicPPL.jl.
During @PavanChaggar's work on implementing the simple graph model here, it turned out that we end up with something close to the DynamicPPL.jl approach: a generic evaluator function with context dispatch.
I therefore propose to move
AbstractContext
andevaluate!!
from DynamicPPL.jl here, into a new fileevaluation.jl
. This would then not become a required part of theAbstractModel
interface, but an opt-in abstraction open possibilities for reuse and common terminology.(The concrete contexts existing in DynamicPPL.jl should IMHO not be moved here, as they use a very specific system to achieve correct, complex nesting, which is not required everywhere. But maybe the leaf contexts could be moved?.)
The text was updated successfully, but these errors were encountered: