models
models copied to clipboard
Fail early with clear error for TensorFlow >= 2.16 incompatibility in Object Detection API
Description
This PR adds an explicit TensorFlow version compatibility guard for the Object Detection API. Currently, training fails with a cryptic ImportError when using TensorFlow >= 2.16 due to removal of Estimator support. This change fails early with a clear, actionable error message and documents the supported TensorFlow versions.
Type of change
- [x] Bug fix (non-breaking change which fixes an issue)
- [x] Documentation update
Tests
Manual verification was performed.
Test Configuration
- TensorFlow >= 2.16:
- Verified that running
model_main_tf2.pyfails immediately with a clear RuntimeError explaining the incompatibility.
- Verified that running
- TensorFlow <= 2.15:
- Verified that no early failure occurs and existing behavior is unchanged.
No automated tests were added as this change only introduces an early guard and documentation update without modifying training logic.
Checklist
- [x] I have signed the Contributor License Agreement (CLA).
- [x] I have read guidelines for pull request.
- [x] My code follows the coding guidelines.
- [x] I have performed a self code review of my own code.
- [x] I have commented my code, particularly in hard-to-understand areas.
- [x] I have made corresponding changes to the documentation.
- [x] My changes generate no new warnings.
- [ ] I have added tests that prove my fix is effective or that my feature works.
Fixes #13575