fix: retry checksum errors when reading tfevents files#10625
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
c98cc6d to
44af9a7
Compare
jacobromero
reviewed
Oct 2, 2025
dmitryduev
approved these changes
Oct 2, 2025
Merge activity
|
44af9a7 to
f05fdf4
Compare
dmitryduev
approved these changes
Oct 10, 2025
ffe5a8b to
09aa705
Compare
09aa705 to
5fc034e
Compare
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.

Fixes WB-20957.
Retries checksum errors when syncing TensorBoard files. Previously, the integration would stop syncing tfevents files upon encountering these errors; now it logs a warning and retries later (the default delay is 5 seconds).
See this list of events:
In almost every single one, the Expected number (the checksum read from the file rather than calculated from the data) is small: usually 0, but in some instances 24, 12869, 2878429. The checksum is stored in little-endian format, so a simple explanation would be that its final (most significant) bytes are not yet written.
Unfortunately for that explanation, there are plenty of counter-examples, like this event:
A way to account for this is that the checksum and payload may be written independently, possibly using a mechanism like
mmap. Whenmmapis used, we can't assume the data in the file is final: the writer may have reserved space for the event but not yet written all its bytes. When we see an invalid checksum, we should reread the data.But still, this doesn't explain all the checksum errors we see. In some cases, the same "expected" and "actual" checksums appear in multiple events spaced hours apart, so there is probably some kind of data corruption.