class_docstr: Source to extract TFMA eval result data for a model card.
  
  Provide exactly one of `eval_result_paths` or `model_evaluation_artifacts`.
  
  Attributes:
    eval_result_paths: The paths to the eval result output from TensorFlow Model
      Analysis or TFX Evaluator.
    file_format: Optional file extension to filter eval result files by.
    model_evaluation_artifacts: The MLMD artifacts from TensorFlow Model
      Analysis or TFX Evaluator.
    metrics_include: The list of metric names to include in the model card. By
      default, all metrics are included. Mutually exclusive with
      metrics_exclude.
    metrics_exclude: The list of metric names to exclude in the model card. By
      default, no metrics are excluded. Mutually exclusive with metrics_include.
code: def __post_init__(self):
      if self.eval_result_paths and not self.model_evaluation_artifacts:
          pass
      elif (
          self.model_evaluation_artifacts and not self.eval_result_paths
      ):
          self.eval_result_paths = [
              artifact.uri
              for artifact in self.model_evaluation_artifacts
          ]
      else:
          raise ValueError(
              "TfmaSource needs exactly one of eval_result_paths or "
              "model_evaluation_artifact"
          )
  
      if self.metrics_include and self.metrics_exclude:
          raise ValueError(
              "Only one of TfmaSource.metrics_include and "
              "TfmaSource.metrics_exclude should be set."
          )
  
file_path: model-card-toolkit/model_card_toolkit/utils/tf_sources.py
imports: import dataclasses
  from typing import List, Optional
  import ml_metadata
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 1 for calling the TfmaSource obj's underlying member method code with example usage: obj.__post_init__() without return types