
    &VfF                     0    d Z ddlmZ ddlmZ ddZd ZdS )zFContains summaries related to laying out the custom scalars dashboard.    )
layout_pb2)metadataNc                    ddl mc m} t          | t          j                  sJ t          j                    }|j        	                    t          j
        |                    |                                 |j                  ||          S )a  Creates a summary that contains a layout.

    When users navigate to the custom scalars dashboard, they will see a layout
    based on the proto provided to this function.

    Args:
      scalars_layout: The scalars_layout_pb2.Layout proto that specifies the
          layout.
      collections: Optional list of graph collections keys. The new
          summary op is added to these collections. Defaults to
          `[Graph Keys.SUMMARIES]`.

    Returns:
      A tensor summary op that writes the layout to disk.
    r   Ndtype)nametensorcollectionssummary_metadata)tensorflow.compat.v1compatv1
isinstancer   Layoutr   create_summary_metadatasummarytensor_summaryCONFIG_SUMMARY_TAGconstantSerializeToStringstring)scalars_layoutr
   tfr   s       f/var/www/html/software/conda/lib/python3.11/site-packages/tensorboard/plugins/custom_scalar/summary.pyopr      s    " &%%%%%%%%nj&788888799:$$({{>;;==RY{OO)	 %       c                    ddl mc m} t          | t          j                  sJ |                    |                                 |j                  }|j	        
                    t          j                                                              }|                                }|j                            t          j        ||           |S )aV  Creates a summary that contains a layout.

    When users navigate to the custom scalars dashboard, they will see a layout
    based on the proto provided to this function.

    Args:
      scalars_layout: The scalars_layout_pb2.Layout proto that specifies the
          layout.

    Returns:
      A summary proto containing the layout.
    r   Nr   )tagr   r	   )r   r   r   r   r   r   make_tensor_protor   r   SummaryMetadata
FromStringr   r   Summaryvalueaddr   )r   r   r	   tf_summary_metadatar   s        r   pbr&   3   s     &%%%%%%%%nj&788888!!((**") "  F ,77(**<<>>  jjllGM'$    
 Nr   )N)__doc__!tensorboard.plugins.custom_scalarr   r   r   r&    r   r   <module>r*      sa    M L 9 8 8 8 8 8 6 6 6 6 6 6   :    r   