File tree Expand file tree Collapse file tree 2 files changed +25
-2
lines changed
Expand file tree Collapse file tree 2 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -212,6 +212,13 @@ And some which might be useful to determine certain properties of the model base
212212DynamicPPL.has_static_constraints
213213```
214214
215+ For determining whether one might have type instabilities in the model, the following can be useful
216+
217+ ``` @docs
218+ DynamicPPL.DebugUtils.model_warntype
219+ DynamicPPL.DebugUtils.model_codetyped
220+ ```
221+
215222## Advanced
216223
217224### Variable names
Original file line number Diff line number Diff line change 685685Check the type stability of the model's evaluator, warning about any potential issues.
686686
687687This simply calls `@code_warntype` on the model's evaluator, filling in internal arguments where needed.
688+
689+ # Arguments
690+ - `model::Model`: The model to check.
691+ - `varinfo::AbstractVarInfo`: The varinfo to use when evaluating the model. Default: `VarInfo(model)`.
692+ - `context::AbstractContext`: The context to use when evaluating the model. Default: [`DefaultContext`](@ref).
693+
694+ # Keyword Arguments
695+ - `optimize::Bool`: Whether to generate optimized code. Default: `false`.
688696"""
689697function model_warntype (
690698 model:: Model ,
@@ -701,13 +709,21 @@ function model_warntype(
701709end
702710
703711"""
704- model_typed (model[, varinfo, context]; optimize=true)
712+ model_codetyped (model[, varinfo, context]; optimize=true)
705713
706714Return the type inference for the model's evaluator.
707715
708716This simply calls `@code_typed` on the model's evaluator, filling in internal arguments where needed.
717+
718+ # Arguments
719+ - `model::Model`: The model to check.
720+ - `varinfo::AbstractVarInfo`: The varinfo to use when evaluating the model. Default: `VarInfo(model)`.
721+ - `context::AbstractContext`: The context to use when evaluating the model. Default: [`DefaultContext`](@ref).
722+
723+ # Keyword Arguments
724+ - `optimize::Bool`: Whether to generate optimized code. Default: `true`.
709725"""
710- function model_typed (
726+ function model_codetyped (
711727 model:: Model ,
712728 varinfo:: AbstractVarInfo = VarInfo (model),
713729 context:: AbstractContext = DefaultContext ();
You can’t perform that action at this time.
0 commit comments