File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -224,6 +224,7 @@ pub struct ChainProgress {
224224 pub total_num_steps : usize ,
225225 pub step_size : f64 ,
226226 pub runtime : Duration ,
227+ pub divergent_draws : Vec < usize > ,
227228}
228229
229230impl ChainProgress {
@@ -238,14 +239,16 @@ impl ChainProgress {
238239 step_size : 0f64 ,
239240 total_num_steps : 0 ,
240241 runtime : Duration :: ZERO ,
242+ divergent_draws : Vec :: new ( ) ,
241243 }
242244 }
243245
244246 fn update ( & mut self , stats : & SampleStats , draw_duration : Duration ) {
245- self . finished_draws += 1 ;
246247 if stats. diverging & !stats. tuning {
247248 self . divergences += 1 ;
249+ self . divergent_draws . push ( self . finished_draws ) ;
248250 }
251+ self . finished_draws += 1 ;
249252 self . tuning = stats. tuning ;
250253
251254 self . latest_num_steps = stats. num_steps ;
You can’t perform that action at this time.
0 commit comments