Skip to content

Upgrade Struct2Tensor to use TensorFlow 2.18.1#58

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

Upgrade Struct2Tensor to use TensorFlow 2.18.1#58
vkarampudi wants to merge 15 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. 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 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
configure.sh Outdated
write_to_bazelrc "build --action_env $1=\"$2\""
}


Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why extra spaces here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved

Thanks!!

environment.yml Outdated
- protobuf==4.25.8
- pyarrow==10.0.1
- pyarrow==15.0.0

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove the extra new lines in this file too?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved

Thanks!!

Copy link
Copy Markdown

@cantonios cantonios left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think your description is out-of-date too. I don't see any changes to .bazelrc, for example.

@cantonios
Copy link
Copy Markdown

@hassler-google
@iindyk

@vkarampudi vkarampudi requested a review from cantonios April 8, 2026 19:41
@vkarampudi vkarampudi closed this Apr 10, 2026
@vkarampudi vkarampudi reopened this Apr 10, 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.

2 participants