class_docstr: A TFX ml-metadata store that provides read-only methods for notebooks.
class_docstr_tok: ["A","TFX","ml-metadata","store","that","provides","read-only","methods","for","notebooks","."]
docstr: Displays TFMA metrics for `model_id` sliced by `slicing_column`.
  
  Args:
    model_id: A `int` indicating the id of a `TFXArtifactTypes.MODEL` artifact
    slicing_column: (Optional) A `str` indicating the slicing column for the
      TFMA metrics.
  
  Returns:
    A SlicingMetricsViewer object if in Jupyter notebook; None if in Colab.
docstr_tok: ["Displays","TFMA","metrics","for","`","model_id","`","sliced","by","`","slicing_column","`",".","Args",":","model_id",":","A","`","int","`","indicating","the","id","of","a","`","TFXArtifactTypes.MODEL","`","artifact","slicing_column",":","(","Optional",")","A","`","str","`","indicating","the","slicing","column","for","the","TFMA","metrics",".","Returns",":","A","SlicingMetricsViewer","object","if","in","Jupyter","notebook",";","None","if","in","Colab","."]
code: def display_tfma_analysis(self, model_id, slicing_column=None):
      """Displays TFMA metrics for `model_id` sliced by `slicing_column`.
  
      Args:
        model_id: A `int` indicating the id of a `TFXArtifactTypes.MODEL` artifact
        slicing_column: (Optional) A `str` indicating the slicing column for the
          TFMA metrics.
  
      Returns:
        A SlicingMetricsViewer object if in Jupyter notebook; None if in Colab.
      """
      tfma_artifact = self.get_dest_artifact_of_type(
          model_id, TFXArtifactTypes.MODEL_EVAL
      )
      if tfma_artifact:
          return tfma.view.render_slicing_metrics(
              tfma.load_eval_result(tfma_artifact.uri),
              slicing_column=slicing_column,
          )
  
imports: import os
  import time
  import papermill
  import tensorflow_data_validation
  import tensorflow_model_analysis
  import utils
  from ml_metadata.metadata_store import metadata_store
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 2 for calling the TFXReadonlyMetadataStore obj's underlying member method code with example usage: obj.display_tfma_analysis(model_id, slicing_column) and returns: tfma