@@ -680,34 +680,34 @@ function has_static_constraints(
680680end
681681
682682"""
683- model_warntype(model[, varinfo, context])
683+ model_warntype(model[, varinfo, context]; optimize=true )
684684
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.
688688"""
689- function model_warntype (model:: Model , varinfo:: AbstractVarInfo = VarInfo (model), context:: AbstractContext = DefaultContext ())
689+ function model_warntype (model:: Model , varinfo:: AbstractVarInfo = VarInfo (model), context:: AbstractContext = DefaultContext (); optimize :: Bool = true )
690690 args, kwargs = DynamicPPL. make_evaluate_args_and_kwargs (model, varinfo, context)
691691 return if isempty (kwargs)
692- InteractiveUtils. @code_warntype model. f (args... )
692+ InteractiveUtils. @code_warntype optimize = optimize model. f (args... )
693693 else
694- InteractiveUtils. @code_warntype model. f (args... ; kwargs... )
694+ InteractiveUtils. @code_warntype optimize = optimize model. f (args... ; kwargs... )
695695 end
696696end
697697
698698"""
699- model_typed(model[, varinfo, context])
699+ model_typed(model[, varinfo, context]; optimize=true )
700700
701701Return the type inference for the model's evaluator.
702702
703703This simply calls `@code_typed` on the model's evaluator, filling in internal arguments where needed.
704704"""
705- function model_typed (model:: Model , varinfo:: AbstractVarInfo = VarInfo (model), context:: AbstractContext = DefaultContext ())
705+ function model_typed (model:: Model , varinfo:: AbstractVarInfo = VarInfo (model), context:: AbstractContext = DefaultContext (); optimize :: Bool = true )
706706 args, kwargs = DynamicPPL. make_evaluate_args_and_kwargs (model, varinfo, context)
707707 return if isempty (kwargs)
708- InteractiveUtils. @code_typed model. f (args... )
708+ InteractiveUtils. @code_typed optimize = optimize model. f (args... )
709709 else
710- InteractiveUtils. @code_typed model. f (args... ; kwargs... )
710+ InteractiveUtils. @code_typed optimize = optimize model. f (args... ; kwargs... )
711711 end
712712end
713713
0 commit comments