File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -488,10 +488,17 @@ end
488
488
end
489
489
model = gdemo ([1.0 , 1.5 ], [2.0 , 2.5 ])
490
490
491
- # Check that instantiating the model does not perform linking
491
+ # Check that instantiating the model using SampleFromUniform does not
492
+ # perform linking
493
+ # Note (penelopeysm): The purpose of using SampleFromUniform (SFU)
494
+ # specifically in this test is because SFU samples from the linked
495
+ # distribution i.e. in unconstrained space. However, it does this not
496
+ # by linking the varinfo but by transforming the distributions on the
497
+ # fly. That's why it's worth specifically checking that it can do this
498
+ # without having to change the VarInfo object.
492
499
vi = VarInfo ()
493
500
meta = vi. metadata
494
- model (vi )
501
+ _, vi = DynamicPPL . sample!! (model, vi, SampleFromUniform () )
495
502
@test all (x -> ! istrans (vi, x), meta. vns)
496
503
497
504
# Check that linking and invlinking set the `trans` flag accordingly
You can’t perform that action at this time.
0 commit comments