class_docstr: TFX DistributionValidator component.
  
  Identifies distribution shifts between datasets by examining their summary
  statistics.
  
  Also supports running custom validations between two datasets using an
  optional SQL-based config.
class_docstr_tok: ["TFX","DistributionValidator","component",".","Identifies","distribution","shifts","between","datasets","by","examining","their","summary","statistics",".","Also","supports","running","custom","validations","between","two","datasets","using","an","optional","SQL-based","config","."]
docstr: Construct a DistributionValidation component.
  
  DistributionValidator compares the statistics with baseline_statistics. When
  baseline_statistics not available during cold start or due to other
  reasons, DistributionValidator will rubber stamp.
  
  Args:
    statistics: A BaseChannel of type `standard_artifacts.ExampleStatistics`.
    baseline_statistics: A BaseChannel of type
      `standard_artifacts.ExampleStatistics` to which the distribution from
      `statistics` will be compared.
    config: A DistributionValidationConfig that defines configuration for the
      DistributionValidator.
    include_split_pairs: Pairs of split names that DistributionValidator
      should be run on. Default behavior if not supplied is to run on pairs of
      the same splits (i.e., (train, train), (test, test), etc.).
      Order is (statistics, baseline_statistics).
    custom_validation_config: Optional configuration for specifying SQL-based
      custom validations.
docstr_tok: ["Construct","a","DistributionValidation","component",".","DistributionValidator","compares","the","statistics","with","baseline_statistics",".","When","baseline_statistics","not","available","during","cold","start","or","due","to","other","reasons",",","DistributionValidator","will","rubber","stamp",".","Args",":","statistics",":","A","BaseChannel","of","type","`","standard_artifacts.ExampleStatistics","`",".","baseline_statistics",":","A","BaseChannel","of","type","`","standard_artifacts.ExampleStatistics","`","to","which","the","distribution","from","`","statistics","`","will","be","compared",".","config",":","A","DistributionValidationConfig","that","defines","configuration","for","the","DistributionValidator",".","include_split_pairs",":","Pairs","of","split","names","that","DistributionValidator","should","be","run","on",".","Default","behavior","if","not","supplied","is","to","run","on","pairs","of","the","same","splits","(","i.e.",",","(","train",",","train",")",",","(","test",",","test",")",",","etc.",")",".","Order","is","(","statistics",",","baseline_statistics",")",".","custom_validation_config",":","Optional","configuration","for","specifying","SQL-based","custom","validations","."]
code: def __init__(
      self,
      statistics: types.BaseChannel,
      baseline_statistics: types.BaseChannel,
      config: distribution_validator_pb2.DistributionValidatorConfig,
      include_split_pairs: Optional[List[Tuple[str, str]]] = None,
      custom_validation_config: Optional[
          custom_validation_config_pb2.CustomValidationConfig
      ] = None,
  ):
      """Construct a DistributionValidation component.
  
      DistributionValidator compares the statistics with baseline_statistics. When
      baseline_statistics not available during cold start or due to other
      reasons, DistributionValidator will rubber stamp.
  
      Args:
        statistics: A BaseChannel of type `standard_artifacts.ExampleStatistics`.
        baseline_statistics: A BaseChannel of type
          `standard_artifacts.ExampleStatistics` to which the distribution from
          `statistics` will be compared.
        config: A DistributionValidationConfig that defines configuration for the
          DistributionValidator.
        include_split_pairs: Pairs of split names that DistributionValidator
          should be run on. Default behavior if not supplied is to run on pairs of
          the same splits (i.e., (train, train), (test, test), etc.).
          Order is (statistics, baseline_statistics).
        custom_validation_config: Optional configuration for specifying SQL-based
          custom validations.
      """
      anomalies = types.Channel(
          type=standard_artifacts.ExampleAnomalies
      )
      spec = standard_component_specs.DistributionValidatorSpec(
          **{
              standard_component_specs.STATISTICS_KEY: statistics,
              standard_component_specs.BASELINE_STATISTICS_KEY: baseline_statistics,
              standard_component_specs.DISTRIBUTION_VALIDATOR_CONFIG_KEY: config,
              standard_component_specs.INCLUDE_SPLIT_PAIRS_KEY: json_utils.dumps(
                  include_split_pairs
              ),
              standard_component_specs.CUSTOM_VALIDATION_CONFIG_KEY: custom_validation_config,
              standard_component_specs.ANOMALIES_KEY: anomalies,
          }
      )
      super().__init__(spec=spec)
  
file_path: tfx/tfx/components/distribution_validator/component.py
imports: from typing import List, Optional, Tuple
  from tensorflow_data_validation.anomalies.proto import custom_validation_config_pb2
  from tfx import types
  from tfx.components.distribution_validator import executor
  from tfx.dsl.components.base import base_component
  from tfx.dsl.components.base import executor_spec
  from tfx.proto import distribution_validator_pb2
  from tfx.types import standard_artifacts
  from tfx.types import standard_component_specs
  from tfx.utils import json_utils
label_desc: Use image node_id 1 to create a new DistributionValidator object from inherited base classes: base_component with example: obj = DistributionValidator(statistics, baseline_statistics, config, include_split_pairs, custom_validation_config)