• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Description:
2#   Contains TF Learn (aka Scikit Flow) sub-project with high level tensorflow API.
3
4licenses(["notice"])  # Apache 2.0
5
6exports_files(["LICENSE"])
7
8load("//tensorflow:tensorflow.bzl", "py_test")
9
10package(default_visibility = [
11    "//engedu/ml/tf_from_scratch:__pkg__",
12    "//tensorflow:internal",
13])
14
15load("//tensorflow:tensorflow.bzl", "py_test", "tf_py_test")
16
17py_library(
18    name = "learn",
19    srcs = [
20        "__init__.py",
21        "python/__init__.py",
22    ] + glob(
23        ["python/learn/**/*.py"],
24        exclude = ["python/learn/**/*_test.py"],
25    ),
26    srcs_version = "PY2AND3",
27    visibility = [
28        "//learning/brain:__subpackages__",
29        "//tensorflow:__subpackages__",
30        "//video/youtube/personalization:__subpackages__",
31    ],
32    # This library should not depend on sklearn, even though some of the code
33    # refers to it. (The code handles the presence of sklearn conditionally.)
34    deps = [
35        "//tensorflow/contrib/factorization:factorization_py",
36        "//tensorflow/contrib/framework:framework_py",
37        "//tensorflow/contrib/input_pipeline:input_pipeline_py",
38        "//tensorflow/contrib/layers:layers_py",
39        "//tensorflow/contrib/learn/python/learn/datasets",
40        "//tensorflow/contrib/linear_optimizer:sdca_ops_py",
41        "//tensorflow/contrib/lookup:lookup_py",
42        "//tensorflow/contrib/losses:losses_py",
43        "//tensorflow/contrib/meta_graph_transform",
44        "//tensorflow/contrib/metrics:metrics_py",
45        "//tensorflow/contrib/rnn:rnn_py",
46        "//tensorflow/contrib/session_bundle:exporter",
47        "//tensorflow/contrib/session_bundle:gc",
48        "//tensorflow/contrib/tpu:tpu_estimator",
49        "//tensorflow/contrib/training:training_py",
50        "//tensorflow/core:protos_all_py",
51        "//tensorflow/python:array_ops",
52        "//tensorflow/python:check_ops",
53        "//tensorflow/python:client",
54        "//tensorflow/python:clip_ops",
55        "//tensorflow/python:control_flow_ops",
56        "//tensorflow/python:data_flow_ops",
57        "//tensorflow/python:errors",
58        "//tensorflow/python:framework",
59        "//tensorflow/python:framework_for_generated_wrappers",
60        "//tensorflow/python:functional_ops",
61        "//tensorflow/python:gradients",
62        "//tensorflow/python:init_ops",
63        "//tensorflow/python:io_ops",
64        "//tensorflow/python:logging_ops",
65        "//tensorflow/python:lookup_ops",
66        "//tensorflow/python:math_ops",
67        "//tensorflow/python:metrics",
68        "//tensorflow/python:nn",
69        "//tensorflow/python:parsing_ops",
70        "//tensorflow/python:partitioned_variables",
71        "//tensorflow/python:platform",
72        "//tensorflow/python:random_seed",
73        "//tensorflow/python:resources",
74        "//tensorflow/python:rnn",
75        "//tensorflow/python:session",
76        "//tensorflow/python:sparse_ops",
77        "//tensorflow/python:sparse_tensor",
78        "//tensorflow/python:state_ops",
79        "//tensorflow/python:string_ops",
80        "//tensorflow/python:summary",
81        "//tensorflow/python:tensor_util",
82        "//tensorflow/python:training",
83        "//tensorflow/python:util",
84        "//tensorflow/python:variable_scope",
85        "//tensorflow/python:variables",
86        "//tensorflow/python:weights_broadcast_ops",
87        "//tensorflow/python/estimator:estimator_py",
88        "//tensorflow/python/feature_column",
89        "//tensorflow/python/feature_column:feature_column_py",
90        "//tensorflow/python/ops/losses",
91        "//tensorflow/python/saved_model:builder",
92        "//tensorflow/python/saved_model:loader",
93        "//tensorflow/python/saved_model:signature_constants",
94        "//tensorflow/python/saved_model:signature_def_utils",
95        "//tensorflow/python/saved_model:tag_constants",
96        "//third_party/py/numpy",
97        "@six_archive//:six",
98    ],
99)
100
101# Exposes constants without having to build the entire :learn target.
102py_library(
103    name = "estimator_constants_py",
104    srcs = [
105        "python/learn/estimators/constants.py",
106        "python/learn/estimators/prediction_key.py",
107    ],
108    srcs_version = "PY2AND3",
109)
110
111py_test(
112    name = "data_feeder_test",
113    size = "small",
114    srcs = ["python/learn/learn_io/data_feeder_test.py"],
115    srcs_version = "PY2AND3",
116    deps = [
117        ":learn",
118        "//tensorflow/python:client_testlib",
119        "//tensorflow/python:framework_for_generated_wrappers",
120        "//tensorflow/python:framework_test_lib",
121        "//third_party/py/numpy",
122        "@six_archive//:six",
123    ],
124)
125
126py_test(
127    name = "estimators_test",
128    size = "small",
129    srcs = ["python/learn/estimators/estimators_test.py"],
130    srcs_version = "PY2AND3",
131    deps = [
132        ":learn",
133        "//tensorflow/contrib/framework:framework_py",
134        "//tensorflow/contrib/learn/python/learn/datasets",
135        "//tensorflow/python:client_testlib",
136        "//tensorflow/python:framework_for_generated_wrappers",
137        "//tensorflow/python:string_ops",
138        "//tensorflow/python:training",
139        "//tensorflow/python:variables",
140        "//third_party/py/numpy",
141    ],
142)
143
144py_test(
145    name = "metric_spec_test",
146    size = "small",
147    srcs = ["python/learn/metric_spec_test.py"],
148    srcs_version = "PY2AND3",
149    deps = [
150        ":learn",
151        "//tensorflow/python:client_testlib",
152    ],
153)
154
155tf_py_test(
156    name = "experiment_test",
157    size = "medium",
158    srcs = ["python/learn/experiment_test.py"],
159    additional_deps = [
160        ":learn",
161        "//tensorflow/contrib/layers:layers_py",
162        "//tensorflow/core:protos_all_py",
163        "//tensorflow/python:client_testlib",
164        "//tensorflow/python:platform",
165        "//tensorflow/python:session",
166        "//tensorflow/python:training",
167        "//tensorflow/python:util",
168        "//tensorflow/python:variables",
169        "//tensorflow/python/estimator:estimator_py",
170    ],
171)
172
173py_test(
174    name = "export_strategy_test",
175    size = "small",
176    srcs = ["python/learn/export_strategy_test.py"],
177    srcs_version = "PY2AND3",
178    deps = [
179        ":learn",
180        "//tensorflow/python:client_testlib",
181    ],
182)
183
184py_test(
185    name = "graph_actions_test",
186    size = "small",
187    srcs = ["python/learn/graph_actions_test.py"],
188    srcs_version = "PY2AND3",
189    tags = ["no_windows"],  # TODO: needs investigation on Windows
190    deps = [
191        ":learn",
192        "//tensorflow/contrib/framework:framework_py",
193        "//tensorflow/contrib/testing:testing_py",
194        "//tensorflow/python:client_testlib",
195        "//tensorflow/python:control_flow_ops",
196        "//tensorflow/python:extra_py_tests_deps",
197        "//tensorflow/python:framework_for_generated_wrappers",
198        "//tensorflow/python:resources",
199        "//tensorflow/python:state_ops",
200        "//tensorflow/python:summary",
201        "//tensorflow/python:test_ops",
202        "//tensorflow/python:training",
203        "//tensorflow/python:variables",
204    ],
205)
206
207py_test(
208    name = "learn_runner_test",
209    size = "small",
210    srcs = ["python/learn/learn_runner_test.py"],
211    srcs_version = "PY2AND3",
212    deps = [
213        ":learn",
214        "//tensorflow/contrib/training:training_py",
215        "//tensorflow/python:client_testlib",
216        "//tensorflow/python:platform",
217        "//tensorflow/python/estimator:estimator_py",
218    ],
219)
220
221py_test(
222    name = "monitors_test",
223    size = "small",
224    srcs = ["python/learn/monitors_test.py"],
225    srcs_version = "PY2AND3",
226    tags = ["no_pip_gpu"],  # b/74437598
227    deps = [
228        ":learn",
229        "//tensorflow/contrib/framework:framework_py",
230        "//tensorflow/contrib/testing:testing_py",
231        "//tensorflow/python:client",
232        "//tensorflow/python:client_testlib",
233        "//tensorflow/python:framework_for_generated_wrappers",
234        "//tensorflow/python:framework_test_lib",
235        "//tensorflow/python:math_ops",
236        "//tensorflow/python:platform",
237        "//tensorflow/python:session",
238        "//tensorflow/python:state_ops",
239        "//tensorflow/python:summary",
240        "//tensorflow/python:training",
241        "//tensorflow/python:variables",
242        "//tensorflow/python/estimator:estimator_py",
243    ],
244)
245
246py_test(
247    name = "run_config_test",
248    size = "small",
249    srcs = ["python/learn/estimators/run_config_test.py"],
250    srcs_version = "PY2AND3",
251    deps = [
252        ":learn",
253        "//tensorflow/core:protos_all_py",
254        "//tensorflow/python:client_testlib",
255        "//tensorflow/python:training",
256        "//tensorflow/python/estimator:estimator_py",
257    ],
258)
259
260py_test(
261    name = "tensor_signature_test",
262    srcs = ["python/learn/estimators/tensor_signature_test.py"],
263    srcs_version = "PY2AND3",
264    deps = [
265        ":learn",
266        "//tensorflow/python:array_ops",
267        "//tensorflow/python:client_testlib",
268        "//tensorflow/python:framework_for_generated_wrappers",
269        "//tensorflow/python:sparse_tensor",
270    ],
271)
272
273py_test(
274    name = "estimator_test",
275    size = "medium",
276    srcs = ["python/learn/estimators/estimator_test.py"],
277    shard_count = 2,
278    srcs_version = "PY2AND3",
279    tags = [
280        "manual",
281        "noasan",  # times out
282        "optonly",  # test is flaky without optimization.
283    ],
284    deps = [
285        ":learn",
286        "//tensorflow/contrib/framework:framework_py",
287        "//tensorflow/contrib/layers:layers_py",
288        "//tensorflow/contrib/learn/python/learn/datasets",
289        "//tensorflow/contrib/lookup:lookup_py",
290        "//tensorflow/contrib/metrics:metrics_py",
291        "//tensorflow/contrib/testing:testing_py",
292        "//tensorflow/python:array_ops",
293        "//tensorflow/python:check_ops",
294        "//tensorflow/python:client",
295        "//tensorflow/python:client_testlib",
296        "//tensorflow/python:control_flow_ops",
297        "//tensorflow/python:data_flow_ops",
298        "//tensorflow/python:framework_for_generated_wrappers",
299        "//tensorflow/python:framework_test_lib",
300        "//tensorflow/python:lib",
301        "//tensorflow/python:math_ops",
302        "//tensorflow/python:parsing_ops",
303        "//tensorflow/python:platform",
304        "//tensorflow/python:protos_all_py",
305        "//tensorflow/python:session",
306        "//tensorflow/python:summary",
307        "//tensorflow/python:training",
308        "//tensorflow/python:util",
309        "//tensorflow/python:variables",
310        "//tensorflow/python/saved_model:loader",
311        "//tensorflow/python/saved_model:tag_constants",
312        "//third_party/py/numpy",
313        "@six_archive//:six",
314    ],
315)
316
317py_test(
318    name = "estimator_input_test",
319    size = "medium",
320    srcs = ["python/learn/estimators/estimator_input_test.py"],
321    srcs_version = "PY2AND3",
322    deps = [
323        ":learn",
324        "//tensorflow/contrib/framework:framework_py",
325        "//tensorflow/contrib/layers:layers_py",
326        "//tensorflow/contrib/learn/python/learn/datasets",
327        "//tensorflow/contrib/metrics:metrics_py",
328        "//tensorflow/python:array_ops",
329        "//tensorflow/python:client_testlib",
330        "//tensorflow/python:data_flow_ops",
331        "//tensorflow/python:framework_for_generated_wrappers",
332        "//tensorflow/python:math_ops",
333        "//tensorflow/python:training",
334        "//third_party/py/numpy",
335    ],
336)
337
338py_test(
339    name = "logistic_regressor_test",
340    size = "small",
341    srcs = ["python/learn/estimators/logistic_regressor_test.py"],
342    srcs_version = "PY2AND3",
343    deps = [
344        ":learn",
345        "//tensorflow/contrib/framework:framework_py",
346        "//tensorflow/contrib/layers:layers_py",
347        "//tensorflow/contrib/learn/python/learn/datasets",
348        "//tensorflow/python:array_ops",
349        "//tensorflow/python:client_testlib",
350        "//tensorflow/python:framework_for_generated_wrappers",
351        "//tensorflow/python:init_ops",
352        "//tensorflow/python:math_ops",
353        "//tensorflow/python/ops/losses",
354        "//third_party/py/numpy",
355    ],
356)
357
358py_test(
359    name = "dnn_linear_combined_test",
360    size = "medium",
361    srcs = ["python/learn/estimators/dnn_linear_combined_test.py"],
362    shard_count = 8,
363    srcs_version = "PY2AND3",
364    tags = ["no_oss"],  # flaky b/70524820
365    deps = [
366        ":learn",
367        "//tensorflow/contrib/layers:layers_py",
368        "//tensorflow/contrib/learn/python/learn/datasets",
369        "//tensorflow/contrib/metrics:metrics_py",
370        "//tensorflow/python:array_ops",
371        "//tensorflow/python:client_testlib",
372        "//tensorflow/python:framework_for_generated_wrappers",
373        "//tensorflow/python:init_ops",
374        "//tensorflow/python:math_ops",
375        "//tensorflow/python:sparse_tensor",
376        "//tensorflow/python:training",
377        "//tensorflow/python/feature_column",
378        "//tensorflow/python/ops/losses",
379        "//third_party/py/numpy",
380    ],
381)
382
383py_test(
384    name = "head_test",
385    size = "medium",
386    srcs = ["python/learn/estimators/head_test.py"],
387    shard_count = 4,
388    srcs_version = "PY2AND3",
389    tags = ["noasan"],  # times out b/63678675
390    deps = [":head_test_lib"],
391)
392
393py_library(
394    name = "head_test_lib",
395    srcs = ["python/learn/estimators/head_test.py"],
396    srcs_version = "PY2AND3",
397    deps = [
398        ":learn",
399        "//tensorflow/core:protos_all_py",
400        "//tensorflow/python:client_testlib",
401        "//tensorflow/python:framework_for_generated_wrappers",
402        "//tensorflow/python:lookup_ops",
403        "//tensorflow/python:math_ops",
404        "//tensorflow/python:session",
405        "//tensorflow/python:sparse_tensor",
406        "//tensorflow/python:variables",
407        "//tensorflow/python/ops/losses",
408        "//third_party/py/numpy",
409        "@six_archive//:six",
410    ],
411)
412
413py_test(
414    name = "dnn_test",
415    size = "medium",
416    srcs = ["python/learn/estimators/dnn_test.py"],
417    shard_count = 4,
418    srcs_version = "PY2AND3",
419    tags = ["notap"],
420    deps = [
421        ":learn",
422        "//tensorflow/contrib/layers:layers_py",
423        "//tensorflow/contrib/learn/python/learn/datasets",
424        "//tensorflow/contrib/metrics:metrics_py",
425        "//tensorflow/python:array_ops",
426        "//tensorflow/python:client_testlib",
427        "//tensorflow/python:framework_for_generated_wrappers",
428        "//tensorflow/python:init_ops",
429        "//tensorflow/python:math_ops",
430        "//tensorflow/python:sparse_tensor",
431        "//tensorflow/python:training",
432        "//tensorflow/python/feature_column",
433        "//third_party/py/numpy",
434    ],
435)
436
437py_test(
438    name = "kmeans_test",
439    size = "medium",
440    srcs = ["python/learn/estimators/kmeans_test.py"],
441    shard_count = 4,
442    srcs_version = "PY2AND3",
443    tags = [
444        "noasan",  # b/73741358
445        "nomac",
446    ],
447    deps = [
448        ":learn",
449        "//tensorflow/python:array_ops",
450        "//tensorflow/python:client_testlib",
451        "//tensorflow/python:control_flow_ops",
452        "//tensorflow/python:data_flow_ops",
453        "//tensorflow/python:framework_for_generated_wrappers",
454        "//tensorflow/python:math_ops",
455        "//tensorflow/python:platform",
456        "//tensorflow/python:platform_benchmark",
457        "//tensorflow/python:random_ops",
458        "//tensorflow/python:training",
459        "//third_party/py/numpy",
460    ],
461)
462
463py_test(
464    name = "dynamic_rnn_estimator_test",
465    size = "medium",
466    srcs = ["python/learn/estimators/dynamic_rnn_estimator_test.py"],
467    shard_count = 4,
468    srcs_version = "PY2AND3",
469    deps = [
470        ":learn",
471        "//tensorflow/contrib/layers:layers_py",
472        "//tensorflow/contrib/rnn:rnn_py",
473        "//tensorflow/python:array_ops",
474        "//tensorflow/python:client_testlib",
475        "//tensorflow/python:framework_for_generated_wrappers",
476        "//tensorflow/python:functional_ops",
477        "//tensorflow/python:lookup_ops",
478        "//tensorflow/python:math_ops",
479        "//tensorflow/python:random_ops",
480        "//tensorflow/python:random_seed",
481        "//tensorflow/python:rnn_cell",
482        "//tensorflow/python:session",
483        "//tensorflow/python:sparse_tensor",
484        "//tensorflow/python:variables",
485        "//third_party/py/numpy",
486    ],
487)
488
489py_test(
490    name = "state_saving_rnn_estimator_test",
491    size = "medium",
492    srcs = ["python/learn/estimators/state_saving_rnn_estimator_test.py"],
493    shard_count = 4,
494    srcs_version = "PY2AND3",
495    tags = ["noasan"],
496    deps = [
497        ":learn",
498        "//tensorflow/contrib/layers:layers_py",
499        "//tensorflow/contrib/lookup:lookup_py",
500        "//tensorflow/python:array_ops",
501        "//tensorflow/python:client_testlib",
502        "//tensorflow/python:framework_for_generated_wrappers",
503        "//tensorflow/python:init_ops",
504        "//tensorflow/python:lookup_ops",
505        "//tensorflow/python:math_ops",
506        "//tensorflow/python:random_ops",
507        "//tensorflow/python:sparse_tensor",
508        "//tensorflow/python:variables",
509        "//third_party/py/numpy",
510    ],
511)
512
513py_test(
514    name = "linear_test",
515    size = "medium",
516    srcs = ["python/learn/estimators/linear_test.py"],
517    shard_count = 20,
518    srcs_version = "PY2AND3",
519    tags = ["no_pip"],
520    deps = [
521        ":learn",
522        "//tensorflow/contrib/layers:layers_py",
523        "//tensorflow/contrib/learn/python/learn/datasets",
524        "//tensorflow/contrib/linear_optimizer:sdca_ops_py",
525        "//tensorflow/contrib/metrics:metrics_py",
526        "//tensorflow/python:array_ops",
527        "//tensorflow/python:client_testlib",
528        "//tensorflow/python:framework_for_generated_wrappers",
529        "//tensorflow/python:math_ops",
530        "//tensorflow/python:sparse_tensor",
531        "//tensorflow/python:training",
532        "//tensorflow/python/feature_column",
533        "//third_party/py/numpy",
534    ],
535)
536
537py_test(
538    name = "debug_test",
539    size = "medium",
540    srcs = ["python/learn/estimators/debug_test.py"],
541    shard_count = 4,
542    srcs_version = "PY2AND3",
543    deps = [
544        ":learn",
545        "//tensorflow/contrib/layers:layers_py",
546        "//tensorflow/contrib/learn/python/learn/datasets",
547        "//tensorflow/contrib/metrics:metrics_py",
548        "//tensorflow/python:array_ops",
549        "//tensorflow/python:client_testlib",
550        "//tensorflow/python:constant_op",
551        "//tensorflow/python:dtypes",
552        "//tensorflow/python:math_ops",
553        "//tensorflow/python:sparse_tensor",
554        "//tensorflow/python:training",
555        "//third_party/py/numpy",
556    ],
557)
558
559py_test(
560    name = "composable_model_test",
561    size = "medium",
562    srcs = ["python/learn/estimators/composable_model_test.py"],
563    srcs_version = "PY2AND3",
564    deps = [
565        ":learn",
566        "//tensorflow/contrib/framework:framework_py",
567        "//tensorflow/contrib/layers:layers_py",
568        "//tensorflow/contrib/learn/python/learn/datasets",
569        "//tensorflow/python:client_testlib",
570        "//tensorflow/python:framework_for_generated_wrappers",
571        "//tensorflow/python:sparse_tensor",
572        "//tensorflow/python:state_ops",
573    ],
574)
575
576py_test(
577    name = "svm_test",
578    size = "medium",
579    srcs = ["python/learn/estimators/svm_test.py"],
580    srcs_version = "PY2AND3",
581    deps = [
582        ":learn",
583        "//tensorflow/contrib/layers:layers_py",
584        "//tensorflow/python:client_testlib",
585        "//tensorflow/python:framework_for_generated_wrappers",
586        "//tensorflow/python:sparse_tensor",
587    ],
588)
589
590py_test(
591    name = "grid_search_test",
592    size = "small",
593    srcs = ["python/learn/grid_search_test.py"],
594    srcs_version = "PY2AND3",
595    deps = [
596        ":learn",
597        "//tensorflow/python:client_testlib",
598    ],
599)
600
601py_test(
602    name = "io_test",
603    size = "small",
604    srcs = ["python/learn/learn_io/io_test.py"],
605    srcs_version = "PY2AND3",
606    deps = [
607        ":learn",
608        "//tensorflow/contrib/learn/python/learn/datasets",
609        "//tensorflow/python:client_testlib",
610        "//tensorflow/python:framework_test_lib",
611    ],
612)
613
614py_test(
615    name = "model_fn_test",
616    size = "small",
617    srcs = ["python/learn/estimators/model_fn_test.py"],
618    srcs_version = "PY2AND3",
619    deps = [
620        ":learn",
621        "//tensorflow/python:client_testlib",
622        "//tensorflow/python:constant_op",
623        "//tensorflow/python:control_flow_ops",
624        "//tensorflow/python:session",
625        "//tensorflow/python:training",
626        "//tensorflow/python/estimator:estimator_py",
627        "//tensorflow/python/saved_model:signature_constants",
628        "@six_archive//:six",
629    ],
630)
631
632py_test(
633    name = "multioutput_test",
634    size = "small",
635    srcs = ["python/learn/estimators/multioutput_test.py"],
636    srcs_version = "PY2AND3",
637    deps = [
638        ":learn",
639        "//tensorflow/python:client_testlib",
640        "//third_party/py/numpy",
641    ],
642)
643
644py_test(
645    name = "nonlinear_test",
646    size = "medium",
647    srcs = ["python/learn/estimators/nonlinear_test.py"],
648    srcs_version = "PY2AND3",
649    deps = [
650        ":learn",
651        "//tensorflow/contrib/layers:layers_py",
652        "//tensorflow/contrib/learn/python/learn/datasets",
653        "//tensorflow/python:client_testlib",
654        "//tensorflow/python:random_seed",
655    ],
656)
657
658py_test(
659    name = "regression_test",
660    size = "small",
661    srcs = ["python/learn/estimators/regression_test.py"],
662    srcs_version = "PY2AND3",
663    deps = [
664        ":learn",
665        "//tensorflow/python:client_testlib",
666        "//third_party/py/numpy",
667    ],
668)
669
670py_test(
671    name = "rnn_common_test",
672    size = "medium",
673    srcs = ["python/learn/estimators/rnn_common_test.py"],
674    srcs_version = "PY2AND3",
675    deps = [
676        ":learn",
677        "//tensorflow/python:client_testlib",
678        "//tensorflow/python:framework_for_generated_wrappers",
679        "//tensorflow/python:session",
680        "//third_party/py/numpy",
681    ],
682)
683
684py_test(
685    name = "ops_test",
686    size = "small",
687    srcs = ["python/learn/ops/ops_test.py"],
688    srcs_version = "PY2AND3",
689    deps = [
690        ":learn",
691        "//tensorflow/contrib/layers:layers_py",
692        "//tensorflow/python:array_ops",
693        "//tensorflow/python:client_testlib",
694        "//tensorflow/python:framework_for_generated_wrappers",
695        "//tensorflow/python:random_seed",
696        "//tensorflow/python:variables",
697        "//third_party/py/numpy",
698    ],
699)
700
701py_test(
702    name = "seq2seq_ops_test",
703    size = "small",
704    srcs = ["python/learn/ops/seq2seq_ops_test.py"],
705    srcs_version = "PY2AND3",
706    deps = [
707        ":learn",
708        "//tensorflow/python:array_ops",
709        "//tensorflow/python:client_testlib",
710        "//tensorflow/python:framework_for_generated_wrappers",
711        "//tensorflow/python:rnn_cell",
712        "//third_party/py/numpy",
713    ],
714)
715
716py_test(
717    name = "categorical_test",
718    size = "small",
719    srcs = ["python/learn/preprocessing/tests/categorical_test.py"],
720    srcs_version = "PY2AND3",
721    deps = [
722        ":learn",
723        "//tensorflow/python:client_testlib",
724        "//third_party/py/numpy",
725    ],
726)
727
728py_test(
729    name = "categorical_vocabulary_test",
730    size = "small",
731    srcs = ["python/learn/preprocessing/tests/categorical_vocabulary_test.py"],
732    srcs_version = "PY2AND3",
733    deps = [
734        ":learn",
735        "//tensorflow/python:client_testlib",
736    ],
737)
738
739py_test(
740    name = "text_test",
741    size = "small",
742    srcs = ["python/learn/preprocessing/tests/text_test.py"],
743    srcs_version = "PY2AND3",
744    deps = [
745        ":learn",
746        "//tensorflow/python:client_testlib",
747    ],
748)
749
750tf_py_test(
751    name = "graph_io_test",
752    size = "medium",
753    srcs = ["python/learn/learn_io/graph_io_test.py"],
754    additional_deps = [
755        ":learn",
756        "//tensorflow/python:client",
757        "//tensorflow/python:client_testlib",
758        "//tensorflow/python:errors",
759        "//tensorflow/python:framework",
760        "//tensorflow/python:framework_for_generated_wrappers",
761        "//tensorflow/python:framework_test_lib",
762        "//tensorflow/python:io_ops",
763        "//tensorflow/python:math_ops",
764        "//tensorflow/python:parsing_ops",
765        "//tensorflow/python:platform",
766        "//tensorflow/python:session",
767        "//tensorflow/python:training",
768        "//tensorflow/python:variables",
769    ],
770    grpc_enabled = True,
771)
772
773py_test(
774    name = "pandas_io_test",
775    size = "small",
776    srcs = ["python/learn/learn_io/pandas_io_test.py"],
777    srcs_version = "PY2AND3",
778    deps = [
779        ":learn",
780        "//tensorflow/python:client_testlib",
781        "//tensorflow/python:errors",
782        "//tensorflow/python:training",
783        "//third_party/py/numpy",
784    ],
785)
786
787py_test(
788    name = "export_test",
789    size = "small",
790    timeout = "moderate",
791    srcs = ["python/learn/utils/export_test.py"],
792    srcs_version = "PY2AND3",
793    tags = [
794        "manual",  # http://b/31032996
795        "notap",  # TODO(b/37950026): Test is flaky
796    ],
797    deps = [
798        ":learn",
799        "//tensorflow/contrib/layers:layers_py",
800        "//tensorflow/contrib/session_bundle:exporter",
801        "//tensorflow/contrib/session_bundle:manifest_proto_py_pb2",
802        "//tensorflow/python:array_ops",
803        "//tensorflow/python:client_testlib",
804        "//tensorflow/python:errors",
805        "//tensorflow/python:framework_for_generated_wrappers",
806        "//tensorflow/python:platform",
807        "//tensorflow/python:random_ops",
808        "//tensorflow/python:session",
809        "//tensorflow/python:training",
810        "//third_party/py/numpy",
811        "@six_archive//:six",
812    ],
813)
814
815py_test(
816    name = "gc_test",
817    size = "small",
818    srcs = ["python/learn/utils/gc_test.py"],
819    srcs_version = "PY2AND3",
820    deps = [
821        ":learn",
822        "//tensorflow/python:client_testlib",
823        "//tensorflow/python:framework",
824        "//tensorflow/python:framework_test_lib",
825        "//tensorflow/python:platform",
826        "//tensorflow/python:util",
827    ],
828)
829
830py_test(
831    name = "saved_model_export_utils_test",
832    size = "small",
833    srcs = ["python/learn/utils/saved_model_export_utils_test.py"],
834    srcs_version = "PY2AND3",
835    tags = ["no_windows"],  # TODO: needs investigation on Windows
836    deps = [
837        ":learn",
838        "//tensorflow/contrib/layers:layers_py",
839        "//tensorflow/core:protos_all_py",
840        "//tensorflow/python:array_ops",
841        "//tensorflow/python:client_testlib",
842        "//tensorflow/python:framework_for_generated_wrappers",
843        "//tensorflow/python:platform",
844        "//tensorflow/python:util",
845        "//tensorflow/python/saved_model:signature_constants",
846        "//tensorflow/python/saved_model:signature_def_utils",
847    ],
848)
849
850py_test(
851    name = "input_fn_utils_test",
852    size = "small",
853    srcs = ["python/learn/utils/input_fn_utils_test.py"],
854    srcs_version = "PY2AND3",
855    deps = [
856        ":learn",
857        "//tensorflow/python:array_ops",
858        "//tensorflow/python:client_testlib",
859        "//tensorflow/python:dtypes",
860    ],
861)
862
863py_test(
864    name = "stability_test",
865    size = "small",
866    srcs = ["python/learn/estimators/stability_test.py"],
867    srcs_version = "PY2AND3",
868    deps = [
869        ":learn",
870        "//tensorflow/contrib/framework:framework_py",
871        "//tensorflow/contrib/layers:layers_py",
872        "//tensorflow/contrib/learn/python/learn/datasets",
873        "//tensorflow/python:client_testlib",
874        "//tensorflow/python:control_flow_ops",
875        "//tensorflow/python:framework_for_generated_wrappers",
876        "//tensorflow/python:random_ops",
877        "//tensorflow/python:training",
878    ],
879)
880
881py_binary(
882    name = "inspect_checkpoint",
883    srcs = ["python/learn/utils/inspect_checkpoint.py"],
884    srcs_version = "PY2AND3",
885    deps = [
886        "//tensorflow/contrib/framework:framework_py",
887        "//tensorflow/python:platform",
888    ],
889)
890