truncate_h5_iterations¶
- jaxrens.io.restart_truncate.truncate_h5_iterations(path, restart_iteration)[source]¶
Resize every per-iteration dataset to drop rows >= restart_iteration.
Works for any of the per-iteration HDF5 logs (
.adaptation.h5,.acc_rates.h5,.max_neighbors.h5,.re_stats.h5): each carries a top-leveliterationsdataset and stores all other per-entry datasets with a matching leading axis (extensible,maxshape=(None, ...)). Every dataset whose leading axis equals the current entry count is resized to the kept length, recursing into subgroups (e.g.adjustment_stats/).