Skip to content

Commit b7b2e1d

Browse files
committed
export to_sampleable and add to docs
1 parent f73d1b0 commit b7b2e1d

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

docs/src/api.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ One can nest models and call another model inside the model function with `left
2020
returned(::DynamicPPL.Model)
2121
```
2222

23+
Note that a `[returned(::DynamicPPL.Model)](@ref)` is only sampleable; one cannot compute `logpdf` for its realizations.
24+
This can be indicated using [`to_sampleable`](@ref) if the user wants to be explicit.
25+
26+
```@docs
27+
to_sampleable
28+
```
29+
2330
In the past, one would instead embed sub-models using [`@submodel`](@ref), which has been deprecated since the introduction of [`returned(model)`](@ref)
2431

2532
```@docs

src/DynamicPPL.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ export AbstractVarInfo,
123123
unfix,
124124
prefix,
125125
returned,
126+
to_sampleable,
126127
# Convenience macros
127128
@addlogprob!,
128129
@submodel,

0 commit comments

Comments
 (0)