Avoid CHECKs in BundleReader, propagate errors instead.
Motivation: We'd like to evolve the checkpoint format over time (e.g., enable different types of compression). Without this change, a TensorFlow version that encounters a format that it doesn't understand would CHECK fail with an unhelpful error message. With this, it propagates a clearer error message up, giving the user some hints about what could be wrong. I don't have a unittest for this - I thought about writing a bundle and then strategically corrupting the bytes on disk before reading it back, but that seems a bit much. The intention of this change is to enable graceful reporting of forward compatibility breakages. Ideas for an appropriate unittest are appreciated. PiperOrigin-RevId: 157620358
Loading
Please sign in to comment