fix(tf): find external protobuf for TensorFlow 2.21 - #5986
Conversation
Backport conda-forge/deepmd-kit-feedstock patch 0001 at d02138263b0b30629fe28c68c8bcecc2b8644513. Agent: ChatGPT Model: GPT-5.6 Sol
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe TensorFlow CMake module now preserves the runtime-discovered Protobuf library, uses its installation prefix for temporary package discovery, restores the original ChangesTensorFlow discovery
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This localized build-dependency discovery change improves TensorFlow 2.21 protobuf handling without introducing a supported merge-blocking risk; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5986 +/- ##
==========================================
- Coverage 79.10% 78.84% -0.26%
==========================================
Files 1105 1105
Lines 130981 130981
Branches 4771 4765 -6
==========================================
- Hits 103609 103272 -337
- Misses 25686 26025 +339
+ Partials 1686 1684 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
wanghan-iapcm
left a comment
There was a problem hiding this comment.
Non-blocking. The fix is sound for the environment it came from, and I confirmed the backport is byte-identical to the feedstock patch. Two notes and one fact about coverage.
Worth stating plainly: no CI job executes these lines. The branch is only entered when google/protobuf/type.pb.h is absent from the TensorFlow tree, and CI installs TensorFlow from pip wheels, which bundle that header (checked on a local pip TensorFlow: .../tensorflow/include/google/protobuf/type.pb.h is present, and it is exactly the sentinel find_path looks for at line 224). So the green checks on this PR say nothing about the change, and "Full build is left to upstream CI" does not hold for this path, because this repository's CI does not cover it. That is not a reason to block -- there is no reasonable unit test for a find-module branch like this, and adding a conda-forge-TensorFlow build job is far more than this PR should carry -- but it is worth being explicit that the change ships unexercised.
Keep an ldd-discovered protobuf library pinned while using its installation prefix to guide FindProtobuf. Fall back to the normal external package search when TensorFlow exposes no protobuf runtime dependency. Coding-Agent: Codex Codex-Version: codex-cli 0.149.0 Model: gpt-5.6-sol Reasoning-Effort: xhigh
|
The review summary coverage note is addressed as well: the PR description now explicitly states that repository CI does not execute the external-header branch and removes the previous claim that a full build was left to upstream CI. It documents the focused CMake configurations used to validate both the pinned runtime-library path and the TensorFlow 2.21 fallback path. The inline threads have been addressed and resolved, and reviews have been re-requested. Coding agent: Codex |
Summary
Adapt the conda-forge TensorFlow 2.21 external-Protobuf fix for upstream use.
Validation
Repository CI does not exercise the external-header branch because its pip TensorFlow packages bundle google/protobuf/type.pb.h. The focused CMake configurations above validate the changed lookup behavior directly.
Coding agent: Codex
Codex version: codex-cli 0.149.0
Model: gpt-5.6-sol
Reasoning effort: xhigh