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

Function _disable_summary_context

tensorflow/python/compiler/xla/xla.py:520–536  ·  view source on GitHub ↗

Enters a context where all summary ops are skipped. Summaries are not yet supported in xla.compile(). So we provide this context manager that can skip creating summary ops. This is a temporary workaround due to XLA not supporting summary ops. Yields: None.

()

Source from the content-addressed store, hash-verified

518
519@contextlib.contextmanager
520def _disable_summary_context():
521 """Enters a context where all summary ops are skipped.
522
523 Summaries are not yet supported in xla.compile(). So we provide this context
524 manager that can skip creating summary ops. This is a temporary workaround due
525 to XLA not supporting summary ops.
526
527 Yields:
528 None.
529 """
530 original_skip_summary_func = summary_op_util.skip_summary
531 summary_op_util.skip_summary = lambda: True
532
533 try:
534 yield
535 finally:
536 summary_op_util.skip_summary = original_skip_summary_func
537
538
539class _CapturedObject(object):

Callers 1

_compile_internalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected