File tree Expand file tree Collapse file tree 1 file changed +17
-10
lines changed
Expand file tree Collapse file tree 1 file changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -444,18 +444,25 @@ def _assemble_draws(self) -> None:
444444
445445 mass_matrix_per_chain : List [Optional [npt .NDArray [np .float64 ]]] = []
446446 for chain in range (self .chains ):
447- comments , draws = stancsv .parse_stan_csv_comments_and_draws (
448- self .runset .csv_files [chain ]
449- )
447+ try :
448+ comments , draws = stancsv .parse_stan_csv_comments_and_draws (
449+ self .runset .csv_files [chain ]
450+ )
450451
451- self ._draws [:, chain , :] = stancsv .csv_bytes_list_to_numpy (draws )
452+ self ._draws [:, chain , :] = stancsv .csv_bytes_list_to_numpy (
453+ draws
454+ )
452455
453- if not self ._is_fixed_param :
454- (
455- self ._step_size [chain ],
456- mass_matrix ,
457- ) = stancsv .parse_hmc_adaptation_lines (comments )
458- mass_matrix_per_chain .append (mass_matrix )
456+ if not self ._is_fixed_param :
457+ (
458+ self ._step_size [chain ],
459+ mass_matrix ,
460+ ) = stancsv .parse_hmc_adaptation_lines (comments )
461+ mass_matrix_per_chain .append (mass_matrix )
462+ except Exception as exc :
463+ raise ValueError (
464+ f"Parsing output from { self .runset .csv_files [chain ]} failed"
465+ ) from exc
459466
460467 if all (mm is not None for mm in mass_matrix_per_chain ):
461468 if self .metric_type == "diag_e" :
You can’t perform that action at this time.
0 commit comments