Get all tensor watch keys of given node according to partition graphs. Args: node_name: (`str`) name of the node. device_name: (`str`) name of the device. If there is only one device or if node_name exists on only one device, this argument is optional. Returns: (`
(self, node_name, device_name=None)
| 1344 | return self._debug_graphs[device_name].node_op_types[node_name] |
| 1345 | |
| 1346 | def debug_watch_keys(self, node_name, device_name=None): |
| 1347 | """Get all tensor watch keys of given node according to partition graphs. |
| 1348 | |
| 1349 | Args: |
| 1350 | node_name: (`str`) name of the node. |
| 1351 | device_name: (`str`) name of the device. If there is only one device or if |
| 1352 | node_name exists on only one device, this argument is optional. |
| 1353 | |
| 1354 | Returns: |
| 1355 | (`list` of `str`) all debug tensor watch keys. Returns an empty list if |
| 1356 | the node name does not correspond to any debug watch keys. |
| 1357 | |
| 1358 | Raises: |
| 1359 | `LookupError`: If debug watch information has not been loaded from |
| 1360 | partition graphs yet. |
| 1361 | """ |
| 1362 | |
| 1363 | try: |
| 1364 | device_name = self._infer_device_name(device_name, node_name) |
| 1365 | except ValueError: |
| 1366 | return [] |
| 1367 | |
| 1368 | if node_name not in self._debug_watches[device_name]: |
| 1369 | return [] |
| 1370 | |
| 1371 | watch_keys = [] |
| 1372 | for watched_slot in self._debug_watches[device_name][node_name]: |
| 1373 | debug_ops = self._debug_watches[device_name][node_name][watched_slot] |
| 1374 | for debug_op in debug_ops: |
| 1375 | watch_keys.append( |
| 1376 | _get_tensor_watch_key(node_name, watched_slot, debug_op)) |
| 1377 | |
| 1378 | return watch_keys |
| 1379 | |
| 1380 | def watch_key_to_data(self, debug_watch_key, device_name=None): |
| 1381 | """Get all `DebugTensorDatum` instances corresponding to a debug watch key. |