@@ -41,7 +41,9 @@ using Turing
4141 Random. seed! (5 )
4242 chain2 = sample (model, sampler, MCMCThreads (), 10 , 4 )
4343
44- @test chain1. value == chain2. value
44+ # For HMC, the first step does not have stats, so we need to use isequal to
45+ # avoid comparing `missing`s
46+ @test isequal (chain1. value, chain2. value)
4547 end
4648
4749 # Should also be stable with an explicit RNG
@@ -54,7 +56,7 @@ using Turing
5456 Random. seed! (rng, local_seed)
5557 chain2 = sample (rng, model, sampler, MCMCThreads (), 10 , 4 )
5658
57- @test chain1. value == chain2. value
59+ @test isequal ( chain1. value, chain2. value)
5860 end
5961 end
6062
@@ -608,8 +610,8 @@ using Turing
608610
609611 @testset " names_values" begin
610612 ks, xs = Turing. Inference. names_values ([(a= 1 ,), (b= 2 ,), (a= 3 , b= 4 )])
611- @test all (xs[:, 1 ] .=== [1 , missing , 3 ])
612- @test all (xs[:, 2 ] .=== [missing , 2 , 4 ])
613+ @test isequal (xs[:, 1 ], [1 , missing , 3 ])
614+ @test isequal (xs[:, 2 ], [missing , 2 , 4 ])
613615 end
614616
615617 @testset " check model" begin
0 commit comments