Skip to content

Commit b84ab99

Browse files
AleksMatcantonios
authored andcommitted
Internal change.
PiperOrigin-RevId: 832049745
1 parent f0c7929 commit b84ab99

File tree

7 files changed

+28
-14
lines changed

7 files changed

+28
-14
lines changed

oss_scripts/pip_package/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ py_binary(
2222
name = "tensorflow_build_info",
2323
srcs = ["tensorflow_build_info.py"],
2424
deps = [
25-
"@absl_py//absl:app",
25+
"//third_party/py/absl:app",
2626
"@release_or_nightly//:tensorflow_pkg",
2727
],
2828
)

tensorflow_text/BUILD

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ py_library(
7777
"python/ops/__init__.py",
7878
"tools/__init__.py",
7979
],
80+
# TODO: b/459693180 - Opt in the library for lazy imports as this will yield a significant
81+
# performance gain for some of its users. This is currently not possible as it breaks a number
82+
# of tests in //third_party/tensorflow_text/.
83+
lazy_imports = False,
8084
deps = [
8185
":bert_tokenizer",
8286
":boise_offset_converter",

tensorflow_text/core/kernels/BUILD

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@ load("@rules_cc//cc:cc_test.bzl", "cc_test")
66

77
# Placeholder: load proto_library
88
load("//tensorflow_text:tftext.bzl", "tf_cc_library", "tflite_cc_library")
9+
load("//tools/build_defs/license:license.bzl", "license")
910
# [internal] load cc_proto_library.bzl
1011

1112
licenses(["notice"])
1213

1314
# Visibility rules
14-
package(default_visibility = ["//visibility:public"])
15+
package(
16+
default_applicable_licenses = ["//tensorflow_text/core/kernels:license"],
17+
default_visibility = ["//visibility:public"],
18+
)
1519

1620
exports_files(["LICENSE"])
1721

@@ -238,7 +242,6 @@ tf_cc_library(
238242
"@com_google_absl//absl/status",
239243
"@com_google_absl//absl/status:statusor",
240244
"@com_google_absl//absl/strings",
241-
"//third_party/icu/data:icu_normalization_data",
242245
"@icu//:common",
243246
"@icu//:nfkc_cf", # Needed for NFKC_Casefold Unicode Normalization form.
244247
"@com_googlesource_code_re2//:re2",
@@ -413,7 +416,7 @@ cc_test(
413416
":fast_wordpiece_tokenizer_model_builder",
414417
"@com_google_googletest//:gtest_main",
415418
"@com_google_absl//absl/flags:flag",
416-
"//third_party/icu:headers",
419+
"@icu//:headers",
417420
# tf:lib tensorflow dep,
418421
],
419422
)
@@ -681,7 +684,6 @@ tf_cc_library(
681684
],
682685
deps = [
683686
":edit_changes_cc_proto",
684-
"//third_party/icu/data:icu_normalization_data",
685687
"@com_google_absl//absl/strings",
686688
"@icu//:nfkc",
687689
"@icu//:nfkc_cf",
@@ -1407,3 +1409,8 @@ cc_test(
14071409
"//tensorflow_text:wordpiece_tokenizer_cc",
14081410
],
14091411
)
1412+
1413+
license(
1414+
name = "license",
1415+
package_name = "kernels",
1416+
)

tensorflow_text/core/kernels/sentencepiece/BUILD

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ load("//tensorflow_text:tftext.bzl", "tf_cc_library", "tflite_cc_library")
99
licenses(["notice"])
1010

1111
# Visibility rules
12-
package(default_visibility = ["//visibility:public"])
12+
package(
13+
default_applicable_licenses = ["//tensorflow_text/core/kernels:license"],
14+
default_visibility = ["//visibility:public"],
15+
)
1316

1417
filegroup(
1518
name = "testdata",

tensorflow_text/core/pybinds/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Code that exposes C++ libraries to Python via pybind11.
22

33
# Placeholder: load py_test
4-
load("@org_tensorflow//tensorflow:tensorflow.bzl", "pybind_extension")
4+
load("//third_party/tensorflow:tensorflow.google.bzl", "pybind_extension")
55

66
licenses(["notice"])
77

third_party/sentencepiece/BUILD

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ cc_library(
4444
"src/common.h",
4545
],
4646
deps = [
47-
"@com_google_absl//absl/base",
47+
"//third_party/absl/base",
4848
],
4949
)
5050

@@ -88,11 +88,11 @@ cc_library(
8888
":common",
8989
":sentencepiece_cc_proto",
9090
":sentencepiece_model_cc_proto",
91-
"@com_google_absl//absl/container:flat_hash_map",
92-
"@com_google_absl//absl/container:flat_hash_set",
93-
"@com_google_absl//absl/memory",
94-
"@com_google_absl//absl/strings",
95-
"@com_google_absl//absl/strings:str_format",
96-
"@darts_clone",
91+
"//third_party/absl/container:flat_hash_map",
92+
"//third_party/absl/container:flat_hash_set",
93+
"//third_party/absl/memory",
94+
"//third_party/absl/strings",
95+
"//third_party/absl/strings:str_format",
96+
"//third_party/darts_clone",
9797
],
9898
)

0 commit comments

Comments
 (0)