Skip to content

Commit

Permalink
renamed model_codetyped to model_typed to be consistent with the
Browse files Browse the repository at this point in the history
naming
  • Loading branch information
torfjelde committed Nov 5, 2024
1 parent 5519a83 commit 6b6c7dd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/src/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ For determining whether one might have type instabilities in the model, the foll

```@docs
DynamicPPL.DebugUtils.model_warntype
DynamicPPL.DebugUtils.model_codetyped
DynamicPPL.DebugUtils.model_typed
```

## Advanced
Expand Down
4 changes: 2 additions & 2 deletions src/debug_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ function model_warntype(
end

"""
model_codetyped(model[, varinfo, context]; optimize=true)
model_typed(model[, varinfo, context]; optimize=true)
Return the type inference for the model's evaluator.
Expand All @@ -723,7 +723,7 @@ This simply calls `@code_typed` on the model's evaluator, filling in internal ar
# Keyword Arguments
- `optimize::Bool`: Whether to generate optimized code. Default: `true`.
"""
function model_codetyped(
function model_typed(
model::Model,
varinfo::AbstractVarInfo=VarInfo(model),
context::AbstractContext=DefaultContext();
Expand Down
2 changes: 1 addition & 1 deletion test/debug_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
@model demo_with_kwargs(x; z=1) = y ~ Normal(x, z)

for model in [demo_without_kwargs(1.0), demo_with_kwargs(1.0)]
codeinfo, retype = DynamicPPL.DebugUtils.model_codetyped(model)
codeinfo, retype = DynamicPPL.DebugUtils.model_typed(model)
@test codeinfo isa Core.CodeInfo
@test retype <: Tuple

Expand Down

0 comments on commit 6b6c7dd

Please sign in to comment.