AccRatesLogger¶
- class jaxrens.io.acc_rates_log.AccRatesLogger(path, move_names, n_runs, flush_interval=1000, mode='w', restart_iteration=0)[source]¶
Bases:
BufferedH5LoggerAppend-only HDF5 writer for per-iteration chain acc counts.
Buffers writes in memory and flushes once the NS iteration index has advanced by
flush_intervalsince the last flush (and onclose()). The threshold is in absolute NS iterations; per-walker YAML units are handled upstream by_apply_interval_unitsexactly like every other*_intervalfield. The file is only created on the first flush, so runs without the callback never produce an empty artefact.- Parameters:
path (Path | str) – Destination file path (.acc_rates.h5).
n_runs (int) – Number of parallel NS runs (use 1 for single-run).
flush_interval (int) – Flush after the NS iteration index has advanced by this many absolute iterations since the previous flush. Default 1000.
mode (str)
restart_iteration (int)
- write_entry(iteration, n_accepted, n_proposed)[source]¶
Buffer one entry. Auto-flushes once the iteration index has advanced by
flush_intervalabsolute iters since the last flush.