class_docstr: TensorFlow ExampleValidator component executor.
class_docstr_tok: ["TensorFlow","ExampleValidator","component","executor","."]
docstr: Validate the inputs and put validate result into outputs.
  
    This is the implementation part of example validator executor. This is
    intended for using or extending the executor without artifact dependecy.
  
  Args:
    inputs: A dictionary of labeled input values, including:
      - STATISTICS_KEY: the feature statistics to validate
      - SCHEMA_KEY: the schema to respect
      - CUSTOM_VALIDATION_CONFIG: an optional config for specifying SQL-based
        custom validations.
      - (Optional) labels.ENVIRONMENT: if an environment is specified, only
        validate the feature statistics of the fields in that environment.
        Otherwise, validate all fields.
      - (Optional) labels.PREV_SPAN_FEATURE_STATISTICS: the feature
        statistics of a previous span.
      - (Optional) labels.PREV_VERSION_FEATURE_STATISTICS: the feature
        statistics of a previous version.
      - (Optional) labels.FEATURES_NEEDED: the feature needed to be
        validated on.
      - (Optional) labels.VALIDATION_CONFIG: the configuration of this
        validation.
      - (Optional) labels.EXTERNAL_CONFIG_VERSION: the version number of
        external config file.
    outputs: A dictionary of labeled output values, including:
        - labels.SCHEMA_DIFF_PATH: the path to write the schema diff to
  
  Returns:
    An Anomalies proto containing anomalies for the split.
docstr_tok: ["Validate","the","inputs","and","put","validate","result","into","outputs",".","This","is","the","implementation","part","of","example","validator","executor",".","This","is","intended","for","using","or","extending","the","executor","without","artifact","dependecy",".","Args",":","inputs",":","A","dictionary","of","labeled","input","values",",","including",":","-","STATISTICS_KEY",":","the","feature","statistics","to","validate","-","SCHEMA_KEY",":","the","schema","to","respect","-","CUSTOM_VALIDATION_CONFIG",":","an","optional","config","for","specifying","SQL-based","custom","validations",".","-","(","Optional",")","labels.ENVIRONMENT",":","if","an","environment","is","specified",",","only","validate","the","feature","statistics","of","the","fields","in","that","environment",".","Otherwise",",","validate","all","fields",".","-","(","Optional",")","labels.PREV_SPAN_FEATURE_STATISTICS",":","the","feature","statistics","of","a","previous","span",".","-","(","Optional",")","labels.PREV_VERSION_FEATURE_STATISTICS",":","the","feature","statistics","of","a","previous","version",".","-","(","Optional",")","labels.FEATURES_NEEDED",":","the","feature","needed","to","be","validated","on",".","-","(","Optional",")","labels.VALIDATION_CONFIG",":","the","configuration","of","this","validation",".","-","(","Optional",")","labels.EXTERNAL_CONFIG_VERSION",":","the","version","number","of","external","config","file",".","outputs",":","A","dictionary","of","labeled","output","values",",","including",":","-","labels.SCHEMA_DIFF_PATH",":","the","path","to","write","the","schema","diff","to","Returns",":","An","Anomalies","proto","containing","anomalies","for","the","split","."]
code: def _Validate(
      self, inputs: Dict[str, Any], outputs: Dict[str, Any]
  ) -> anomalies_pb2.Anomalies:
      """Validate the inputs and put validate result into outputs.
  
        This is the implementation part of example validator executor. This is
        intended for using or extending the executor without artifact dependecy.
  
      Args:
        inputs: A dictionary of labeled input values, including:
          - STATISTICS_KEY: the feature statistics to validate
          - SCHEMA_KEY: the schema to respect
          - CUSTOM_VALIDATION_CONFIG: an optional config for specifying SQL-based
            custom validations.
          - (Optional) labels.ENVIRONMENT: if an environment is specified, only
            validate the feature statistics of the fields in that environment.
            Otherwise, validate all fields.
          - (Optional) labels.PREV_SPAN_FEATURE_STATISTICS: the feature
            statistics of a previous span.
          - (Optional) labels.PREV_VERSION_FEATURE_STATISTICS: the feature
            statistics of a previous version.
          - (Optional) labels.FEATURES_NEEDED: the feature needed to be
            validated on.
          - (Optional) labels.VALIDATION_CONFIG: the configuration of this
            validation.
          - (Optional) labels.EXTERNAL_CONFIG_VERSION: the version number of
            external config file.
        outputs: A dictionary of labeled output values, including:
            - labels.SCHEMA_DIFF_PATH: the path to write the schema diff to
  
      Returns:
        An Anomalies proto containing anomalies for the split.
      """
      schema = value_utils.GetSoleValue(
          inputs, standard_component_specs.SCHEMA_KEY
      )
      stats = value_utils.GetSoleValue(
          inputs, standard_component_specs.STATISTICS_KEY
      )
      schema_diff_path = value_utils.GetSoleValue(
          outputs, labels.SCHEMA_DIFF_PATH
      )
      custom_validation_config = value_utils.GetSoleValue(
          inputs, standard_component_specs.CUSTOM_VALIDATION_CONFIG_KEY
      )
      anomalies = tfdv.validate_statistics(
          statistics=stats,
          schema=schema,
          custom_validation_config=custom_validation_config,
      )
      writer_utils.write_anomalies(
          os.path.join(schema_diff_path, DEFAULT_FILE_NAME), anomalies
      )
      return anomalies
  
imports: import os
  from typing import Any, Dict, List
  from absl import logging
  import tensorflow_data_validation
  from tfx import types
  from tfx.components.example_validator import labels
  from tfx.components.statistics_gen import stats_artifact_utils
  from tfx.components.util import value_utils
  from tfx.dsl.components.base import base_executor
  from tfx.orchestration.experimental.core import component_generated_alert_pb2
  from tfx.orchestration.experimental.core import constants
  from tfx.proto.orchestration import execution_result_pb2
  from tfx.types import artifact_utils
  from tfx.types import standard_component_specs
  from tfx.utils import io_utils
  from tfx.utils import json_utils
  from tfx.utils import writer_utils
  from google.protobuf import any_pb2
  from tensorflow_metadata.proto.v0 import anomalies_pb2
label_desc: Use image node_id 2 for calling the Executor obj's underlying member method code with example usage: obj._Validate(inputs, outputs) and returns: anomalies