diff options
author | Shanqing Cai <cais@google.com> | 2017-09-06 08:46:57 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-09-06 08:51:00 -0700 |
commit | fa0a40a51f6f9cce48342d40c19e184470148242 (patch) | |
tree | 469b86a68f6e054d754637bdae1a05b4db7c86a2 /tensorflow/python/debug/BUILD | |
parent | 0365fc5606ec36c0a559e50d1d65890de7a76ddd (diff) |
tfdbg: Refactor graph-processing code out of debug_data.py
The basic idea is to separate the code in debug_data.py that handles graph structures into its own module (debug_graphs.py). This tackles an existing TODO item to simplify the code debug_data.DebugDumpDir.
In a later CL, code will be added to debug_graphs.DebugGraph to allow reconstruction of the original GraphDef, i.e., the GraphDef without the Copy* and Debug* nodes inserted by tfdbg. This will be useful for, among other things, the TensorBoard Debugger Plugin.
PiperOrigin-RevId: 167726113
Diffstat (limited to 'tensorflow/python/debug/BUILD')
-rw-r--r-- | tensorflow/python/debug/BUILD | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/tensorflow/python/debug/BUILD b/tensorflow/python/debug/BUILD index 8eb2212069..c092616999 100644 --- a/tensorflow/python/debug/BUILD +++ b/tensorflow/python/debug/BUILD @@ -50,10 +50,25 @@ py_library( ) py_library( + name = "debug_graphs", + srcs = ["lib/debug_graphs.py"], + srcs_version = "PY2AND3", + deps = [ + "//tensorflow/core:protos_all_py", + "//tensorflow/python:framework", + "//tensorflow/python:op_def_registry", + "//tensorflow/python:platform", + "//tensorflow/python:tensor_util", + "@six_archive//:six", + ], +) + +py_library( name = "debug_data", srcs = ["lib/debug_data.py"], srcs_version = "PY2AND3", deps = [ + ":debug_graphs", "//tensorflow/core:protos_all_py", "//tensorflow/python:framework", "//tensorflow/python:op_def_registry", @@ -70,6 +85,7 @@ py_library( srcs_version = "PY2AND3", deps = [ ":debug_data", + ":debug_graphs", "//tensorflow/python:array_ops", "//tensorflow/python:framework", "//tensorflow/python:platform", @@ -99,6 +115,7 @@ py_library( srcs_version = "PY2AND3", deps = [ ":debug_data", + ":debug_graphs", ":debug_utils", "//tensorflow/core:protos_all_py", "//tensorflow/python:framework_for_generated_wrappers", @@ -181,7 +198,7 @@ py_library( deps = [ ":cli_shared", ":command_parser", - ":debug_data", + ":debug_graphs", ":debugger_cli_common", ":evaluator", ":source_utils", @@ -401,6 +418,18 @@ py_binary( ) py_test( + name = "debug_graphs_test", + size = "small", + srcs = ["lib/debug_graphs_test.py"], + srcs_version = "PY2AND3", + deps = [ + ":debug_graphs", + "//tensorflow/python:client_testlib", + "//tensorflow/python:framework_test_lib", + ], +) + +py_test( name = "debug_data_test", size = "small", srcs = ["lib/debug_data_test.py"], @@ -569,6 +598,7 @@ py_library( srcs_version = "PY2AND3", deps = [ ":debug_data", + ":debug_graphs", ":debug_utils", "//tensorflow/core:protos_all_py", "//tensorflow/python:array_ops", @@ -608,7 +638,7 @@ py_library( srcs_version = "PY2AND3", visibility = ["//visibility:public"], deps = [ - ":debug_data", + ":debug_graphs", ":debug_service_pb2_grpc", "//tensorflow/core/debug:debug_service_proto_py", "@six_archive//:six", |