# DataLossError: corrupted record at 12345: checksum mismatch

- **ID:** `tensorflow/data-loss-corrupted-event-file`
- **Domain:** tensorflow
- **Category:** data_error
- **Error Code:** `DLC`
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

TensorBoard event file or TFRecord file is corrupted, often due to incomplete write or disk failure.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| tensorflow 2.15.0 | active | — | — |
| tensorboard 2.15.0 | active | — | — |

## Workarounds

1. **Identify and remove the corrupted event file: locate the file (e.g., events.out.tfevents.12345), then delete it and restart TensorBoard. Example:
rm /path/to/logs/events.out.tfevents.12345
tensorboard --logdir /path/to/logs** (85% success)
   ```
   Identify and remove the corrupted event file: locate the file (e.g., events.out.tfevents.12345), then delete it and restart TensorBoard. Example:
rm /path/to/logs/events.out.tfevents.12345
tensorboard --logdir /path/to/logs
   ```
2. **Use tf.data to skip corrupted records during TFRecord reading:
import tensorflow as tf
raw_dataset = tf.data.TFRecordDataset(['data.tfrecord'])
filtered_dataset = raw_dataset.ignore_errors()
for record in filtered_dataset:
    # process record
    pass** (75% success)
   ```
   Use tf.data to skip corrupted records during TFRecord reading:
import tensorflow as tf
raw_dataset = tf.data.TFRecordDataset(['data.tfrecord'])
filtered_dataset = raw_dataset.ignore_errors()
for record in filtered_dataset:
    # process record
    pass
   ```

## Dead Ends

- **** — Does not address root cause of file corruption. (85% fail)
- **** — Overly destructive; only the corrupted file needs removal. (95% fail)
