@@ -104,8 +104,14 @@ using Turing
104104 )
105105 @test chn1. info. samplerstate isa AbstractVector{<: DynamicPPL.AbstractVarInfo }
106106 @test length (chn1. info. samplerstate) == nchains
107+ # TODO (penelopeysm / DPPL 0.38): use Turing.loadstate
107108 chn2 = sample (
108- demo (), StaticSampler (), MCMCThreads (), 10 , nchains; resume_from= chn1
109+ demo (),
110+ StaticSampler (),
111+ MCMCThreads (),
112+ 10 ,
113+ nchains;
114+ initial_state= chn1. info. samplerstate,
109115 )
110116 xval = chn1[:x ][1 , :]
111117 @test all (i -> chn2[:x ][i, :] == xval, 1 : 10 )
@@ -120,10 +126,24 @@ using Turing
120126 chn1 = sample (StableRNG (seed), gdemo_default, alg1, 10_000 ; save_state= true )
121127 check_gdemo (chn1)
122128
123- chn1_contd = sample (StableRNG (seed), gdemo_default, alg1, 2_000 ; resume_from= chn1)
129+ # TODO (penelopeysm / DPPL 0.38): change this to `Turing.loadstate`
130+ chn1_contd = sample (
131+ StableRNG (seed),
132+ gdemo_default,
133+ alg1,
134+ 2_000 ;
135+ initial_state= chn1. info. samplerstate,
136+ )
124137 check_gdemo (chn1_contd)
125138
126- chn1_contd2 = sample (StableRNG (seed), gdemo_default, alg1, 2_000 ; resume_from= chn1)
139+ # TODO (penelopeysm / DPPL 0.38): change this to `Turing.loadstate`
140+ chn1_contd2 = sample (
141+ StableRNG (seed),
142+ gdemo_default,
143+ alg1,
144+ 2_000 ;
145+ initial_state= chn1. info. samplerstate,
146+ )
127147 check_gdemo (chn1_contd2)
128148
129149 chn2 = sample (
@@ -136,7 +156,14 @@ using Turing
136156 )
137157 check_gdemo (chn2)
138158
139- chn2_contd = sample (StableRNG (seed), gdemo_default, alg2, 2_000 ; resume_from= chn2)
159+ # TODO (penelopeysm / DPPL 0.38): change this to `Turing.loadstate`
160+ chn2_contd = sample (
161+ StableRNG (seed),
162+ gdemo_default,
163+ alg2,
164+ 2_000 ;
165+ initial_state= chn2. info. samplerstate,
166+ )
140167 check_gdemo (chn2_contd)
141168
142169 chn3 = sample (
@@ -149,7 +176,14 @@ using Turing
149176 )
150177 check_gdemo (chn3)
151178
152- chn3_contd = sample (StableRNG (seed), gdemo_default, alg3, 5_000 ; resume_from= chn3)
179+ # TODO (penelopeysm / DPPL 0.38): change this to `Turing.loadstate`
180+ chn3_contd = sample (
181+ StableRNG (seed),
182+ gdemo_default,
183+ alg3,
184+ 5_000 ;
185+ initial_state= chn3. info. samplerstate,
186+ )
153187 check_gdemo (chn3_contd)
154188 end
155189
0 commit comments