Replace SQLite with JSONL for client-side fallback buffer#495
Draft
Replace SQLite with JSONL for client-side fallback buffer#495
Conversation
The client-side fallback buffer (used when the remote Trackio Space is unreachable) previously wrote to SQLite, which requires file locking and WAL journal mode -- both of which break on networked filesystems like Lustre. This caused crashes during distributed training on /fsx when the SQLite DB became corrupted. Replace with append-only JSONL files that need no locking or journal mode. Each persist/flush operation is also wrapped in try/except so a storage failure can never kill the background logging thread. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
🪼 branch checks and previews
|
Contributor
🦄 change detectedThis Pull Request includes changes to the following packages.
|
🪼 branch checks and previews
Install Trackio from this PR (includes built frontend) pip install "https://huggingface.co/buckets/trackio/trackio-wheels/resolve/bab9d8d0212bfdac65ae858e97527c155b070bac/trackio-0.22.0-py3-none-any.whl" |
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sqlite3.DatabaseError: database disk image is malformedduring distributed training on/fsx_persist_*_locallymethods are now wrapped in try/except so a storage failure can never kill the background logging threadContext
A distributed training run on 8 GPUs crashed when trackio's remote logging hit
QueueError: Queue is full!and the local SQLite fallback hit a corrupted database on Lustre. While the SQLite corruption didn't cause the training crash itself (that was a separate SIGBUS from the filesystem), it did kill the background logging thread, causing all subsequent metrics to be silently lost.Test plan
space_id, make remote server unreachable, verify JSONL files are created in~/.cache/huggingface/trackio/pending/🤖 Generated with Claude Code