def __init__()

in model_card_toolkit/tfx/component.py [0:0]


  def __init__(self,
               evaluation: Optional[types.Channel] = None,
               statistics: Optional[types.Channel] = None,
               pushed_model: Optional[types.Channel] = None,
               json: Optional[str] = None,
               template_io: Optional[List[Tuple[str, str]]] = None
              ):
    """Generate a model card for a TFX pipeline.

    Args:
      evaluation: TFMA output, used to populate quantitative analysis fields in
        the model card.
      statistics: TFDV output, used to populate dataset fields in the model
        card.
      pushed_model: PushedModel output, used to populate model details in the
        the model card.
      json: A JSON object containing `ModelCard` fields. This is particularly
        useful for fields that cannot be auto-populated from earlier TFX
        components. If a field is populated both by TFX and JSON, the JSON value
        will overwrite the TFX value.
      template_io: A list of input/output pairs. The input is a jinja template
        path to use when generating model card documents. The output is the file
        name to write the model card document to. If nothing is provided,
        `ModelCardToolkit`'s default HTML template and file name are used.
    """
    spec = ModelCardGeneratorSpec(
        evaluation=evaluation,
        statistics=statistics,
        pushed_model=pushed_model,
        model_card=types.Channel(type=artifact.ModelCard),
        json=json,
        template_io=template_io)
    super(ModelCardGenerator, self).__init__(spec=spec)