MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / export_run_metadata

Method export_run_metadata

tensorflow/python/eager/context.py:1453–1470  ·  view source on GitHub ↗

Returns a RunMetadata proto with accumulated information. The returned protocol buffer contains information since the most recent call to either enable_run_metadata or export_run_metadata. Returns: A RunMetadata protocol buffer. Or None if not enabled.

(self)

Source from the content-addressed store, hash-verified

1451 pywrap_tensorflow.TFE_ContextDisableGraphCollection(self._context_handle)
1452
1453 def export_run_metadata(self):
1454 """Returns a RunMetadata proto with accumulated information.
1455
1456 The returned protocol buffer contains information since the most recent call
1457 to either enable_run_metadata or export_run_metadata.
1458
1459 Returns:
1460 A RunMetadata protocol buffer. Or None if not enabled.
1461 """
1462 if not self._context_handle:
1463 return None
1464 with c_api_util.tf_buffer() as buffer_:
1465 pywrap_tensorflow.TFE_ContextExportRunMetadata(
1466 self._context_handle, buffer_)
1467 proto_data = pywrap_tensorflow.TF_GetBuffer(buffer_)
1468 run_metadata = config_pb2.RunMetadata()
1469 run_metadata.ParseFromString(compat.as_bytes(proto_data))
1470 return run_metadata
1471
1472 @property
1473 def context_switches(self):

Callers 3

trace_exportFunction · 0.80
export_run_metadataFunction · 0.80
testRunMetadataMethod · 0.80

Calls 2

RunMetadataMethod · 0.80
ParseFromStringMethod · 0.45

Tested by 1

testRunMetadataMethod · 0.64