# Path: model_card_toolkit/core.py
# _UI_TEMPLATES = (
#     'template/html/default_template.html.jinja',
#     'template/md/default_template.md.jinja',
# )
# _DEFAULT_UI_TEMPLATE_FILE = os.path.join('html', 'default_template.html.jinja')
# _MCTA_PROTO_FILE = os.path.join('data', 'model_card.proto')
# _MCTA_TEMPLATE_DIR = 'template'
# _MCTA_RESOURCE_DIR = os.path.join('resources', 'plots')
# _MODEL_CARDS_DIR = 'model_cards'
# _DEFAULT_MODEL_CARD_FILE_NAME = 'model_card.html'
# class ModelCardToolkit():
#   def __init__(
#       self,
#       output_dir: Optional[str] = None,
#       mlmd_source: Optional[src.MlmdSource] = None,
#       source: Optional[src.Source] = None,
#   ):
#   def _process_mlmd_source(self, mlmd_source: src.MlmdSource) -> None:
#   def _jinja_loader(self, template_dir: str) -> jinja2.FileSystemLoader:
#   def _write_file(self, path: str, content: str) -> None:
#   def _write_proto_file(
#       self, path: str, model_card: Union[ModelCard,
#                                          model_card_pb2.ModelCard]) -> None:
#   def _read_proto_file(self, path: str) -> Optional[ModelCard]:
#   def _annotate_eval_results(self, model_card: ModelCard) -> ModelCard:
#   def _annotate_dataset_statistics(self, model_card: ModelCard) -> ModelCard:
#   def _annotate_model(self, model_card: ModelCard) -> ModelCard:
#   def _scaffold_model_card(self) -> ModelCard:
#   def scaffold_assets(self,
#                       json: Optional[Union[Dict[str, Any],
#                                            str]] = None) -> ModelCard:
#   def update_model_card(
#       self, model_card: Union[ModelCard, model_card_pb2.ModelCard]) -> None:
#   def export_format(self,
#                     model_card: Optional[Union[
#                         ModelCard, model_card_pb2.ModelCard]] = None,
#                     template_path: Optional[str] = None,
#                     output_file: Optional[str] = None) -> str:
# 
# Path: model_card_toolkit/utils/source.py
# class MlmdSource:
# class TfmaSource:
# class TfdvSource:
# class ModelSource:
# class Source:
#   def __post_init__(self):
#   def __post_init__(self):
#   def __post_init__(self):


from typing import Any, Dict, List, Optional
from model_card_toolkit import core
from model_card_toolkit.utils import source as src
from tfx import types
from tfx.dsl.components.base.base_executor import BaseExecutor
from tfx.types import artifact_utils
from tfx.types import standard_component_specs
"""Model Card TFX Component Executor.

The ModelCard Executor handles the ModelCardToolkit workflow in the
ModelCardGenerator.
"""




_DEFAULT_MODEL_CARD_FILE_NAME = 'model_card.html'


class Executor(BaseExecutor):
  """Executor for Model Card TFX component."""

  def _tfma_source(
      self, input_dict: Dict[str,

# Path: model_card_toolkit/core.py
# _UI_TEMPLATES = (
#     'template/html/default_template.html.jinja',
#     'template/md/default_template.md.jinja',
# )
# _DEFAULT_UI_TEMPLATE_FILE = os.path.join('html', 'default_template.html.jinja')
# _MCTA_PROTO_FILE = os.path.join('data', 'model_card.proto')
# _MCTA_TEMPLATE_DIR = 'template'
# _MCTA_RESOURCE_DIR = os.path.join('resources', 'plots')
# _MODEL_CARDS_DIR = 'model_cards'
# _DEFAULT_MODEL_CARD_FILE_NAME = 'model_card.html'
# class ModelCardToolkit():
#   def __init__(
#       self,
#       output_dir: Optional[str] = None,
#       mlmd_source: Optional[src.MlmdSource] = None,
#       source: Optional[src.Source] = None,
#   ):
#   def _process_mlmd_source(self, mlmd_source: src.MlmdSource) -> None:
#   def _jinja_loader(self, template_dir: str) -> jinja2.FileSystemLoader:
#   def _write_file(self, path: str, content: str) -> None:
#   def _write_proto_file(
#       self, path: str, model_card: Union[ModelCard,
#                                          model_card_pb2.ModelCard]) -> None:
#   def _read_proto_file(self, path: str) -> Optional[ModelCard]:
#   def _annotate_eval_results(self, model_card: ModelCard) -> ModelCard:
#   def _annotate_dataset_statistics(self, model_card: ModelCard) -> ModelCard:
#   def _annotate_model(self, model_card: ModelCard) -> ModelCard:
#   def _scaffold_model_card(self) -> ModelCard:
#   def scaffold_assets(self,
#                       json: Optional[Union[Dict[str, Any],
#                                            str]] = None) -> ModelCard:
#   def update_model_card(
#       self, model_card: Union[ModelCard, model_card_pb2.ModelCard]) -> None:
#   def export_format(self,
#                     model_card: Optional[Union[
#                         ModelCard, model_card_pb2.ModelCard]] = None,
#                     template_path: Optional[str] = None,
#                     output_file: Optional[str] = None) -> str:
# 
# Path: model_card_toolkit/utils/source.py
# class MlmdSource:
# class TfmaSource:
# class TfdvSource:
# class ModelSource:
# class Source:
#   def __post_init__(self):
#   def __post_init__(self):
#   def __post_init__(self):


# Path: model_card_toolkit/tfx/executor.py
from typing import Any, Dict, List, Optional
from model_card_toolkit import core
from model_card_toolkit.utils import source as src
from tfx import types
from tfx.dsl.components.base.base_executor import BaseExecutor
from tfx.types import artifact_utils
from tfx.types import standard_component_specs

"""Model Card TFX Component Executor.

The ModelCard Executor handles the ModelCardToolkit workflow in the
ModelCardGenerator.
"""




_DEFAULT_MODEL_CARD_FILE_NAME = 'model_card.html'


class Executor(BaseExecutor):
  """Executor for Model Card TFX component."""

  def _tfma_source(
      self, input_dict: Dict[str,

                             List[types.Artifact]]) -> Optional[src.TfmaSource]: