• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1load("//tensorflow:tensorflow.bzl", "py_test", "tf_py_test")
2
3package(
4    default_visibility = ["//tensorflow:internal"],
5    licenses = ["notice"],
6)
7
8py_library(
9    name = "feature_column_py",
10    srcs = ["feature_column_lib.py"],
11    srcs_version = "PY3",
12    deps = [
13        ":feature_column",
14        ":feature_column_v2",
15        "//tensorflow/python:util",
16    ],
17)
18
19py_library(
20    name = "feature_column",
21    srcs = ["feature_column.py"],
22    srcs_version = "PY3",
23    deps = [
24        ":utils",
25        "//tensorflow/python:array_ops",
26        "//tensorflow/python:check_ops",
27        "//tensorflow/python:control_flow_ops",
28        "//tensorflow/python:dtypes",
29        "//tensorflow/python:embedding_ops",
30        "//tensorflow/python:framework_ops",
31        "//tensorflow/python:init_ops",
32        "//tensorflow/python:layers_base",
33        "//tensorflow/python:lookup_ops",
34        "//tensorflow/python:math_ops",
35        "//tensorflow/python:nn_ops",
36        "//tensorflow/python:parsing_ops",
37        "//tensorflow/python:platform",
38        "//tensorflow/python:resource_variable_ops",
39        "//tensorflow/python:sparse_ops",
40        "//tensorflow/python:sparse_tensor",
41        "//tensorflow/python:string_ops",
42        "//tensorflow/python:template",
43        "//tensorflow/python:tensor_shape",
44        "//tensorflow/python:training",
45        "//tensorflow/python:util",
46        "//tensorflow/python:variable_scope",
47        "//tensorflow/python:variables",
48        "//tensorflow/python/eager:context",
49        "@six_archive//:six",
50    ],
51)
52
53py_library(
54    name = "feature_column_v2",
55    srcs = [
56        "feature_column_v2.py",
57        "sequence_feature_column.py",
58        "serialization.py",
59    ],
60    srcs_version = "PY3",
61    deps = [
62        ":feature_column",
63        ":utils",
64        "//tensorflow/python:array_ops",
65        "//tensorflow/python:check_ops",
66        "//tensorflow/python:control_flow_ops",
67        "//tensorflow/python:dtypes",
68        "//tensorflow/python:embedding_ops",
69        "//tensorflow/python:framework_ops",
70        "//tensorflow/python:init_ops",
71        "//tensorflow/python:lookup_ops",
72        "//tensorflow/python:math_ops",
73        "//tensorflow/python:parsing_ops",
74        "//tensorflow/python:platform",
75        "//tensorflow/python:sparse_ops",
76        "//tensorflow/python:sparse_tensor",
77        "//tensorflow/python:string_ops",
78        "//tensorflow/python:tensor_shape",
79        "//tensorflow/python:training",
80        "//tensorflow/python:util",
81        "//tensorflow/python:variable_scope",
82        "//tensorflow/python:variables",
83        "//tensorflow/python/eager:context",
84        "//tensorflow/python/trackable:autotrackable",
85        "//tensorflow/python/trackable:base",
86        "//tensorflow/python/trackable:data_structures",
87        "//tensorflow/python/trackable:resource",
88        "//tensorflow/python/util:tf_export",
89        "//third_party/py/numpy",
90        "@six_archive//:six",
91    ],
92)
93
94filegroup(
95    name = "vocabulary_testdata",
96    srcs = [
97        "testdata/embedding.ckpt.data-00000-of-00001",
98        "testdata/embedding.ckpt.index",
99        "testdata/embedding.ckpt.meta",
100        "testdata/unicode_vocabulary",
101        "testdata/unicode_vocabulary.tfrecord.gz",
102        "testdata/warriors_vocabulary.tfrecord.gz",
103        "testdata/warriors_vocabulary.txt",
104        "testdata/wire_vocabulary.tfrecord.gz",
105        "testdata/wire_vocabulary.txt",
106    ],
107)
108
109tf_py_test(
110    name = "feature_column_test",
111    srcs = ["feature_column_test.py"],
112    tags = [
113        "no_cuda_on_cpu_tap",
114        "no_oss",  # TODO(b/206860622): Broken with numpy 1.20+
115        "no_pip",
116        "no_rocm",
117        "no_windows",
118    ],
119    deps = [
120        ":feature_column_test_main_lib",
121    ],
122)
123
124py_library(
125    name = "feature_column_test_main_lib",
126    srcs = ["feature_column_test.py"],
127    data = [":vocabulary_testdata"],
128    srcs_version = "PY3",
129    deps = [
130        ":feature_column",
131        ":feature_column_py",
132        "//tensorflow/core:protos_all_py",
133        "//tensorflow/python:array_ops",
134        "//tensorflow/python:client_testlib",
135        "//tensorflow/python:constant_op",
136        "//tensorflow/python:dtypes",
137        "//tensorflow/python:errors",
138        "//tensorflow/python:framework_ops",
139        "//tensorflow/python:framework_test_lib",
140        "//tensorflow/python:lookup_ops",
141        "//tensorflow/python:parsing_ops",
142        "//tensorflow/python:partitioned_variables",
143        "//tensorflow/python:session",
144        "//tensorflow/python:sparse_tensor",
145        "//tensorflow/python:training",
146        "//tensorflow/python:variable_scope",
147        "//tensorflow/python:variables",
148        "//tensorflow/python/eager:backprop",
149        "//tensorflow/python/eager:context",
150        "//third_party/py/numpy",
151    ],
152)
153
154tf_py_test(
155    name = "feature_column_v2_test",
156    srcs = ["feature_column_v2_test.py"],
157    shard_count = 5,
158    tags = [
159        "no_cuda_on_cpu_tap",
160        "no_oss",  # TODO(b/206860622): Broken with numpy 1.20+
161        "no_pip",
162        "no_rocm",
163        "no_windows",
164    ],
165    deps = [":feature_column_v2_test_main_lib"],
166)
167
168py_library(
169    name = "feature_column_v2_test_main_lib",
170    srcs = ["feature_column_v2_test.py"],
171    data = [":vocabulary_testdata"],
172    srcs_version = "PY3",
173    deps = [
174        ":feature_column_py",
175        ":feature_column_v2",
176        "//tensorflow/core:protos_all_py",
177        "//tensorflow/python:array_ops",
178        "//tensorflow/python:client_testlib",
179        "//tensorflow/python:constant_op",
180        "//tensorflow/python:dtypes",
181        "//tensorflow/python:errors",
182        "//tensorflow/python:framework_ops",
183        "//tensorflow/python:framework_test_lib",
184        "//tensorflow/python:lookup_ops",
185        "//tensorflow/python:parsing_ops",
186        "//tensorflow/python:partitioned_variables",
187        "//tensorflow/python:session",
188        "//tensorflow/python:sparse_tensor",
189        "//tensorflow/python:training",
190        "//tensorflow/python:variable_scope",
191        "//tensorflow/python:variables",
192        "//tensorflow/python/eager:backprop",
193        "//tensorflow/python/eager:context",
194        "//third_party/py/numpy",
195    ],
196)
197
198py_library(
199    name = "utils",
200    srcs = ["utils.py"],
201    srcs_version = "PY3",
202    deps = [
203        "//tensorflow/python:array_ops",
204        "//tensorflow/python:dtypes",
205        "//tensorflow/python:framework_ops",
206        "//tensorflow/python:math_ops",
207        "//tensorflow/python:util",
208    ],
209)
210
211tf_py_test(
212    name = "sequence_feature_column_test",
213    srcs = ["sequence_feature_column_test.py"],
214    tags = ["no_oss"],  # Due to the usage of keras component.
215    deps = [
216        ":feature_column_v2",
217        "//tensorflow/python:client_testlib",
218        "//tensorflow/python:dtypes",
219        "//tensorflow/python:errors",
220        "//tensorflow/python:framework_ops",
221        "//tensorflow/python:math_ops",
222        "//tensorflow/python:parsing_ops",
223        "//tensorflow/python:session",
224        "//tensorflow/python:sparse_tensor",
225        "//tensorflow/python:training",
226        "//third_party/py/numpy",
227        "@absl_py//absl/testing:parameterized",
228    ],
229)
230
231py_test(
232    name = "sequence_feature_column_integration_test",
233    srcs = ["sequence_feature_column_integration_test.py"],
234    python_version = "PY3",
235    srcs_version = "PY3",
236    tags = ["no_pip"],
237    deps = [
238        ":feature_column_v2",
239        "//tensorflow/python:client_testlib",
240        "//tensorflow/python:parsing_ops",
241        "//tensorflow/python:util",
242    ],
243)
244
245tf_py_test(
246    name = "serialization_test",
247    srcs = ["serialization_test.py"],
248    deps = [
249        ":feature_column_v2",
250        "//tensorflow/python:client_testlib",
251        "//tensorflow/python:util",
252        "@absl_py//absl/testing:parameterized",
253    ],
254)
255