• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Description:
2#   Labels for TensorFlow.
3
4licenses(["notice"])  # Apache 2.0
5
6exports_files(["LICENSE"])
7
8package(default_visibility = ["//tensorflow:__subpackages__"])
9
10load("//tensorflow:tensorflow.bzl", "py_test")
11
12py_library(
13    name = "labeled_tensor",
14    srcs = ["__init__.py"],
15    srcs_version = "PY2AND3",
16    deps = [
17        ":core",
18        ":io_ops",
19        ":nn",
20        ":ops",
21        ":sugar",
22    ],
23)
24
25# Transitive dependencies of this target will be included in the pip package.
26py_library(
27    name = "labeled_tensor_pip",
28    deps = [
29        ":labeled_tensor",
30        ":test_util",
31    ],
32)
33
34py_library(
35    name = "_typecheck",
36    srcs = ["python/ops/_typecheck.py"],
37    srcs_version = "PY2AND3",
38    visibility = [":__subpackages__"],
39    deps = ["//tensorflow/python:util"],
40)
41
42py_library(
43    name = "core",
44    srcs = ["python/ops/core.py"],
45    srcs_version = "PY2AND3",
46    deps = [
47        ":_typecheck",
48        "//tensorflow/python:array_ops",
49        "//tensorflow/python:framework_for_generated_wrappers",
50        "//tensorflow/python:math_ops",
51        "//third_party/py/numpy",
52        "@six_archive//:six",
53    ],
54)
55
56py_library(
57    name = "test_util",
58    srcs = ["python/ops/test_util.py"],
59    srcs_version = "PY2AND3",
60    deps = [
61        "//tensorflow/python:client_testlib",
62        "//tensorflow/python:training",
63    ],
64)
65
66py_test(
67    name = "core_test",
68    size = "medium",
69    srcs = [
70        "python/ops/core_test.py",
71    ],
72    srcs_version = "PY2AND3",
73    deps = [
74        ":_typecheck",
75        ":core",
76        ":test_util",
77        "//tensorflow/python:array_ops",
78        "//tensorflow/python:client_testlib",
79        "//tensorflow/python:framework_for_generated_wrappers",
80        "//tensorflow/python:math_ops",
81        "//third_party/py/numpy",
82    ],
83)
84
85py_library(
86    name = "io_ops",
87    srcs = ["python/ops/io_ops.py"],
88    srcs_version = "PY2AND3",
89    deps = [
90        ":_typecheck",
91        ":core",
92        "//tensorflow/python:array_ops",
93        "//tensorflow/python:framework_for_generated_wrappers",
94        "//tensorflow/python:parsing_ops",
95        "@six_archive//:six",
96    ],
97)
98
99py_test(
100    name = "io_ops_test",
101    size = "small",
102    srcs = [
103        "python/ops/io_ops_test.py",
104    ],
105    srcs_version = "PY2AND3",
106    deps = [
107        ":core",
108        ":io_ops",
109        ":test_util",
110        "//tensorflow/core:protos_all_py",
111        "//tensorflow/python:array_ops",
112        "//tensorflow/python:client_testlib",
113        "//tensorflow/python:framework_for_generated_wrappers",
114        "//tensorflow/python:session",
115    ],
116)
117
118py_library(
119    name = "nn",
120    srcs = ["python/ops/nn.py"],
121    srcs_version = "PY2AND3",
122    deps = [
123        ":core",
124        "//tensorflow/contrib/nn:nn_py",
125        "//tensorflow/python:nn",
126    ],
127)
128
129py_test(
130    name = "nn_test",
131    size = "small",
132    srcs = [
133        "python/ops/nn_test.py",
134    ],
135    srcs_version = "PY2AND3",
136    deps = [
137        ":core",
138        ":nn",
139        ":test_util",
140        "//tensorflow/python:nn",
141        "//tensorflow/python:nn_ops",
142    ],
143)
144
145py_library(
146    name = "ops",
147    srcs = ["python/ops/ops.py"],
148    srcs_version = "PY2AND3",
149    deps = [
150        ":_typecheck",
151        ":core",
152        "//tensorflow/python:array_ops",
153        "//tensorflow/python:framework_for_generated_wrappers",
154        "//tensorflow/python:functional_ops",
155        "//tensorflow/python:math_ops",
156        "//tensorflow/python:numerics",
157        "//tensorflow/python:random_ops",
158        "//tensorflow/python:training",
159        "//third_party/py/numpy",
160        "@six_archive//:six",
161    ],
162)
163
164py_test(
165    name = "ops_test",
166    size = "medium",
167    srcs = [
168        "python/ops/ops_test.py",
169    ],
170    srcs_version = "PY2AND3",
171    deps = [
172        ":core",
173        ":ops",
174        ":test_util",
175        "//tensorflow/python:array_ops",
176        "//tensorflow/python:client_testlib",
177        "//tensorflow/python:errors",
178        "//tensorflow/python:framework_for_generated_wrappers",
179        "//tensorflow/python:math_ops",
180        "//tensorflow/python:string_ops",
181        "//third_party/py/numpy",
182    ],
183)
184
185py_library(
186    name = "sugar",
187    srcs = ["python/ops/sugar.py"],
188    srcs_version = "PY2AND3",
189    deps = [
190        ":_typecheck",
191        ":core",
192        ":ops",
193        "//tensorflow/python:framework_for_generated_wrappers",
194        "@six_archive//:six",
195    ],
196)
197
198py_test(
199    name = "sugar_test",
200    size = "small",
201    srcs = [
202        "python/ops/sugar_test.py",
203    ],
204    srcs_version = "PY2AND3",
205    deps = [
206        ":core",
207        ":ops",
208        ":sugar",
209        ":test_util",
210        "//tensorflow/python:array_ops",
211        "//tensorflow/python:client_testlib",
212        "//tensorflow/python:framework_for_generated_wrappers",
213        "//tensorflow/python:math_ops",
214    ],
215)
216
217filegroup(
218    name = "all_files",
219    srcs = glob(
220        ["**/*"],
221        exclude = [
222            "**/METADATA",
223            "**/OWNERS",
224        ],
225    ),
226)
227