File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 256
256
257
257
@testset " model=$(model. f) " for model in DEMO_MODELS
258
258
rng = StableRNG (123 )
259
- ctx = DynamicPPL. SamplingContext (rng, DynamicPPL. Sampler (alg))
260
- @test run_ad (model, adtype; context= ctx, test= true , benchmark= false ) isa Any
259
+ spl_model = DynamicPPL. contextualize (
260
+ model, DynamicPPL. SamplingContext (rng, DynamicPPL. Sampler (alg))
261
+ )
262
+ @test run_ad (spl_model, adtype; test= true , benchmark= false ) isa Any
261
263
end
262
264
end
263
265
end
283
285
model, varnames, deepcopy (global_vi)
284
286
)
285
287
rng = StableRNG (123 )
286
- ctx = DynamicPPL. SamplingContext (rng, DynamicPPL. Sampler (HMC (0.1 , 10 )))
287
- @test run_ad (model, adtype; context= ctx, test= true , benchmark= false ) isa Any
288
+ spl_model = DynamicPPL. contextualize (
289
+ model, DynamicPPL. SamplingContext (rng, DynamicPPL. Sampler (HMC (0.1 , 10 )))
290
+ )
291
+ @test run_ad (spl_model, adtype; test= true , benchmark= false ) isa Any
288
292
end
289
293
end
290
294
end
You can’t perform that action at this time.
0 commit comments