Upgrade Struct2Tensor to use TensorFlow 2.18.1#58
Open
vkarampudi wants to merge 12 commits intogoogle:masterfrom
Open
Upgrade Struct2Tensor to use TensorFlow 2.18.1#58vkarampudi wants to merge 12 commits intogoogle:masterfrom
vkarampudi wants to merge 12 commits intogoogle:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request: Upgrade to TensorFlow 2.18.1 & Fix CI Builds
This PR upgrades struct2tensor to TensorFlow 2.18.1 and resolves persistent CI build failures on both Ubuntu and macOS runners. It removes environment-specific hardcoded paths and introduces robust workarounds for build system incompatibilities.
🚀 Key Changes & Justifications
1. Workspace & Dependency Upgrades
WORKSPACE
Change: Upgraded _TENSORFLOW_GIT_COMMIT to point to TF 2.18.1 and filled in _TENSORFLOW_ARCHIVE_SHA256 (5fcca4ec0732e146547fc26f6966cf92236c2f85a9e086b85c83d303e2c38980).
Justification: To release version 0.49.0 supporting TensorFlow 2.18.1.
Change: Replaced
tensorflow.patch
with a new
proto_gen.patch
.
Justification: The old patch was specific to TF 2.17.1. The new patch is required to fix protocol buffer generation path mapping bugs in the new TF internal structure.
Change: Added local_repository for local_config_cuda pointing to third_party/cuda_stub.
Justification: TensorFlow's workspace requires this definition even if building for CPU-only. It satisfies the dependency graph without installing full CUDA.
environment.yml
Change: Upgraded pyarrow from 10.0.1 to 15.0.0.
Justification: Resolved installation failures on Apple Silicon (arm64) macOS runners.
Change: Fixed tensorboard version from 2.18.1 (which does not exist) to 2.18.0.
Justification: Resolved environment creation failures on CI.
2. CI Environment Independence
.bazelrc
Change: Removed hardcoded local python/tensorflow paths (e.g., pointing to local Anaconda environments of the developer).
Justification: Hardcoded paths caused the CI to search for directories that only existed on the developer's machine. The ./configure.sh script is now the standard mechanism to generate these paths dynamically on the runner.
3. File Cleanup & Additions
📂 third_party/cuda_stub
Change: [NEW] Added a lightweight stub repository.
Justification: Acts as a placeholder to allow building without CUDA dependencies. Required by WORKSPACE to satisfy the TensorFlow graph on CPU-only runners.
third_party/tensorflow.patch
Change: [DELETE] Removed the old patch.
Justification: Dead code, superceded by the new proto_gen.patch.
✅ Verification
The build process succeeds without hardcoded errors. You can verify by running the tests inside your conda environment.
conda run -n s2t-env ./configure.sh conda run -n s2t-env bazel build //...