class_docstr: ClarifyCheckStep step for workflow.
docstr: Constructs a ClarifyCheckStep.
  
  Args:
      name (str): The name of the ClarifyCheckStep step.
      clarify_check_config (ClarifyCheckConfig): A ClarifyCheckConfig instance.
      check_job_config (CheckJobConfig): A CheckJobConfig instance.
      skip_check (bool or PipelineVariable): Whether the check
          should be skipped (default: False).
      fail_on_violation (bool or PipelineVariable): Whether to fail the step
          if violation detected (default: True).
      register_new_baseline (bool or PipelineVariable): Whether
          the new baseline should be registered (default: False).
      model_package_group_name (str or PipelineVariable): The name of a
          registered model package group, among which the baseline will be fetched
          from the latest approved model (default: None).
      supplied_baseline_constraints (str or PipelineVariable): The S3 path
          to the supplied constraints object representing the constraints JSON file
          which will be used for drift to check (default: None).
      display_name (str): The display name of the ClarifyCheckStep step (default: None).
      description (str): The description of the ClarifyCheckStep step (default: None).
      cache_config (CacheConfig):  A `sagemaker.workflow.steps.CacheConfig` instance
          (default: None).
      depends_on (List[Union[str, Step, StepCollection]]): A list of `Step`/`StepCollection`
          names or `Step` instances or `StepCollection` instances that this `ClarifyCheckStep`
          depends on (default: None).
code: def __init__(
      self,
      name: str,
      clarify_check_config: ClarifyCheckConfig,
      check_job_config: CheckJobConfig,
      skip_check: Union[bool, PipelineVariable] = False,
      fail_on_violation: Union[bool, PipelineVariable] = True,
      register_new_baseline: Union[bool, PipelineVariable] = False,
      model_package_group_name: Union[str, PipelineVariable] = None,
      supplied_baseline_constraints: Union[
          str, PipelineVariable
      ] = None,
      display_name: str = None,
      description: str = None,
      cache_config: CacheConfig = None,
      depends_on: Optional[
          List[Union[str, Step, StepCollection]]
      ] = None,
  ):
      """Constructs a ClarifyCheckStep.
  
      Args:
          name (str): The name of the ClarifyCheckStep step.
          clarify_check_config (ClarifyCheckConfig): A ClarifyCheckConfig instance.
          check_job_config (CheckJobConfig): A CheckJobConfig instance.
          skip_check (bool or PipelineVariable): Whether the check
              should be skipped (default: False).
          fail_on_violation (bool or PipelineVariable): Whether to fail the step
              if violation detected (default: True).
          register_new_baseline (bool or PipelineVariable): Whether
              the new baseline should be registered (default: False).
          model_package_group_name (str or PipelineVariable): The name of a
              registered model package group, among which the baseline will be fetched
              from the latest approved model (default: None).
          supplied_baseline_constraints (str or PipelineVariable): The S3 path
              to the supplied constraints object representing the constraints JSON file
              which will be used for drift to check (default: None).
          display_name (str): The display name of the ClarifyCheckStep step (default: None).
          description (str): The description of the ClarifyCheckStep step (default: None).
          cache_config (CacheConfig):  A `sagemaker.workflow.steps.CacheConfig` instance
              (default: None).
          depends_on (List[Union[str, Step, StepCollection]]): A list of `Step`/`StepCollection`
              names or `Step` instances or `StepCollection` instances that this `ClarifyCheckStep`
              depends on (default: None).
      """
      if (
          not isinstance(clarify_check_config, DataBiasCheckConfig)
          and not isinstance(clarify_check_config, ModelBiasCheckConfig)
          and not isinstance(
              clarify_check_config, ModelExplainabilityCheckConfig
          )
      ):
          raise RuntimeError(
              "The clarify_check_config can only be object of "
              + "DataBiasCheckConfig, ModelBiasCheckConfig or ModelExplainabilityCheckConfig"
          )
  
      if is_pipeline_variable(
          clarify_check_config.data_config.s3_analysis_config_output_path
      ):
          raise RuntimeError(
              "s3_analysis_config_output_path cannot be of type "
              + "ExecutionVariable/Expression/Parameter/Properties"
          )
  
      if (
          not clarify_check_config.data_config.s3_analysis_config_output_path
          and is_pipeline_variable(
              clarify_check_config.data_config.s3_output_path
          )
      ):
          raise RuntimeError(
              "`s3_output_path` cannot be of type ExecutionVariable/Expression/Parameter"
              + "/Properties if `s3_analysis_config_output_path` is none or empty "
          )
  
      super(ClarifyCheckStep, self).__init__(
          name,
          display_name,
          description,
          StepTypeEnum.CLARIFY_CHECK,
          depends_on,
      )
      self.skip_check = skip_check
      self.fail_on_violation = fail_on_violation
      self.register_new_baseline = register_new_baseline
      self.clarify_check_config = clarify_check_config
      self.check_job_config = check_job_config
      self.model_package_group_name = model_package_group_name
      self.supplied_baseline_constraints = supplied_baseline_constraints
      self.cache_config = cache_config
  
      if isinstance(
          self.clarify_check_config, ModelExplainabilityCheckConfig
      ):
          self._model_monitor = (
              self.check_job_config._generate_model_monitor(
                  "ModelExplainabilityMonitor"
              )
          )
      else:
          self._model_monitor = (
              self.check_job_config._generate_model_monitor(
                  "ModelBiasMonitor"
              )
          )
  
      self.clarify_check_config.monitoring_analysis_config_uri = (
          self._upload_monitoring_analysis_config()
      )
      self._baselining_processor = (
          self._model_monitor._create_baselining_processor()
      )
      self._processing_params = (
          self._generate_processing_job_parameters(
              self._generate_processing_job_analysis_config(),
              self._baselining_processor,
          )
      )
  
      root_prop = Properties(step_name=name, step=self)
      root_prop.__dict__["CalculatedBaselineConstraints"] = Properties(
          step_name=name,
          step=self,
          path="CalculatedBaselineConstraints",
      )
      root_prop.__dict__[
          "BaselineUsedForDriftCheckConstraints"
      ] = Properties(
          step_name=name,
          step=self,
          path="BaselineUsedForDriftCheckConstraints",
      )
      self._properties = root_prop
  
