Skip to content

H5 and Loggers fixes#257

Merged
guillaume-byte merged 2 commits into
devfrom
fix_h5_bugs_and_save_logger_feature
Jul 21, 2026
Merged

H5 and Loggers fixes#257
guillaume-byte merged 2 commits into
devfrom
fix_h5_bugs_and_save_logger_feature

Conversation

@guillaume-byte

@guillaume-byte guillaume-byte commented Jul 20, 2026

Copy link
Copy Markdown
Member

This pull request introduces major improvements to the durability and reliability of signal history logging and HDF5 array storage. The logger now supports on-disk persistence via DuckDB, ensuring experiment signal histories are durably stored and checkpointed alongside model weights. The HDF5 array store is made robust against concurrent read/write issues that previously led to file corruption. The old JSON-based logger snapshot system is removed in favor of this new, more efficient approach.

Signal history logging and checkpointing:

  • Added on-disk DuckDB persistence for the signal-history logger (LoggerQueue), including automatic migration from in-memory DB and reliable checkpointing during experiment saves. The logger now checkpoints its history to disk instead of saving JSON snapshots, and the checkpoint manager coordinates this process.

  • Removed the old save_logger_snapshot method and all related JSON/zstd snapshotting logic, simplifying logger state management.

Concurrency and corruption fixes for HDF5 array store:

  • Improved save_array and save_arrays_batch in H5ArrayStore to acquire an exclusive write lock before opening the HDF5 file in write mode, preventing concurrent read/write access that could corrupt the file.

  • Enhanced error handling and backup logic in save_arrays_batch to distinguish between cases where the main file was actually modified (and needs rollback) versus untouched (where backup can be safely deleted).

These changes significantly improve experiment reproducibility, logger durability, and data integrity for concurrent workloads.

@guillaume-byte
guillaume-byte merged commit 671270b into dev Jul 21, 2026
13 of 14 checks passed
@guillaume-byte
guillaume-byte deleted the fix_h5_bugs_and_save_logger_feature branch July 21, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant