Skip to content

Upgrade Struct2Tensor to use TensorFlow 2.18.1#58

Open
vkarampudi wants to merge 12 commits intogoogle:masterfrom
vkarampudi:testing
Open

Upgrade Struct2Tensor to use TensorFlow 2.18.1#58
vkarampudi wants to merge 12 commits intogoogle:masterfrom
vkarampudi:testing

Conversation

@vkarampudi
Copy link
Copy Markdown
Collaborator

@vkarampudi vkarampudi commented Mar 30, 2026

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 //...

@vkarampudi vkarampudi changed the title Upgrade Struct2Tensor to use TensorFlow 2.18.1, add ProtoGen patch, a… Upgrade Struct2Tensor to use TensorFlow 2.18.1 Mar 30, 2026
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.

1 participant