We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 770b2f3 commit 33ae31dCopy full SHA for 33ae31d
test/varinfo.jl
@@ -46,6 +46,22 @@ include(dir*"/test/test_utils/AllUtils.jl")
46
@test all(meta.vals[range] .== fmeta.vals[trange])
47
end
48
49
+
50
+ contexts = [
51
+ DynamicPPL.DefaultContext(),
52
+ DynamicPPL.MiniBatchContext(DynamicPPL.DefaultContext(), 1.),
53
+ DynamicPPL.LikelihoodContext(),
54
+ DynamicPPL.PriorContext()
55
+ ]
56
+ vis = map(contexts) do ctx
57
+ VarInfo(model, ctx)
58
+ end
59
60
+ vns = fieldnames(typeof(first(vis).metadata)) # default context
61
+ for (vi, ctx) in zip(vis, contexts)
62
+ vns_ctx = fieldnames(typeof(vi.metadata))
63
+ @test vns_ctx == vns
64
65
66
@testset "Base" begin
67
# Test Base functions:
0 commit comments