PR #117858
tensorflow/tensorflow · Examples · Merged · 6 files changed
Replaced generic Exception handlers across 6 files in tensorflow/examples/speech_commands with specific I/O and graph-parsing exception types so corrupted SavedModels or missing checkpoints fail with actionable diagnostics.
Checkout Pull Request
Inspect the full commit history and diff locally from upstream tensorflow/tensorflow.
$gh pr checkout 117858 --repo tensorflow/tensorflowReplaced generic Exception handlers across 6 files in tensorflow/examples/speech_commands with specific I/O and graph-parsing exception types so corrupted SavedModels or missing checkpoints fail with actionable diagnostics.
File-by-File Modification Breakdown (6)
- +4 / -4
tensorflow/examples/speech_commands/freeze.py
Speech commands example script and error-handling cleanup
- +12 / -11
tensorflow/examples/speech_commands/input_data.py
Speech commands example script and error-handling cleanup
- +2 / -2
tensorflow/examples/speech_commands/input_data_test.py
Python/XLA regression test suite verifying edge-case behavior
- +5 / -5
tensorflow/examples/speech_commands/models.py
Speech commands example script and error-handling cleanup
- +1 / -1
tensorflow/examples/speech_commands/models_test.py
Python/XLA regression test suite verifying edge-case behavior
- +2 / -2
tensorflow/examples/speech_commands/train.py
Speech commands example script and error-handling cleanup
Changed Files (6)
1. Introduction & Motivation
Model freezing and audio preprocessing scripts in tensorflow/examples/speech_commands previously caught Exception broadly [1]. When a user passed a corrupted checkpoint or incompatible graph definition, the script masked the underlying TensorFlow OpError and produced misleading diagnostics.
2. Fault-Isolation & Code Example
3. References
- Warden, P., Speech Commands: A Dataset for Limited-Vocabulary Speech Recognition, arXiv:1804.03209, 2018.