Skip to content

Conversation

@pavanmudumba
Copy link

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

  • Bug fix (non-breaking change which fixes an issue)
  • Documentation update

Tests

Manual verification was performed.

Test Configuration

  • TensorFlow >= 2.16:
    • Verified that running model_main_tf2.py fails immediately with a clear RuntimeError
      explaining the incompatibility.
  • 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

  • I have signed the Contributor License Agreement (CLA).
  • I have read guidelines for pull request.
  • My code follows the coding guidelines.
  • I have performed a self code review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.

Fixes #13575

@google-cla
Copy link

google-cla bot commented Jan 11, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cannot import name 'estimator' from 'tensorflow.compat.v1'

1 participant