tensorflow / text

Making text a first-class citizen in TensorFlow.
https://www.tensorflow.org/beta/tutorials/tensorflow_text/intro
Apache License 2.0
1.23k stars 344 forks source link

TF patch is out of date #1195

Closed joker-eph closed 1 year ago

joker-eph commented 1 year ago

Trying to build from source, it seems like the tf.patch file is not applying:

#10 49.34 INFO: Repository org_tensorflow instantiated at:
#10 49.34   /opt/text/WORKSPACE:71:13: in <toplevel>
#10 49.34 Repository rule http_archive defined at:
#10 49.34   /root/.cache/bazel/_bazel_root/b4f968c26af22407e6171bb52049003f/external/bazel_tools/tools/build_defs/repo/http.bzl:372:31: in <toplevel>
#10 49.34 ERROR: An error occurred during the fetch of repository 'org_tensorflow':
#10 49.34    Traceback (most recent call last):
#10 49.34   File "/root/.cache/bazel/_bazel_root/b4f968c26af22407e6171bb52049003f/external/bazel_tools/tools/build_defs/repo/http.bzl", line 143, column 10, in _http_archive_impl
#10 49.34       patch(ctx, auth = auth)
#10 49.34   File "/root/.cache/bazel/_bazel_root/b4f968c26af22407e6171bb52049003f/external/bazel_tools/tools/build_defs/repo/utils.bzl", line 167, column 22, in patch
#10 49.34       ctx.patch(patchfile, strip)
#10 49.34 Error in patch: Error applying patch /opt/text/third_party/tensorflow/tf.patch: Cannot find file to patch (near line 41), old file name (third_party/py/non_hermetic/python_configure.bzl) doesn't exist, new file name (third_party/py/non_hermetic/python_configure.bzl) doesn't exist.
#10 49.34 ERROR: /opt/text/WORKSPACE:71:13: fetching http_archive rule //external:org_tensorflow: Traceback (most recent call last):
#10 49.34   File "/root/.cache/bazel/_bazel_root/b4f968c26af22407e6171bb52049003f/external/bazel_tools/tools/build_defs/repo/http.bzl", line 143, column 10, in _http_archive_impl
#10 49.34       patch(ctx, auth = auth)
#10 49.34   File "/root/.cache/bazel/_bazel_root/b4f968c26af22407e6171bb52049003f/external/bazel_tools/tools/build_defs/repo/utils.bzl", line 167, column 22, in patch
#10 49.34       ctx.patch(patchfile, strip)
#10 49.34 Error in patch: Error applying patch /opt/text/third_party/tensorflow/tf.patch: Cannot find file to patch (near line 41), old file name (third_party/py/non_hermetic/python_configure.bzl) doesn't exist, new file name (third_party/py/non_hermetic/python_configure.bzl) doesn't exist.
georgiyekkert commented 1 year ago

The patch works if you install tf-nightly(https://pypi.org/project/tf-nightly/) instead of tf 2.12/2.13. It will be fixed once TF 2.14 is released

cantonios commented 1 year ago

The master branch needs to built against tf-nightly, where the patch is needed.

To build against TF 2.13, use the tensorflow-text 2.13 branch.