
    1Vh`	                     t    d Z ddlmZ  ej                  d      d        Z ej                  d      d        Zy)zCompatibility interfaces for TensorBoard.

This module provides logic for importing variations on the TensorFlow
APIs, as lazily loaded imports to help avoid circular dependency issues
and defer the search and loading of the module until necessary.
    Nztensorboard.compat.tfc                  n    	 ddl m}  ddl m} |S # t        $ r 	 ddl}|cY S # t        $ r Y nw xY wY +w xY w)a	  Provide the root module of a TF-like API for use within TensorBoard.

    By default this is equivalent to `import tensorflow as tf`, but it can be used
    in combination with //tensorboard/compat:tensorflow (to fall back to a stub TF
    API implementation if the real one is not available) or with
    //tensorboard/compat:no_tensorflow (to force unconditional use of the stub).

    Returns:
      The root module of a TF-like API, if available.

    Raises:
      ImportError: if a TF-like API is not available.
    r   )notfN)tensorflow_stub)tensorboard.compatr   ImportError
tensorflowr   )r   r   r   s      K/home/dcms/DCMS/lib/python3.12/site-packages/tensorboard/compat/__init__.pytfr
      sI    + 3  	 		s$    	4"4	.4.44ztensorboard.compat.tf2c                      t        t        d      r4t        t        j                  d      rt        j                  j                  S t	        d      )zProvide the root module of a TF-2.0 API for use within TensorBoard.

    Returns:
      The root module of a TF-2.0 API, if available.

    Raises:
      ImportError: if a TF-2.0 API is not available.
    compatv2z cannot import tensorflow 2.0 API)hasattrr
   r   r   r        r	   tf2r   7   s5     r8D!9yy||
8
99r   )__doc__tensorboard.lazylazy_lazy	lazy_loadr
   r   r   r   r	   <module>r      sO    ! () *8 )*: +:r   