
    1VhF                     .    d Z ddlmZ ddlmZ ddZd Zy)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                  j                  t        j                  |j                  | 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       Y/home/dcms/DCMS/lib/python3.12/site-packages/tensorboard/plugins/custom_scalar/summary.pyopr      sw    " &%nj&7&7888779::$$(({{>;;=RYY{O)	 %      c                    ddl mc m} t        | t        j
                        sJ |j                  | j                         |j                        }|j                  j                  t        j                         j                               }|j                         }|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&7888!!((*")) " F ,,77((*<<> jjlGMM''$  
 Nr   )N)__doc__!tensorboard.plugins.custom_scalarr   r   r   r&    r   r   <module>r*      s    M 9 6:r   