
    BVh                     h    d Z ddlmZ ddlmZ  edd      	 	 	 d
d       Z edd      	 dd       Zy	)zProfiler client APIs.    )_pywrap_profiler_plugin)
deprecatedz
2020-07-01z,use `tf.profiler.experimental.client.trace`.c           	      :    t        j                  | |||||i        y)a  Sends grpc requests to profiler server to perform on-demand profiling.

  This method will block caller thread until receives tracing result.

  Args:
    service_addr: Address of profiler service e.g. localhost:6009.
    logdir: Path of TensorBoard log directory e.g. /tmp/tb_log.
    duration_ms: Duration of tracing or monitoring in ms.
    worker_list: The list of worker TPUs that we are about to profile in the
      current session. (TPU only)
    include_dataset_ops: Set to false to profile longer traces.
    num_tracing_attempts: Automatically retry N times when no trace event is
      collected.

  Raises:
    UnavailableError: If no trace event is collected.
  N)r   trace)service_addrlogdirduration_msworker_listinclude_dataset_opsnum_tracing_attemptss         W/home/dcms/DCMS/lib/python3.12/site-packages/tensorflow/python/eager/profiler_client.pystart_tracingr      s'    0     z.use `tf.profiler.experimental.client.monitor`.c                 2    t        j                  | |||      S )a/  Sends grpc requests to profiler server to perform on-demand monitoring.

  This method will block caller thread until receives monitoring result.

  Args:
    service_addr: Address of profiler service e.g. localhost:6009.
    duration_ms: Duration of tracing or monitoring in ms.
    monitoring_level: Choose a monitoring level between 1 and 2 to monitor your
      job. Level 2 is more verbose than level 1 and shows more metrics.
    display_timestamp: Set to true to display timestamp in monitoring result.

  Returns:
    A string of monitoring output.
  )r   monitor)r   r	   monitoring_leveldisplay_timestamps       r   r   r   8   s"    $ 
!	(	(K!13D
 r   N) T   )   F)__doc__#tensorflow.python.profiler.internalr   "tensorflow.python.util.deprecationr   r   r    r   r   <module>r      sY     G 9 LHI !&*'( JD LJKEJ Lr   