MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / to_string

Method to_string

python/paddle/base/framework.py:3566–3580  ·  view source on GitHub ↗

Get debug string. Args: throw_on_error(bool): Whether to raise exception if self is not initialized. Returns: str: The debug string.

(self, throw_on_error)

Source from the content-addressed store, hash-verified

3564 return op_type not in self.OP_WITHOUT_KERNEL_SET
3565
3566 def to_string(self, throw_on_error):
3567 """
3568 Get debug string.
3569
3570 Args:
3571 throw_on_error(bool): Whether to raise exception if self is not
3572 initialized.
3573
3574 Returns:
3575 str: The debug string.
3576
3577 """
3578 protostr = self.desc.serialize_to_string()
3579 proto = framework_pb2.OpDesc.FromString(bytes(protostr))
3580 return _debug_string_(proto, throw_on_error)
3581
3582 def _to_readable_code(self, skip_op_callstack=True):
3583 """

Callers

nothing calls this directly

Calls 2

_debug_string_Function · 0.85
serialize_to_stringMethod · 0.45

Tested by

no test coverage detected