Skip to content

Commit 97258f3

Browse files
committed
added back def of untyped_varinfo that shouldn't have been removed +
fixed call in docs
1 parent f76658a commit 97258f3

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

docs/src/internals/varinfo.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ For example, with the model above we have
7979

8080
```@example varinfo-design
8181
# Type-unstable `VarInfo`
82-
varinfo_untyped = DynamicPPL.untyped_varinfo(demo(), SamplingContext(), DynamicPPL.Metadata())
82+
varinfo_untyped = DynamicPPL.untyped_varinfo(demo())
8383
typeof(varinfo_untyped.metadata)
8484
```
8585

src/varinfo.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,11 @@ function untyped_varinfo(
177177
)
178178
return untyped_varinfo(model, SamplingContext(rng, sampler, context), metadata)
179179
end
180+
function untyped_varinfo(
181+
model::Model, args::Union{AbstractSampler,AbstractContext,Metadata,VarNamedVector}...
182+
)
183+
return untyped_varinfo(Random.default_rng(), model, args...)
184+
end
180185
function untyped_varinfo(
181186
model::Model,
182187
context::AbstractContext,

0 commit comments

Comments
 (0)