1# Description: 2# Python Client Code of the TensorFlow Debugger (tfdbg). 3# 4# Public target(s): 5# 6# ":debug_py": Public Python methods and classes of tfdbg. 7# For API documentation, see https://www.tensorflow.org/api_docs/python/tfdbg 8# For a user interface walkthrough, see https://www.tensorflow.org/programmers_guide/debugger 9# ":grpc_debug_server": Server interface for grpc:// debug URLs. 10 11package( 12 default_visibility = ["//tensorflow:internal"], 13) 14 15licenses(["notice"]) # Apache 2.0 16 17exports_files(["LICENSE"]) 18 19load("//tensorflow:tensorflow.bzl", "cuda_py_test") 20load("//tensorflow:tensorflow.bzl", "py_test") 21load("//tensorflow:tensorflow.bzl", "if_not_windows") 22 23py_library( 24 name = "debug_py", 25 srcs = ["__init__.py"], 26 srcs_version = "PY2AND3", 27 visibility = ["//visibility:public"], 28 deps = [ 29 ":debug_data", 30 ":debug_gradients", 31 ":debug_graphs", 32 ":debug_utils", 33 ":grpc_debug_server", 34 ":grpc_debug_test_server", 35 ":hooks", 36 ":local_cli_wrapper", 37 "//tensorflow/python:util", 38 ], 39) 40 41# Transitive dependencies of this target will be included in the pip package. 42py_library( 43 name = "debug_pip", 44 deps = [ 45 ":cli_test_utils", 46 ":debug_py", 47 ":grpc_debug_test_server", 48 ":offline_analyzer", 49 ":session_debug_testlib", 50 ":source_remote", 51 ] + if_not_windows([ 52 ":debug_examples", 53 ]), 54) 55 56py_library( 57 name = "common", 58 srcs = ["lib/common.py"], 59 srcs_version = "PY2AND3", 60) 61 62py_library( 63 name = "debug_graphs", 64 srcs = ["lib/debug_graphs.py"], 65 srcs_version = "PY2AND3", 66 deps = [ 67 "//tensorflow/core:protos_all_py", 68 "//tensorflow/python:framework", 69 "//tensorflow/python:op_def_registry", 70 "//tensorflow/python:platform", 71 "//tensorflow/python:tensor_util", 72 "@six_archive//:six", 73 ], 74) 75 76py_library( 77 name = "debug_data", 78 srcs = ["lib/debug_data.py"], 79 srcs_version = "PY2AND3", 80 deps = [ 81 ":debug_graphs", 82 "//tensorflow/core:protos_all_py", 83 "//tensorflow/python:framework", 84 "//tensorflow/python:op_def_registry", 85 "//tensorflow/python:platform", 86 "//tensorflow/python:tensor_util", 87 "//third_party/py/numpy", 88 "@six_archive//:six", 89 ], 90) 91 92py_library( 93 name = "debug_gradients", 94 srcs = ["lib/debug_gradients.py"], 95 srcs_version = "PY2AND3", 96 deps = [ 97 ":debug_data", 98 ":debug_graphs", 99 "//tensorflow/python:array_ops", 100 "//tensorflow/python:framework", 101 "//tensorflow/python:platform", 102 "@six_archive//:six", 103 ], 104) 105 106py_library( 107 name = "debug_utils", 108 srcs = ["lib/debug_utils.py"], 109 srcs_version = "PY2AND3", 110) 111 112py_library( 113 name = "source_utils", 114 srcs = ["lib/source_utils.py"], 115 srcs_version = "PY2AND3", 116 deps = [ 117 ":profiling", 118 "//third_party/py/numpy", 119 ], 120) 121 122py_library( 123 name = "source_remote", 124 srcs = ["lib/source_remote.py"], 125 srcs_version = "PY2AND3", 126 deps = [ 127 ":common", 128 ":debug_service_pb2_grpc", 129 "//tensorflow/core/debug:debug_service_proto_py", 130 "//tensorflow/python/profiler:tfprof_logger", 131 ], 132) 133 134py_library( 135 name = "stepper", 136 srcs = ["lib/stepper.py"], 137 srcs_version = "PY2AND3", 138 deps = [ 139 ":debug_data", 140 ":debug_graphs", 141 ":debug_utils", 142 "//tensorflow/core:protos_all_py", 143 "//tensorflow/python:framework_for_generated_wrappers", 144 "//tensorflow/python:session_ops", 145 "@six_archive//:six", 146 ], 147) 148 149py_library( 150 name = "framework", 151 srcs = ["wrappers/framework.py"], 152 srcs_version = "PY2AND3", 153 deps = [ 154 ":debug_utils", 155 ":stepper", 156 "//tensorflow/core:protos_all_py", 157 "//tensorflow/python:client", 158 "//tensorflow/python:errors", 159 "//tensorflow/python:framework_ops", 160 "//tensorflow/python:training", 161 ], 162) 163 164py_library( 165 name = "debugger_cli_common", 166 srcs = ["cli/debugger_cli_common.py"], 167 srcs_version = "PY2AND3", 168 deps = [ 169 "//tensorflow/python:platform", 170 "@six_archive//:six", 171 ], 172) 173 174py_library( 175 name = "cli_config", 176 srcs = ["cli/cli_config.py"], 177 srcs_version = "PY2AND3", 178 deps = [":debugger_cli_common"], 179) 180 181py_library( 182 name = "command_parser", 183 srcs = ["cli/command_parser.py"], 184 srcs_version = "PY2AND3", 185) 186 187py_library( 188 name = "tensor_format", 189 srcs = ["cli/tensor_format.py"], 190 srcs_version = "PY2AND3", 191 deps = [ 192 ":debug_data", 193 ":debugger_cli_common", 194 "//third_party/py/numpy", 195 ], 196) 197 198py_library( 199 name = "cli_shared", 200 srcs = ["cli/cli_shared.py"], 201 srcs_version = "PY2AND3", 202 deps = [ 203 ":command_parser", 204 ":common", 205 ":debugger_cli_common", 206 ":tensor_format", 207 "//tensorflow/python:framework_for_generated_wrappers", 208 "//tensorflow/python:platform", 209 "//tensorflow/python:variables", 210 "//third_party/py/numpy", 211 "@six_archive//:six", 212 ], 213) 214 215py_library( 216 name = "evaluator", 217 srcs = ["cli/evaluator.py"], 218 srcs_version = "PY2AND3", 219 deps = [ 220 ":debug_data", 221 "//third_party/py/numpy", 222 ], 223) 224 225py_library( 226 name = "analyzer_cli", 227 srcs = ["cli/analyzer_cli.py"], 228 srcs_version = "PY2AND3", 229 deps = [ 230 ":cli_config", 231 ":cli_shared", 232 ":command_parser", 233 ":debug_graphs", 234 ":debugger_cli_common", 235 ":evaluator", 236 ":source_utils", 237 ":ui_factory", 238 "@six_archive//:six", 239 ], 240) 241 242py_library( 243 name = "profiling", 244 srcs = ["lib/profiling.py"], 245 srcs_version = "PY2AND3", 246) 247 248py_library( 249 name = "profile_analyzer_cli", 250 srcs = ["cli/profile_analyzer_cli.py"], 251 srcs_version = "PY2AND3", 252 deps = [ 253 ":cli_shared", 254 ":command_parser", 255 ":debugger_cli_common", 256 ":profiling", 257 ":source_utils", 258 ":ui_factory", 259 "//third_party/py/numpy", 260 ], 261) 262 263py_library( 264 name = "stepper_cli", 265 srcs = ["cli/stepper_cli.py"], 266 srcs_version = "PY2AND3", 267 deps = [ 268 ":cli_shared", 269 ":command_parser", 270 ":debugger_cli_common", 271 ":stepper", 272 ":tensor_format", 273 "//third_party/py/numpy", 274 "@six_archive//:six", 275 ], 276) 277 278py_library( 279 name = "base_ui", 280 srcs = ["cli/base_ui.py"], 281 srcs_version = "PY2AND3", 282 deps = [ 283 ":cli_config", 284 ":command_parser", 285 ":debugger_cli_common", 286 ], 287) 288 289py_library( 290 name = "curses_widgets", 291 srcs = ["cli/curses_widgets.py"], 292 srcs_version = "PY2AND3", 293 deps = [":debugger_cli_common"], 294) 295 296py_library( 297 name = "curses_ui", 298 srcs = ["cli/curses_ui.py"], 299 srcs_version = "PY2AND3", 300 deps = [ 301 ":base_ui", 302 ":cli_shared", 303 ":command_parser", 304 ":curses_widgets", 305 ":debugger_cli_common", 306 ":tensor_format", 307 "@six_archive//:six", 308 ], 309) 310 311py_library( 312 name = "readline_ui", 313 srcs = ["cli/readline_ui.py"], 314 srcs_version = "PY2AND3", 315 deps = [ 316 ":base_ui", 317 ":debugger_cli_common", 318 ], 319) 320 321py_library( 322 name = "ui_factory", 323 srcs = ["cli/ui_factory.py"], 324 srcs_version = "PY2AND3", 325 deps = [ 326 ":curses_ui", 327 ":readline_ui", 328 ], 329) 330 331py_library( 332 name = "dumping_wrapper", 333 srcs = ["wrappers/dumping_wrapper.py"], 334 srcs_version = "PY2AND3", 335 deps = [ 336 ":debug_data", 337 ":framework", 338 "//tensorflow/core:protos_all_py", 339 "//tensorflow/python:platform", 340 ], 341) 342 343py_library( 344 name = "grpc_wrapper", 345 srcs = ["wrappers/grpc_wrapper.py"], 346 srcs_version = "PY2AND3", 347 deps = [ 348 ":common", 349 ":framework", 350 ":source_remote", 351 ], 352) 353 354py_library( 355 name = "local_cli_wrapper", 356 srcs = ["wrappers/local_cli_wrapper.py"], 357 srcs_version = "PY2AND3", 358 deps = [ 359 ":analyzer_cli", 360 ":cli_shared", 361 ":command_parser", 362 ":common", 363 ":debug_data", 364 ":debugger_cli_common", 365 ":framework", 366 ":profile_analyzer_cli", 367 ":stepper_cli", 368 ":tensor_format", 369 ":ui_factory", 370 ], 371) 372 373py_library( 374 name = "hooks", 375 srcs = ["wrappers/hooks.py"], 376 srcs_version = "PY2AND3", 377 deps = [ 378 ":debug_utils", 379 ":dumping_wrapper", 380 ":framework", 381 ":grpc_wrapper", 382 ":local_cli_wrapper", 383 ":stepper", 384 "//tensorflow/core:protos_all_py", 385 "//tensorflow/python:training", 386 ], 387) 388 389py_binary( 390 name = "offline_analyzer", 391 srcs = ["cli/offline_analyzer.py"], 392 srcs_version = "PY2AND3", 393 deps = [ 394 ":analyzer_cli", 395 ":debug_data", 396 "//tensorflow/python", # TODO(b/34059704): remove when fixed 397 "//tensorflow/python:platform", 398 ], 399) 400 401py_library( 402 name = "debug_examples", 403 deps = [ 404 ":debug_errors", 405 ":debug_fibonacci", 406 ":debug_mnist", 407 ":debug_tflearn_iris", 408 ], 409) 410 411py_binary( 412 name = "debug_fibonacci", 413 srcs = ["examples/debug_fibonacci.py"], 414 srcs_version = "PY2AND3", 415 deps = [ 416 ":debug_py", 417 "//tensorflow:tensorflow_py", 418 "//third_party/py/numpy", 419 "@six_archive//:six", 420 ], 421) 422 423py_binary( 424 name = "debug_errors", 425 srcs = ["examples/debug_errors.py"], 426 srcs_version = "PY2AND3", 427 deps = [ 428 ":debug_py", 429 "//tensorflow:tensorflow_py", 430 "//third_party/py/numpy", 431 ], 432) 433 434py_binary( 435 name = "debug_mnist", 436 srcs = ["examples/debug_mnist.py"], 437 srcs_version = "PY2AND3", 438 deps = [ 439 ":debug_py", 440 "//tensorflow:tensorflow_py", 441 "//tensorflow/examples/tutorials/mnist:input_data", 442 ], 443) 444 445py_binary( 446 name = "debug_tflearn_iris", 447 srcs = ["examples/debug_tflearn_iris.py"], 448 srcs_version = "PY2AND3", 449 deps = [ 450 ":debug_py", 451 "//tensorflow:tensorflow_py", 452 "//third_party/py/numpy", 453 "@six_archive//:six", 454 ], 455) 456 457py_test( 458 name = "common_test", 459 size = "small", 460 srcs = ["lib/common_test.py"], 461 srcs_version = "PY2AND3", 462 deps = [ 463 ":common", 464 "//tensorflow/python:client", 465 "//tensorflow/python:client_testlib", 466 "//tensorflow/python:constant_op", 467 "//tensorflow/python:platform_test", 468 ], 469) 470 471py_test( 472 name = "debug_graphs_test", 473 size = "small", 474 srcs = ["lib/debug_graphs_test.py"], 475 srcs_version = "PY2AND3", 476 deps = [ 477 ":debug_graphs", 478 "//tensorflow/python:client_testlib", 479 "//tensorflow/python:framework_test_lib", 480 ], 481) 482 483py_test( 484 name = "debug_data_test", 485 size = "small", 486 srcs = ["lib/debug_data_test.py"], 487 srcs_version = "PY2AND3", 488 deps = [ 489 ":debug_data", 490 "//tensorflow/core:protos_all_py", 491 "//tensorflow/python:client_testlib", 492 "//tensorflow/python:framework_test_lib", 493 "//tensorflow/python:platform", 494 "//tensorflow/python:platform_test", 495 "//third_party/py/numpy", 496 ], 497) 498 499cuda_py_test( 500 name = "debug_gradients_test", 501 size = "small", 502 srcs = ["lib/debug_gradients_test.py"], 503 additional_deps = [ 504 ":debug_data", 505 ":debug_gradients", 506 ":debug_utils", 507 "//tensorflow/python:client", 508 "//tensorflow/python:framework_test_lib", 509 "//tensorflow/python:gradients", 510 "//tensorflow/python:math_ops", 511 "//tensorflow/python:platform_test", 512 "//tensorflow/python:training", 513 "//tensorflow/python:variables", 514 ], 515) 516 517py_test( 518 name = "debug_utils_test", 519 size = "small", 520 srcs = ["lib/debug_utils_test.py"], 521 srcs_version = "PY2AND3", 522 deps = [ 523 ":debug_utils", 524 "//tensorflow/core:protos_all_py", 525 "//tensorflow/python:client", 526 "//tensorflow/python:framework_for_generated_wrappers", 527 "//tensorflow/python:framework_test_lib", 528 "//tensorflow/python:math_ops", 529 "//tensorflow/python:platform_test", 530 "//tensorflow/python:resource_variable_ops", 531 "//tensorflow/python:variables", 532 "//third_party/py/numpy", 533 ], 534) 535 536py_test( 537 name = "source_utils_test", 538 size = "small", 539 srcs = ["lib/source_utils_test.py"], 540 srcs_version = "PY2AND3", 541 deps = [ 542 ":debug_data", 543 ":debug_utils", 544 ":source_utils", 545 "//tensorflow/core:protos_all_py", 546 "//tensorflow/python:client", 547 "//tensorflow/python:constant_op", 548 "//tensorflow/python:control_flow_ops", 549 "//tensorflow/python:framework_ops", 550 "//tensorflow/python:framework_test_lib", 551 "//tensorflow/python:math_ops", 552 "//tensorflow/python:platform_test", 553 "//tensorflow/python:resource_variable_ops", 554 "//tensorflow/python:util", 555 "//tensorflow/python:variables", 556 "//third_party/py/numpy", 557 ], 558) 559 560py_test( 561 name = "source_remote_test", 562 size = "small", 563 srcs = ["lib/source_remote_test.py"], 564 srcs_version = "PY2AND3", 565 tags = [ 566 "no_windows", 567 "nomac", 568 "oss_serial", 569 ], 570 deps = [ 571 ":grpc_debug_test_server", 572 ":source_remote", 573 ":source_utils", 574 "//tensorflow/core:protos_all_py", 575 "//tensorflow/python:client", 576 "//tensorflow/python:framework_ops", 577 "//tensorflow/python:framework_test_lib", 578 "//tensorflow/python:math_ops", 579 "//tensorflow/python:platform_test", 580 "//tensorflow/python:resource_variable_ops", 581 "//tensorflow/python:util", 582 "//tensorflow/python:variables", 583 ], 584) 585 586cuda_py_test( 587 name = "stepper_test", 588 size = "small", 589 srcs = ["lib/stepper_test.py"], 590 additional_deps = [ 591 ":stepper", 592 "//tensorflow/python:array_ops", 593 "//tensorflow/python:client", 594 "//tensorflow/python:framework_for_generated_wrappers", 595 "//tensorflow/python:framework_test_lib", 596 "//tensorflow/python:math_ops", 597 "//tensorflow/python:platform_test", 598 "//tensorflow/python:training", 599 "//tensorflow/python:variables", 600 ], 601) 602 603py_test( 604 name = "framework_test", 605 size = "small", 606 srcs = ["wrappers/framework_test.py"], 607 srcs_version = "PY2AND3", 608 deps = [ 609 ":debug_data", 610 ":framework", 611 "//tensorflow/core:protos_all_py", 612 "//tensorflow/python:array_ops", 613 "//tensorflow/python:client", 614 "//tensorflow/python:errors", 615 "//tensorflow/python:framework_for_generated_wrappers", 616 "//tensorflow/python:framework_test_lib", 617 "//tensorflow/python:math_ops", 618 "//tensorflow/python:platform_test", 619 "//tensorflow/python:resource_variable_ops", 620 "//tensorflow/python:training", 621 "//tensorflow/python:util", 622 "//tensorflow/python:variables", 623 "//third_party/py/numpy", 624 ], 625) 626 627py_test( 628 name = "profiling_test", 629 size = "small", 630 srcs = ["lib/profiling_test.py"], 631 srcs_version = "PY2AND3", 632 deps = [ 633 ":profiling", 634 "//tensorflow/core:protos_all_py", 635 "//tensorflow/python:framework_test_lib", 636 "//tensorflow/python:platform_test", 637 ], 638) 639 640py_test( 641 name = "curses_ui_test", 642 size = "small", 643 srcs = ["cli/curses_ui_test.py"], 644 srcs_version = "PY2AND3", 645 tags = [ 646 "no_windows", 647 ], 648 deps = [ 649 ":cli_test_utils", 650 ":curses_ui", 651 ":debugger_cli_common", 652 ":tensor_format", 653 "//tensorflow/python:framework_test_lib", 654 "//tensorflow/python:platform", 655 "//tensorflow/python:platform_test", 656 "//third_party/py/numpy", 657 ], 658) 659 660py_test( 661 name = "readline_ui_test", 662 size = "small", 663 srcs = ["cli/readline_ui_test.py"], 664 srcs_version = "PY2AND3", 665 deps = [ 666 ":cli_config", 667 ":debugger_cli_common", 668 ":readline_ui", 669 ":ui_factory", 670 "//tensorflow/python:framework_test_lib", 671 "//tensorflow/python:platform", 672 "//tensorflow/python:platform_test", 673 ], 674) 675 676py_library( 677 name = "session_debug_testlib", 678 srcs = ["lib/session_debug_testlib.py"], 679 srcs_version = "PY2AND3", 680 deps = [ 681 ":debug_data", 682 ":debug_graphs", 683 ":debug_utils", 684 "//tensorflow/core:protos_all_py", 685 "//tensorflow/python:array_ops", 686 "//tensorflow/python:client", 687 "//tensorflow/python:client_testlib", 688 "//tensorflow/python:control_flow_ops", 689 "//tensorflow/python:data_flow_ops", 690 "//tensorflow/python:errors", 691 "//tensorflow/python:framework_for_generated_wrappers", 692 "//tensorflow/python:framework_test_lib", 693 "//tensorflow/python:math_ops", 694 "//tensorflow/python:parsing_ops", 695 "//tensorflow/python:platform_test", 696 "//tensorflow/python:rnn", 697 "//tensorflow/python:rnn_cell", 698 "//tensorflow/python:state_ops", 699 "//tensorflow/python:tensor_array_grad", 700 "//tensorflow/python:training", 701 "//tensorflow/python:variables", 702 "//third_party/py/numpy", 703 "@six_archive//:six", 704 ], 705) 706 707py_library( 708 name = "debug_service_pb2_grpc", 709 srcs = ["lib/debug_service_pb2_grpc.py"], 710 srcs_version = "PY2AND3", 711 deps = [ 712 "//tensorflow/core/debug:debug_service_proto_py", 713 ], 714) 715 716py_library( 717 name = "grpc_debug_server", 718 srcs = ["lib/grpc_debug_server.py"], 719 srcs_version = "PY2AND3", 720 visibility = ["//visibility:public"], 721 deps = [ 722 ":debug_graphs", 723 ":debug_service_pb2_grpc", 724 "//tensorflow/core/debug:debug_service_proto_py", 725 "@six_archive//:six", 726 ], 727) 728 729py_library( 730 name = "grpc_debug_test_server", 731 srcs = ["lib/grpc_debug_test_server.py"], 732 srcs_version = "PY2AND3", 733 deps = [ 734 ":debug_data", 735 ":debug_utils", 736 ":grpc_debug_server", 737 "//tensorflow/core:protos_all_py", 738 "//tensorflow/python:client", 739 "//tensorflow/python:constant_op", 740 "//tensorflow/python:errors", 741 "//tensorflow/python:variables", 742 ], 743) 744 745cuda_py_test( 746 name = "session_debug_file_test", 747 size = "small", 748 srcs = ["lib/session_debug_file_test.py"], 749 additional_deps = [ 750 ":debug_data", 751 ":debug_utils", 752 ":session_debug_testlib", 753 "//tensorflow/python:client", 754 "//tensorflow/python:framework_for_generated_wrappers", 755 "//tensorflow/python:math_ops", 756 "//tensorflow/python:platform_test", 757 "//tensorflow/python:variables", 758 ], 759 tags = ["notsan"], 760) 761 762cuda_py_test( 763 name = "debug_graph_reconstruction_test", 764 size = "small", 765 srcs = ["lib/debug_graph_reconstruction_test.py"], 766 additional_deps = [ 767 ":debug_data", 768 ":debug_utils", 769 "//tensorflow/python:client", 770 "//tensorflow/python:client_testlib", 771 "//tensorflow/python:control_flow_ops", 772 "//tensorflow/python:framework_test_lib", 773 "//tensorflow/python:math_ops", 774 "//tensorflow/python:training", 775 "//tensorflow/python:variables", 776 ], 777) 778 779cuda_py_test( 780 name = "session_debug_multi_gpu_test", 781 size = "small", 782 srcs = ["lib/session_debug_multi_gpu_test.py"], 783 additional_deps = [ 784 ":debug_data", 785 ":debug_utils", 786 "//tensorflow/python:client", 787 "//tensorflow/python:framework_for_generated_wrappers", 788 "//tensorflow/python:framework_test_lib", 789 "//tensorflow/python:math_ops", 790 "//tensorflow/python:platform_test", 791 "//tensorflow/python:variables", 792 ], 793) 794 795py_test( 796 name = "debugger_cli_common_test", 797 size = "small", 798 srcs = ["cli/debugger_cli_common_test.py"], 799 srcs_version = "PY2AND3", 800 deps = [ 801 ":debugger_cli_common", 802 "//tensorflow/python:framework_test_lib", 803 "//tensorflow/python:platform", 804 "//tensorflow/python:platform_test", 805 ], 806) 807 808py_test( 809 name = "cli_config_test", 810 size = "small", 811 srcs = ["cli/cli_config_test.py"], 812 srcs_version = "PY2AND3", 813 deps = [ 814 ":cli_config", 815 "//tensorflow/python:framework_test_lib", 816 "//tensorflow/python:platform", 817 "//tensorflow/python:platform_test", 818 ], 819) 820 821py_test( 822 name = "command_parser_test", 823 size = "small", 824 srcs = ["cli/command_parser_test.py"], 825 srcs_version = "PY2AND3", 826 deps = [ 827 ":command_parser", 828 "//tensorflow/python:framework_test_lib", 829 "//tensorflow/python:platform_test", 830 ], 831) 832 833py_test( 834 name = "tensor_format_test", 835 size = "small", 836 srcs = ["cli/tensor_format_test.py"], 837 srcs_version = "PY2AND3", 838 deps = [ 839 ":cli_test_utils", 840 ":debug_data", 841 ":tensor_format", 842 "//tensorflow/core:protos_all_py", 843 "//tensorflow/python:framework_test_lib", 844 "//tensorflow/python:platform_test", 845 "//third_party/py/numpy", 846 "@six_archive//:six", 847 ], 848) 849 850py_test( 851 name = "cli_shared_test", 852 size = "small", 853 srcs = ["cli/cli_shared_test.py"], 854 srcs_version = "PY2AND3", 855 deps = [ 856 ":cli_shared", 857 ":debugger_cli_common", 858 "//tensorflow/python:errors", 859 "//tensorflow/python:framework_for_generated_wrappers", 860 "//tensorflow/python:framework_test_lib", 861 "//tensorflow/python:platform_test", 862 "//tensorflow/python:sparse_tensor", 863 "//tensorflow/python:variables", 864 ], 865) 866 867py_test( 868 name = "evaluator_test", 869 size = "small", 870 srcs = [ 871 "cli/evaluator_test.py", 872 ], 873 srcs_version = "PY2AND3", 874 deps = [ 875 ":debug_data", 876 ":evaluator", 877 "//tensorflow/python:client_testlib", 878 "//tensorflow/python:framework_test_lib", 879 "//third_party/py/numpy", 880 ], 881) 882 883py_library( 884 name = "cli_test_utils", 885 srcs = ["cli/cli_test_utils.py"], 886 srcs_version = "PY2AND3", 887) 888 889cuda_py_test( 890 name = "analyzer_cli_test", 891 size = "small", 892 srcs = ["cli/analyzer_cli_test.py"], 893 additional_deps = [ 894 ":analyzer_cli", 895 ":cli_config", 896 ":cli_test_utils", 897 ":command_parser", 898 ":debug_data", 899 ":debug_utils", 900 ":debugger_cli_common", 901 ":source_utils", 902 "//third_party/py/numpy", 903 "@six_archive//:six", 904 "//tensorflow:tensorflow_py", 905 "//tensorflow/python:array_ops", 906 "//tensorflow/python:client", 907 "//tensorflow/python:client_testlib", 908 "//tensorflow/python:control_flow_ops", 909 "//tensorflow/python:framework_for_generated_wrappers", 910 "//tensorflow/python:framework_test_lib", 911 "//tensorflow/python:math_ops", 912 "//tensorflow/python:platform_test", 913 "//tensorflow/python:util", 914 "//tensorflow/python:variables", 915 ], 916) 917 918py_test( 919 name = "profile_analyzer_cli_test", 920 size = "small", 921 srcs = ["cli/profile_analyzer_cli_test.py"], 922 srcs_version = "PY2AND3", 923 deps = [ 924 ":debugger_cli_common", 925 ":profile_analyzer_cli", 926 "//tensorflow/core:protos_all_py", 927 "//tensorflow/python:client_testlib", 928 "//tensorflow/python:control_flow_ops", 929 "//tensorflow/python:framework_for_generated_wrappers", 930 "//tensorflow/python:framework_test_lib", 931 "//tensorflow/python:math_ops", 932 "//tensorflow/python:platform_test", 933 "//tensorflow/python:session", 934 "//tensorflow/python:util", 935 ], 936) 937 938cuda_py_test( 939 name = "stepper_cli_test", 940 size = "small", 941 srcs = ["cli/stepper_cli_test.py"], 942 additional_deps = [ 943 ":stepper", 944 ":stepper_cli", 945 "//third_party/py/numpy", 946 "@six_archive//:six", 947 "//tensorflow/python:array_ops", 948 "//tensorflow/python:client", 949 "//tensorflow/python:framework_for_generated_wrappers", 950 "//tensorflow/python:framework_test_lib", 951 "//tensorflow/python:platform_test", 952 "//tensorflow/python:math_ops", 953 "//tensorflow/python:training", 954 "//tensorflow/python:variables", 955 ], 956) 957 958cuda_py_test( 959 name = "session_debug_grpc_test", 960 size = "medium", 961 srcs = ["lib/session_debug_grpc_test.py"], 962 additional_deps = [ 963 ":debug_data", 964 ":debug_utils", 965 ":dumping_wrapper", 966 ":grpc_debug_test_server", 967 ":grpc_wrapper", 968 ":hooks", 969 ":session_debug_testlib", 970 "//third_party/py/numpy", 971 "//tensorflow/python:client", 972 "//tensorflow/python:client_testlib", 973 "//tensorflow/python:framework_for_generated_wrappers", 974 "//tensorflow/python:math_ops", 975 "//tensorflow/python:platform_test", 976 "//tensorflow/python:variables", 977 ], 978 tags = [ 979 "no_oss", # Test flaky due to port collisions. 980 "no_windows", 981 "notsan", 982 "oss_serial", 983 ], 984) 985 986# TODO(cais): Run the test in OSS, perhaps through a sh_test. 987cuda_py_test( 988 name = "dist_session_debug_grpc_test", 989 size = "medium", 990 srcs = ["lib/dist_session_debug_grpc_test.py"], 991 additional_deps = [ 992 ":debug_data", 993 ":debug_utils", 994 ":dumping_wrapper", 995 ":grpc_debug_test_server", 996 ":grpc_wrapper", 997 ":hooks", 998 "//tensorflow/python:client", 999 "//tensorflow/python:client_testlib", 1000 "//tensorflow/python:framework_for_generated_wrappers", 1001 "//tensorflow/python:math_ops", 1002 "//tensorflow/python:platform_test", 1003 "//tensorflow/python:variables", 1004 ], 1005 data = ["//tensorflow/tools/dist_test/server:grpc_tensorflow_server"], 1006 grpc_enabled = True, 1007 tags = [ 1008 "no_oss", # Incompatible with bazel_pip. 1009 "no_windows", 1010 "nomac", # TODO(cais): Install of futures and grpcio on all macs. 1011 "notsan", 1012 ], 1013) 1014 1015py_test( 1016 name = "dumping_wrapper_test", 1017 size = "small", 1018 srcs = ["wrappers/dumping_wrapper_test.py"], 1019 srcs_version = "PY2AND3", 1020 deps = [ 1021 ":debug_data", 1022 ":dumping_wrapper", 1023 ":framework", 1024 ":hooks", 1025 ":stepper", 1026 "//tensorflow/python:array_ops", 1027 "//tensorflow/python:client", 1028 "//tensorflow/python:framework_for_generated_wrappers", 1029 "//tensorflow/python:framework_test_lib", 1030 "//tensorflow/python:platform", 1031 "//tensorflow/python:platform_test", 1032 "//tensorflow/python:state_ops", 1033 "//tensorflow/python:training", 1034 "//tensorflow/python:variables", 1035 ], 1036) 1037 1038py_test( 1039 name = "local_cli_wrapper_test", 1040 size = "small", 1041 srcs = ["wrappers/local_cli_wrapper_test.py"], 1042 srcs_version = "PY2AND3", 1043 deps = [ 1044 ":cli_shared", 1045 ":debugger_cli_common", 1046 ":local_cli_wrapper", 1047 ":ui_factory", 1048 "//tensorflow/core:protos_all_py", 1049 "//tensorflow/python:array_ops", 1050 "//tensorflow/python:client", 1051 "//tensorflow/python:control_flow_ops", 1052 "//tensorflow/python:errors", 1053 "//tensorflow/python:framework_for_generated_wrappers", 1054 "//tensorflow/python:framework_test_lib", 1055 "//tensorflow/python:math_ops", 1056 "//tensorflow/python:platform_test", 1057 "//tensorflow/python:resource_variable_ops", 1058 "//tensorflow/python:state_ops", 1059 "//tensorflow/python:training", 1060 "//tensorflow/python:variables", 1061 ], 1062) 1063 1064sh_test( 1065 name = "examples_test", 1066 size = "medium", 1067 srcs = ["examples/examples_test.sh"], 1068 data = [ 1069 ":debug_errors", 1070 ":debug_fibonacci", 1071 ":debug_mnist", 1072 ":debug_tflearn_iris", 1073 ":offline_analyzer", 1074 ], 1075) 1076 1077filegroup( 1078 name = "all_files", 1079 srcs = glob( 1080 ["**/*"], 1081 exclude = [ 1082 "**/METADATA", 1083 "**/OWNERS", 1084 ], 1085 ), 1086 visibility = ["//tensorflow:__subpackages__"], 1087) 1088