def __post_init__()

in model_card_toolkit/utils/source.py [0:0]


  def __post_init__(self):
    if self.dataset_statistics_paths and not self.example_statistics_artifacts:
      pass
    elif self.example_statistics_artifacts and not self.dataset_statistics_paths:
      self.dataset_statistics_paths = [
          artifact.uri
          for artifact in self.example_statistics_artifacts
      ]
    else:
      raise ValueError(
          'TfdvSource needs exactly one of dataset_statistics_paths or '
          'example_statistics_artifacts'
      )

    if self.features_include and self.features_exclude:
      raise ValueError('Only one of TfdvSource.features_include and '
                       'TfdvSource.features_exclude should be set.')