tensorflow / addons

Useful extra functionality for TensorFlow 2.x maintained by SIG-addons
Apache License 2.0
1.69k stars 610 forks source link

Cannot build tensorflow addons with TF 2.14 #2849

Closed trevor-m closed 9 months ago

trevor-m commented 11 months ago

System information

Describe the bug

Bazel build fails with the following error which looks related to the recent hermetic python changes in TF2.14.

#43 71.88 Analyzing: target //:build_pip_pkg (1 packages loaded, 0 targets configured)
#43 72.90 Analyzing: target //:build_pip_pkg (20 packages loaded, 101 targets configured)
#43 73.05 INFO: Repository go_sdk instantiated at:
#43 73.05   /opt/tensorflow/tf-addons/WORKSPACE:32:14: in <toplevel>
#43 73.05   /root/.cache/bazel/_bazel_root/81bbe6448980452f7a50e79b39fc5624/external/org_tensorflow/tensorflow/workspace0.bzl:135:20: in workspace
#43 73.05   /root/.cache/bazel/_bazel_root/81bbe6448980452f7a50e79b39fc5624/external/com_github_grpc_grpc/bazel/grpc_extra_deps.bzl:36:27: in grpc_extra_deps
#43 73.05   /root/.cache/bazel/_bazel_root/81bbe6448980452f7a50e79b39fc5624/external/io_bazel_rules_go/go/private/sdk.bzl:431:28: in go_register_toolchains
#43 73.05   /root/.cache/bazel/_bazel_root/81bbe6448980452f7a50e79b39fc5624/external/io_bazel_rules_go/go/private/sdk.bzl:130:21: in go_download_sdk
#43 73.05 Repository rule _go_download_sdk defined at:
#43 73.05   /root/.cache/bazel/_bazel_root/81bbe6448980452f7a50e79b39fc5624/external/io_bazel_rules_go/go/private/sdk.bzl:117:35: in <toplevel>
#43 73.11 ERROR: /root/.cache/bazel/_bazel_root/81bbe6448980452f7a50e79b39fc5624/external/bazel_tools/src/tools/launcher/BUILD:9:14: While resolving toolchains for target @bazel_tools//src/tools/launcher:launcher: invalid registered toolchain '@local_execution_config_python//:py_toolchain': error loading package '@local_execution_config_python//': Unable to find package for @python//:defs.bzl: The repository '@python' could not be resolved: Repository '@python' is not defined.

Code to reproduce the issue

# install Tensorflow 2.14-rc1
python3 configure.py
bazel build build_pip_pkg
seanpmorgan commented 11 months ago

tyvm Trevor, we'll track this issue as we start our build for the new RC. In general, we only commit to TFA working with stable releases of TF: https://github.com/tensorflow/addons#nightly-builds

Nonetheless we will start working for a smooth build on TF2.14 release

trevor-m commented 11 months ago

Thanks @seanpmorgan!