class_docstr: TensorFlow multi-step profiler.
  
  
  ```python
  Typical use case:
    # Currently we are only allowed to create 1 profiler per process.
    profiler = Profiler(sess.graph)
  
    for i in range(total_steps):
      if i % 10000 == 0:
        run_meta = tf.compat.v1.RunMetadata()
        _ = sess.run(...,
                     options=tf.compat.v1.RunOptions(
                         trace_level=tf.RunOptions.FULL_TRACE),
                     run_metadata=run_meta)
        profiler.add_step(i, run_meta)
  
        # Profile the parameters of your model.
        profiler.profile_name_scope(options=(option_builder.ProfileOptionBuilder
            .trainable_variables_parameter()))
  
        # Or profile the timing of your model operations.
        opts = option_builder.ProfileOptionBuilder.time_and_memory()
        profiler.profile_operations(options=opts)
  
        # Or you can generate a timeline:
        opts = (option_builder.ProfileOptionBuilder(
                option_builder.ProfileOptionBuilder.time_and_memory())
                .with_step(i)
                .with_timeline_output(filename).build())
        profiler.profile_graph(options=opts)
      else:
        _ = sess.run(...)
    # Auto detect problems and generate advice.
    profiler.advise()
  ```
class_docstr_tok: ["TensorFlow","multi-step","profiler",".","``","`","python","Typical","use","case",":","#","Currently","we","are","only","allowed","to","create","1","profiler","per","process",".","profiler","=","Profiler","(","sess.graph",")","for","i","in","range","(","total_steps",")",":","if","i","%","10000","==","0",":","run_meta","=","tf.compat.v1.RunMetadata","(",")","_","=","sess.run","(","...",",","options=tf.compat.v1.RunOptions","(","trace_level=tf.RunOptions.FULL_TRACE",")",",","run_metadata=run_meta",")","profiler.add_step","(","i",",","run_meta",")","#","Profile","the","parameters","of","your","model",".","profiler.profile_name_scope","(","options=","(","option_builder.ProfileOptionBuilder",".trainable_variables_parameter","(",")",")",")","#","Or","profile","the","timing","of","your","model","operations",".","opts","=","option_builder.ProfileOptionBuilder.time_and_memory","(",")","profiler.profile_operations","(","options=opts",")","#","Or","you","can","generate","a","timeline",":","opts","=","(","option_builder.ProfileOptionBuilder","(","option_builder.ProfileOptionBuilder.time_and_memory","(",")",")",".with_step","(","i",")",".with_timeline_output","(","filename",")",".build","(",")",")","profiler.profile_graph","(","options=opts",")","else",":","_","=","sess.run","(","...",")","#","Auto","detect","problems","and","generate","advice",".","profiler.advise","(",")","``","`"]
docstr: Automatically detect problems and generate reports.
  
  Args:
    options: A dict of options. See ALL_ADVICE example above.
  
  Returns:
    An Advise proto that contains the reports from all checkers.
docstr_tok: ["Automatically","detect","problems","and","generate","reports",".","Args",":","options",":","A","dict","of","options",".","See","ALL_ADVICE","example","above",".","Returns",":","An","Advise","proto","that","contains","the","reports","from","all","checkers","."]
code: def advise(self, options):
      """Automatically detect problems and generate reports.
  
      Args:
        options: A dict of options. See ALL_ADVICE example above.
  
      Returns:
        An Advise proto that contains the reports from all checkers.
      """
      advise_pb = tfprof_output_pb2.AdviceProto()
      opts = _build_advisor_options(options)
      advise_pb.ParseFromString(
          print_mdl.Profile(
              "advise".encode("utf-8"), opts.SerializeToString()
          )
      )
      return advise_pb
  
imports: import sys
  from google.protobuf import message
  from tensorflow.core.profiler import tfprof_options_pb2
  from tensorflow.core.profiler import tfprof_output_pb2
  from tensorflow.python.eager import context
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import ops
  from tensorflow.python.profiler import option_builder
  from tensorflow.python.profiler import tfprof_logger
  from tensorflow.python.util import _pywrap_tfprof
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 8 for calling the Profiler obj's underlying member method code with example usage: obj.advise(options) and returns: advise_pb