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