imports: from __future__ import absolute_import
  import copy
  import json
  import os
  import tempfile
  from abc import ABC
  from typing import List, Union, Optional
  import attr
  from sagemaker import s3
  from sagemaker.clarify import DataConfig, BiasConfig, ModelConfig, ModelPredictedLabelConfig, SHAPConfig, ProcessingOutputHandler, _upload_analysis_config, SageMakerClarifyProcessor, _set
  from sagemaker.model_monitor import BiasAnalysisConfig, ExplainabilityAnalysisConfig
  from sagemaker.model_monitor.model_monitoring import _MODEL_MONITOR_S3_PATH
  from sagemaker.processing import ProcessingInput, ProcessingOutput, ProcessingJob
  from sagemaker.utils import name_from_base
  from sagemaker.workflow import is_pipeline_variable
  from sagemaker.workflow.entities import RequestType, PipelineVariable
  from sagemaker.workflow.properties import Properties
  from sagemaker.workflow.step_collections import StepCollection
  from sagemaker.workflow.steps import Step, StepTypeEnum, CacheConfig
  from sagemaker.workflow.check_job_config import CheckJobConfig
  from sagemaker.workflow.utilities import trim_request_dict
label_desc: Use image node_id 1 to create a new ClarifyCheckStep object from inherited base classes: Step with example: obj = ClarifyCheckStep(name, clarify_check_config, check_job_config, skip_check, fail_on_violation, register_new_baseline, model_package_group_name, supplied_baseline_constraints, display_name, description, cache_config, depends_on)