Try to retrieve the Python traceback of node's construction. Args: element_name: (`str`) Name of a graph element (node or tensor). Returns: (list) The traceback list object as returned by the `extract_trace` method of Python's traceback module. Raises: Lookup
(self, element_name)
| 1601 | return self._watch_key_to_dump_size_bytes[device_name][watch_key] |
| 1602 | |
| 1603 | def node_traceback(self, element_name): |
| 1604 | """Try to retrieve the Python traceback of node's construction. |
| 1605 | |
| 1606 | Args: |
| 1607 | element_name: (`str`) Name of a graph element (node or tensor). |
| 1608 | |
| 1609 | Returns: |
| 1610 | (list) The traceback list object as returned by the `extract_trace` |
| 1611 | method of Python's traceback module. |
| 1612 | |
| 1613 | Raises: |
| 1614 | LookupError: If Python graph is not available for traceback lookup. |
| 1615 | KeyError: If the node cannot be found in the Python graph loaded. |
| 1616 | """ |
| 1617 | |
| 1618 | if self._python_graph is None: |
| 1619 | raise LookupError("Python graph is not available for traceback lookup") |
| 1620 | |
| 1621 | node_name = debug_graphs.get_node_name(element_name) |
| 1622 | if node_name not in self._node_traceback: |
| 1623 | raise KeyError("Cannot find node \"%s\" in Python graph" % node_name) |
| 1624 | |
| 1625 | return self._node_traceback[node_name] |
no outgoing calls