[TOC]
Public Python API of TensorFlow Debugger (tfdbg).
These functions help you modify RunOptions
to specify which Tensor
s are to
be watched when the TensorFlow graph is executed at runtime.
tf_debug.add_debug_tensor_watch(run_options, node_name, output_slot=0, debug_ops='DebugIdentity', debug_urls=None)
{#add_debug_tensor_watch}
Add watch on a Tensor
to RunOptions
.
N.B.: Under certain circumstances, the Tensor
may not be actually watched
(e.g., if the node of the Tensor
is constant-folded during runtime).
run_options
: An instance ofconfig_pb2.RunOptions
to be modified.node_name
: (str
) name of the node to watch.output_slot
: (int
) output slot index of the tensor from the watched node.debug_ops
: (str
orlist
ofstr
) name(s) of the debug op(s). Can be alist
ofstr
or a singlestr
. The latter case is equivalent to alist
ofstr
with only one element.debug_urls
: (str
orlist
ofstr
) URL(s) to send debug values to, e.g.,file:///tmp/tfdbg_dump_1
,grpc://localhost:12345
.
tf_debug.watch_graph(run_options, graph, debug_ops='DebugIdentity', debug_urls=None, node_name_regex_whitelist=None, op_type_regex_whitelist=None)
{#watch_graph}
Add debug watches to RunOptions
for a TensorFlow graph.
To watch all Tensor
s on the graph, let both node_name_regex_whitelist
and op_type_regex_whitelist
be the default (None
).
N.B.: Under certain circumstances, not all specified Tensor
s will be
actually watched (e.g., nodes that are constant-folded during runtime will
not be watched).
run_options
: An instance ofconfig_pb2.RunOptions
to be modified.graph
: An instance ofops.Graph
.debug_ops
: (str
orlist
ofstr
) name(s) of the debug op(s) to use.debug_urls
: URLs to send debug values to. Can be a list of strings, a single string, or None. The case of a single string is equivalent to a list consisting of a single string, e.g.,file:///tmp/tfdbg_dump_1
,grpc://localhost:12345
.node_name_regex_whitelist
: Regular-expression whitelist for node_name, e.g.,"(weight_[0-9]+|bias_.*)"
op_type_regex_whitelist
: Regular-expression whitelist for the op type of nodes, e.g.,"(Variable|Add)"
. If bothnode_name_regex_whitelist
andop_type_regex_whitelist
are set, the two filtering operations will occur in a logicalAND
relation. In other words, a node will be included if and only if it hits both whitelists.
tf_debug.watch_graph_with_blacklists(run_options, graph, debug_ops='DebugIdentity', debug_urls=None, node_name_regex_blacklist=None, op_type_regex_blacklist=None)
{#watch_graph_with_blacklists}
Add debug tensor watches, blacklisting nodes and op types.
This is similar to watch_graph()
, but the node names and op types are
blacklisted, instead of whitelisted.
N.B.: Under certain circumstances, not all specified Tensor
s will be
actually watched (e.g., nodes that are constant-folded during runtime will
not be watched).
run_options
: An instance ofconfig_pb2.RunOptions
to be modified.graph
: An instance ofops.Graph
.debug_ops
: (str
orlist
ofstr
) name(s) of the debug op(s) to use.debug_urls
: URL(s) to send ebug values to, e.g.,file:///tmp/tfdbg_dump_1
,grpc://localhost:12345
.node_name_regex_blacklist
: Regular-expression blacklist for node_name. This should be a string, e.g.,"(weight_[0-9]+|bias_.*)"
.op_type_regex_blacklist
: Regular-expression blacklist for the op type of nodes, e.g.,"(Variable|Add)"
. If both node_name_regex_blacklist and op_type_regex_blacklist are set, the two filtering operations will occur in a logicalOR
relation. In other words, a node will be excluded if it hits either of the two blacklists; a node will be included if and only if it hits neither of the blacklists.
These classes allow you to load and inspect tensor values dumped from TensorFlow graphs during runtime.
A single tensor dumped by TensorFlow Debugger (tfdbg).
Contains metadata about the dumped tensor, including timestamp
,
node_name
, output_slot
, debug_op
, and path to the dump file
(file_path
).
This type does not hold the generally space-expensive tensor value (numpy
array). Instead, it points to the file from which the tensor value can be
loaded (with the get_tensor
method) if needed.
DebugTensorDatum
constructor.
dump_root
: (str
) Debug dump root directory.debug_dump_rel_path
: (str
) Path to a debug dump file, relative to thedump_root
. For example, suppose the debug dump root directory is/tmp/tfdbg_1
and the dump file is at/tmp/tfdbg_1/ns_1/node_a_0_DebugIdentity_123456789
, then the value of the debug_dump_rel_path should bens_1/node_a_0_DebugIdenity_1234456789
.
ValueError
: If the base file name of the dump file does not conform to the dump file naming pattern:node_name
output_slot
debug_op
_timestamp
Name of the debug op.
(str
) debug op name (e.g., DebugIdentity
).
Size of the dump file.
Unit: byte.
If the dump file exists, size of the dump file, in bytes. If the dump file does not exist, None.
Path to the file which stores the value of the dumped tensor.
Get tensor from the dump (Event
) file.
The tensor loaded from the dump (Event
) file.
Name of the node from which the tensor value was dumped.
(str
) name of the node watched by the debug op.
Output slot index from which the tensor value was dumped.
(int
) output slot index watched by the debug op.
Name of the tensor watched by the debug op.
(str
) Tensor
name, in the form of node_name
:output_slot
Timestamp of when this tensor value was dumped.
(int
) The timestamp in microseconds.
Watch key identities a debug watch on a tensor.
(str
) A watch key, in the form of tensor_name
:debug_op
.
Data set from a debug-dump directory on filesystem.
An instance of DebugDumpDir
contains all DebugTensorDatum
instances
in a tfdbg dump root directory.
tf_debug.DebugDumpDir.__init__(dump_root, partition_graphs=None, validate=True)
{#DebugDumpDir.init}
DebugDumpDir
constructor.
dump_root
: (str
) path to the dump root directory.partition_graphs
: A repeated field of GraphDefs representing the partition graphs executed by the TensorFlow runtime.validate
: (bool
) whether the dump files are to be validated against the partition graphs.
IOError
: If dump_root does not exist as a directory.
Get all tensor watch keys of given node according to partition graphs.
node_name
: (str
) name of the node.
(list
of str
) all debug tensor watch keys. Returns an empty list if
the node name does not correspond to any debug watch keys.
LookupError
: If debug watch information has not been loaded from
partition graphs yet.
Get the list of devices.
(list
of str
) names of the devices.
LookupError
: If node inputs and control inputs have not been loaded from partition graphs yet.
Find dumped tensor data by a certain predicate.
-
predicate
: A callable that takes two input arguments:def predicate(debug_tensor_datum, tensor): # returns a bool
where
debug_tensor_datum
is an instance ofDebugTensorDatum
, which carries the metadata, such as theTensor
's node name, output slot timestamp, debug op name, etc.; andtensor
is the dumped tensor value as anumpy.ndarray
. -
first_n
: (int
) return only the first nDebugTensotDatum
instances (in time order) for which the predicate returns True. To return all theDebugTensotDatum
instances, let first_n be <= 0.
A list of all DebugTensorDatum
objects in this DebugDumpDir
object
for which predicate returns True, sorted in ascending order of the
timestamp.
tf_debug.DebugDumpDir.get_dump_sizes_bytes(node_name, output_slot, debug_op)
{#DebugDumpDir.get_dump_sizes_bytes}
Get the sizes of the dump files for a debug-dumped tensor.
Unit of the file size: byte.
node_name
: (str
) name of the node that the tensor is produced by.output_slot
: (int
) output slot index of tensor.debug_op
: (str
) name of the debug op.
(list
of int
): list of dump file sizes in bytes.
ValueError
: If the tensor watch key does not exist in the debug dump data.
tf_debug.DebugDumpDir.get_rel_timestamps(node_name, output_slot, debug_op)
{#DebugDumpDir.get_rel_timestamps}
Get the relative timestamp from for a debug-dumped tensor.
Relative timestamp means (absolute timestamp - t0
), where t0
is the
absolute timestamp of the first dumped tensor in the dump root. The tensor
may be dumped multiple times in the dump root directory, so a list of
relative timestamps (numpy.ndarray
) is returned.
node_name
: (str
) name of the node that the tensor is produced by.output_slot
: (int
) output slot index of tensor.debug_op
: (str
) name of the debug op.
(list
of int
) list of relative timestamps.
ValueError
: If the tensor watch key does not exist in the debug dump data.
tf_debug.DebugDumpDir.get_tensor_file_paths(node_name, output_slot, debug_op)
{#DebugDumpDir.get_tensor_file_paths}
Get the file paths from a debug-dumped tensor.
node_name
: (str
) name of the node that the tensor is produced by.output_slot
: (int
) output slot index of tensor.debug_op
: (str
) name of the debug op.
List of file path(s) loaded. This is a list because each debugged tensor may be dumped multiple times.
ValueError
: If the tensor does not exist in the debug-dump data.
Get the tensor value from for a debug-dumped tensor.
The tensor may be dumped multiple times in the dump root directory, so a
list of tensors (numpy.ndarray
) is returned.
node_name
: (str
) name of the node that the tensor is produced by.output_slot
: (int
) output slot index of tensor.debug_op
: (str
) name of the debug op.
List of tensors (numpy.ndarray
) loaded from the debug-dump file(s).
ValueError
: If the tensor does not exist in the debug-dump data.
Test whether partition graphs have been loaded.
Get the attributes of a node.
node_name
: Name of the node in question.
Attributes of the node.
LookupError
: If no partition graphs have been loaded.ValueError
: If no node named node_name exists.
Get the device of a node.
node_name
: (str
) name of the node.
(str
) name of the device on which the node is placed.
LookupError
: If node inputs and control inputs have not been loaded from partition graphs yet.ValueError
: If the node does not exist in partition graphs.
Test if a node exists in the partition graphs.
node_name
: (str
) name of the node to be checked.
A boolean indicating whether the node exists.
LookupError
: If no partition graphs have been loaded yet.
Get the inputs of given node according to partition graphs.
node_name
: Name of the node.is_control
: (bool
) Whether control inputs, rather than non-control inputs, are to be returned.
(list
of str
) inputs to the node, as a list of node names.
LookupError
: If node inputs and control inputs have not been loaded from partition graphs yet.ValueError
: If the node does not exist in partition graphs.
Get the op type of given node.
node_name
: (str
) name of the node.
(str
) op type of the node.
LookupError
: If node op types have not been loaded from partition graphs yet.ValueError
: If the node does not exist in partition graphs.
Get recipient of the given node's output according to partition graphs.
node_name
: (str
) name of the node.is_control
: (bool
) whether control outputs, rather than non-control outputs, are to be returned.
(list
of str
) all inputs to the node, as a list of node names.
LookupError
: If node inputs and control inputs have not been loaded from partition graphs yet.ValueError
: If the node does not exist in partition graphs.
Try to retrieve the Python traceback of node's construction.
element_name
: (str
) Name of a graph element (node or tensor).
(list) The traceback list object as returned by the extract_trace
method of Python's traceback module.
LookupError
: If Python graph is not available for traceback lookup.KeyError
: If the node cannot be found in the Python graph loaded.
Get a list of all nodes from the partition graphs.
All nodes' names, as a list of str.
LookupError
: If no partition graphs have been loaded.
Get the partition graphs.
Partition graphs as repeated fields of GraphDef.
LookupError
: If no partition graphs have been loaded.
Get a str representation of the feed_dict used in the Session.run() call.
If the information is available, a str
obtained from repr(feed_dict)
.
If the information is not available, None
.
Get a str representation of the fetches used in the Session.run() call.
If the information is available, a str
obtained from repr(fetches)
.
If the information is not available, None
.
Provide Python Graph
object to the wrapper.
Unlike the partition graphs, which are protobuf GraphDef
objects, Graph
is a Python object and carries additional information such as the traceback
of the construction of the nodes in the graph.
python_graph
: (ops.Graph) The Python Graph object.
Total number of dumped tensors in the dump root directory.
(int
) total number of dumped tensors in the dump root directory.
Absolute timestamp of the first dumped tensor.
(int
) absolute timestamp of the first dumped tensor, in microseconds.
tf_debug.DebugDumpDir.transitive_inputs(node_name, include_control=True)
{#DebugDumpDir.transitive_inputs}
Get the transitive inputs of given node according to partition graphs.
node_name
: Name of the nodeinclude_control
: Include control inputs (True by default).
(list
of str
) all transitive inputs to the node, as a list of node
names.
LookupError
: If node inputs and control inputs have not been loaded from partition graphs yet.ValueError
: If the node does not exist in partition graphs.
Get all DebugTensorDatum
instances corresponding to a debug watch key.
debug_watch_key
: (str
) debug watch key.
A list of DebugTensorDatum
instances that correspond to the debug watch
key. If the watch key does not exist, returns an empty list.
ValueError
: If the debug watch key does not exist.
Load a tensor from an event file.
Assumes that the event file contains a Event
protobuf and the Event
protobuf contains a Tensor
value.
event_file_path
: (str
) path to the event file.
The tensor value loaded from the event file, as a numpy.ndarray
. For
uninitialized tensors, returns None.
Built-in tensor-filter predicates to support conditional breakpoint between
runs. See DebugDumpDir.find()
for more details.
A predicate for whether a tensor consists of any bad numerical values.
This predicate is common enough to merit definition in this module.
Bad numerical values include nan
s and inf
s.
The signature of this function follows the requirement of the method
DebugDumpDir.find()
.
datum
: (DebugTensorDatum
) Datum metadata.tensor
: (numpy.ndarray
or None) Value of the tensor. None represents an uninitialized tensor.
(bool
) True if and only if tensor consists of any nan or inf values.
These classes allow you to
- wrap aroundTensorFlow
Session
objects to debug plain TensorFlow models (seeDumpingDebugWrapperSession
andLocalCLIDebugWrapperSession
), or - generate
SessionRunHook
objects to debugtf.contrib.learn
models (seeDumpingDebugHook
andLocalCLIDebugHook
).
A debugger hook that dumps debug data to filesystem.
Can be used as a monitor/hook for tf.train.MonitoredSession
s and
tf.contrib.learn
's Estimator
s and Experiment
s.
tf_debug.DumpingDebugHook.__init__(session_root, watch_fn=None, log_usage=True)
{#DumpingDebugHook.init}
Create a local debugger command-line interface (CLI) hook.
session_root
: See doc ofdumping_wrapper.DumpingDebugWrapperSession.__init__
.watch_fn
: See doc ofdumping_wrapper.DumpingDebugWrapperSession.__init__
.log_usage
: (bool) Whether usage is to be logged.
tf_debug.DumpingDebugHook.after_create_session(session, coord)
{#DumpingDebugHook.after_create_session}
Called when new TensorFlow session is created.
This is called to signal the hooks that a new session has been created. This
has two essential differences with the situation in which begin
is called:
- When this is called, the graph is finalized and ops can no longer be added to the graph.
- This method will also be called as a result of recovering a wrapped session, not only at the beginning of the overall session.
session
: A TensorFlow Session that has been created.coord
: A Coordinator object which keeps track of all threads.
Called at the end of session.
The session
argument can be used in case the hook wants to run final ops,
such as saving a last checkpoint.
session
: A TensorFlow Session that will be soon closed.
tf_debug.DumpingDebugHook.invoke_node_stepper(node_stepper, restore_variable_values_on_exit=True)
{#DumpingDebugHook.invoke_node_stepper}
See doc of BaseDebugWrapperSession.invoke_node_stepper.
See doc of BaseDebugWrapperSession.on_run_end.
See doc of BaseDebugWrapperSession.on_run_start.
See doc of BaseDebugWrapperSession.on_run_start.
tf_debug.DumpingDebugHook.partial_run(handle, fetches, feed_dict=None)
{#DumpingDebugHook.partial_run}
tf_debug.DumpingDebugHook.partial_run_setup(fetches, feeds=None)
{#DumpingDebugHook.partial_run_setup}
Sets up the feeds and fetches for partial runs in the session.
tf_debug.DumpingDebugHook.run(fetches, feed_dict=None, options=None, run_metadata=None)
{#DumpingDebugHook.run}
Wrapper around Session.run() that inserts tensor watch options.
fetches
: Same as thefetches
arg to regularSession.run()
.feed_dict
: Same as thefeed_dict
arg to regularSession.run()
.options
: Same as theoptions
arg to regularSession.run()
.run_metadata
: Same as therun_metadata
arg to regularSession.run()
.
Simply forwards the output of the wrapped Session.run()
call.
ValueError
: On invalidOnRunStartAction
value.
Debug Session wrapper that dumps debug data to filesystem.
tf_debug.DumpingDebugWrapperSession.__exit__(exec_type, exec_value, exec_tb)
{#DumpingDebugWrapperSession.exit}
tf_debug.DumpingDebugWrapperSession.__init__(sess, session_root, watch_fn=None, log_usage=True)
{#DumpingDebugWrapperSession.init}
Constructor of DumpingDebugWrapperSession.
sess
: The TensorFlowSession
object being wrapped.session_root
: (str
) Path to the session root directory. Must be a directory that does not exist or an empty directory. If the directory does not exist, it will be created by the debugger core during debugSession.run()
calls. As therun()
calls occur, subdirectories will be added tosession_root
. The subdirectories' names has the following pattern: run_<epoch_time_stamp>_ E.g., run_1480734393835964_ad4c953a85444900ae79fc1b652fb324watch_fn
: (Callable
) A Callable that can be used to define per-run debug ops and watched tensors. See the doc ofNonInteractiveDebugWrapperSession.__init__()
for details.log_usage
: (bool
) whether the usage of this class is to be logged.
ValueError
: Ifsession_root
is an existing and non-empty directory or ifsession_root
is a file.
tf_debug.DumpingDebugWrapperSession.invoke_node_stepper(node_stepper, restore_variable_values_on_exit=True)
{#DumpingDebugWrapperSession.invoke_node_stepper}
See doc of BaseDebugWrapperSession.invoke_node_stepper.
See doc of BaseDebugWrapperSession.on_run_end.
tf_debug.DumpingDebugWrapperSession.on_run_start(request)
{#DumpingDebugWrapperSession.on_run_start}
See doc of BaseDebugWrapperSession.on_run_start.
tf_debug.DumpingDebugWrapperSession.on_session_init(request)
{#DumpingDebugWrapperSession.on_session_init}
See doc of BaseDebugWrapperSession.on_run_start.
tf_debug.DumpingDebugWrapperSession.partial_run(handle, fetches, feed_dict=None)
{#DumpingDebugWrapperSession.partial_run}
tf_debug.DumpingDebugWrapperSession.partial_run_setup(fetches, feeds=None)
{#DumpingDebugWrapperSession.partial_run_setup}
Sets up the feeds and fetches for partial runs in the session.
tf_debug.DumpingDebugWrapperSession.run(fetches, feed_dict=None, options=None, run_metadata=None)
{#DumpingDebugWrapperSession.run}
Wrapper around Session.run() that inserts tensor watch options.
fetches
: Same as thefetches
arg to regularSession.run()
.feed_dict
: Same as thefeed_dict
arg to regularSession.run()
.options
: Same as theoptions
arg to regularSession.run()
.run_metadata
: Same as therun_metadata
arg to regularSession.run()
.
Simply forwards the output of the wrapped Session.run()
call.
ValueError
: On invalidOnRunStartAction
value.
Command-line-interface debugger hook.
Can be used as a monitor/hook for tf.train.MonitoredSession
s and
tf.contrib.learn
's Estimator
s and Experiment
s.
Create a local debugger command-line interface (CLI) hook.
ui_type
: (str) user-interface type.
tf_debug.LocalCLIDebugHook.add_tensor_filter(filter_name, tensor_filter)
{#LocalCLIDebugHook.add_tensor_filter}
Add a tensor filter.
filter_name
: (str
) name of the filter.tensor_filter
: (callable
) the filter callable. See the doc string ofDebugDumpDir.find()
for more details about its signature.
tf_debug.LocalCLIDebugHook.after_create_session(session, coord)
{#LocalCLIDebugHook.after_create_session}
Called when new TensorFlow session is created.
This is called to signal the hooks that a new session has been created. This
has two essential differences with the situation in which begin
is called:
- When this is called, the graph is finalized and ops can no longer be added to the graph.
- This method will also be called as a result of recovering a wrapped session, not only at the beginning of the overall session.
session
: A TensorFlow Session that has been created.coord
: A Coordinator object which keeps track of all threads.
Called at the end of session.
The session
argument can be used in case the hook wants to run final ops,
such as saving a last checkpoint.
session
: A TensorFlow Session that will be soon closed.
tf_debug.LocalCLIDebugHook.invoke_node_stepper(node_stepper, restore_variable_values_on_exit=True)
{#LocalCLIDebugHook.invoke_node_stepper}
Overrides method in base class to implement interactive node stepper.
node_stepper
: (stepper.NodeStepper
) The underlying NodeStepper API object.restore_variable_values_on_exit
: (bool
) Whether any variables whose values have been altered during this node-stepper invocation should be restored to their old values when this invocation ends.
The same return values as the Session.run()
call on the same fetches as
the NodeStepper.
Overrides on-run-end callback.
- Load the debug dump.
- Bring up the Analyzer CLI.
request
: An instance of OnSessionInitRequest.
An instance of OnSessionInitResponse.
Overrides on-run-start callback.
run
/ invoke_stepper
.
request
: An instance ofOnSessionInitRequest
.
An instance of OnSessionInitResponse
.
RuntimeError
: If user chooses to prematurely exit the debugger.
Overrides on-session-init callback.
request
: An instance ofOnSessionInitRequest
.
An instance of OnSessionInitResponse
.
tf_debug.LocalCLIDebugHook.partial_run(handle, fetches, feed_dict=None)
{#LocalCLIDebugHook.partial_run}
tf_debug.LocalCLIDebugHook.partial_run_setup(fetches, feeds=None)
{#LocalCLIDebugHook.partial_run_setup}
Sets up the feeds and fetches for partial runs in the session.
tf_debug.LocalCLIDebugHook.run(fetches, feed_dict=None, options=None, run_metadata=None)
{#LocalCLIDebugHook.run}
Wrapper around Session.run() that inserts tensor watch options.
fetches
: Same as thefetches
arg to regularSession.run()
.feed_dict
: Same as thefeed_dict
arg to regularSession.run()
.options
: Same as theoptions
arg to regularSession.run()
.run_metadata
: Same as therun_metadata
arg to regularSession.run()
.
Simply forwards the output of the wrapped Session.run()
call.
ValueError
: On invalidOnRunStartAction
value.
Concrete subclass of BaseDebugWrapperSession implementing a local CLI.
This class has all the methods that a session.Session
object has, in order
to support debugging with minimal code changes. Invoking its run()
method
will launch the command-line interface (CLI) of tfdbg.
tf_debug.LocalCLIDebugWrapperSession.__exit__(exec_type, exec_value, exec_tb)
{#LocalCLIDebugWrapperSession.exit}
tf_debug.LocalCLIDebugWrapperSession.__init__(sess, dump_root=None, log_usage=True, ui_type='curses')
{#LocalCLIDebugWrapperSession.init}
Constructor of LocalCLIDebugWrapperSession.
sess
: The TensorFlowSession
object being wrapped.dump_root
: (str
) optional path to the dump root directory. Must be a directory that does not exist or an empty directory. If the directory does not exist, it will be created by the debugger core during debugrun()
calls and removed afterwards.log_usage
: (bool
) whether the usage of this class is to be logged.ui_type
: (str
) requested UI type. Currently supported: (curses | readline)
ValueError
: If dump_root is an existing and non-empty directory or if dump_root is a file.
tf_debug.LocalCLIDebugWrapperSession.add_tensor_filter(filter_name, tensor_filter)
{#LocalCLIDebugWrapperSession.add_tensor_filter}
Add a tensor filter.
filter_name
: (str
) name of the filter.tensor_filter
: (callable
) the filter callable. See the doc string ofDebugDumpDir.find()
for more details about its signature.
tf_debug.LocalCLIDebugWrapperSession.invoke_node_stepper(node_stepper, restore_variable_values_on_exit=True)
{#LocalCLIDebugWrapperSession.invoke_node_stepper}
Overrides method in base class to implement interactive node stepper.
node_stepper
: (stepper.NodeStepper
) The underlying NodeStepper API object.restore_variable_values_on_exit
: (bool
) Whether any variables whose values have been altered during this node-stepper invocation should be restored to their old values when this invocation ends.
The same return values as the Session.run()
call on the same fetches as
the NodeStepper.
Overrides on-run-end callback.
- Load the debug dump.
- Bring up the Analyzer CLI.
request
: An instance of OnSessionInitRequest.
An instance of OnSessionInitResponse.
tf_debug.LocalCLIDebugWrapperSession.on_run_start(request)
{#LocalCLIDebugWrapperSession.on_run_start}
Overrides on-run-start callback.
run
/ invoke_stepper
.
request
: An instance ofOnSessionInitRequest
.
An instance of OnSessionInitResponse
.
RuntimeError
: If user chooses to prematurely exit the debugger.
tf_debug.LocalCLIDebugWrapperSession.on_session_init(request)
{#LocalCLIDebugWrapperSession.on_session_init}
Overrides on-session-init callback.
request
: An instance ofOnSessionInitRequest
.
An instance of OnSessionInitResponse
.
tf_debug.LocalCLIDebugWrapperSession.partial_run(handle, fetches, feed_dict=None)
{#LocalCLIDebugWrapperSession.partial_run}
tf_debug.LocalCLIDebugWrapperSession.partial_run_setup(fetches, feeds=None)
{#LocalCLIDebugWrapperSession.partial_run_setup}
Sets up the feeds and fetches for partial runs in the session.
tf_debug.LocalCLIDebugWrapperSession.run(fetches, feed_dict=None, options=None, run_metadata=None)
{#LocalCLIDebugWrapperSession.run}
Wrapper around Session.run() that inserts tensor watch options.
fetches
: Same as thefetches
arg to regularSession.run()
.feed_dict
: Same as thefeed_dict
arg to regularSession.run()
.options
: Same as theoptions
arg to regularSession.run()
.run_metadata
: Same as therun_metadata
arg to regularSession.run()
.
Simply forwards the output of the wrapped Session.run()
call.
ValueError
: On invalidOnRunStartAction
value.