class_docstr: QualityCheck step for workflow.
class_docstr_tok: ["QualityCheck","step","for","workflow","."]
docstr: Generates a baseline processor
  
  Args:
      baseline_dataset_input (ProcessingInput): A ProcessingInput instance for baseline
          dataset input.
      baseline_output (ProcessingOutput): A ProcessingOutput instance for baseline
          dataset output.
      post_processor_script_input (ProcessingInput): A ProcessingInput instance for
          post processor script input.
      record_preprocessor_script_input (ProcessingInput): A ProcessingInput instance for
          record preprocessor script input.
  
  Returns:
      sagemaker.processing.Processor: The baseline processor
docstr_tok: ["Generates","a","baseline","processor","Args",":","baseline_dataset_input","(","ProcessingInput",")",":","A","ProcessingInput","instance","for","baseline","dataset","input",".","baseline_output","(","ProcessingOutput",")",":","A","ProcessingOutput","instance","for","baseline","dataset","output",".","post_processor_script_input","(","ProcessingInput",")",":","A","ProcessingInput","instance","for","post","processor","script","input",".","record_preprocessor_script_input","(","ProcessingInput",")",":","A","ProcessingInput","instance","for","record","preprocessor","script","input",".","Returns",":","sagemaker.processing.Processor",":","The","baseline","processor"]
code: def _generate_baseline_processor(
      self,
      baseline_dataset_input,
      baseline_output,
      post_processor_script_input=None,
      record_preprocessor_script_input=None,
  ):
      """Generates a baseline processor
  
      Args:
          baseline_dataset_input (ProcessingInput): A ProcessingInput instance for baseline
              dataset input.
          baseline_output (ProcessingOutput): A ProcessingOutput instance for baseline
              dataset output.
          post_processor_script_input (ProcessingInput): A ProcessingInput instance for
              post processor script input.
          record_preprocessor_script_input (ProcessingInput): A ProcessingInput instance for
              record preprocessor script input.
  
      Returns:
          sagemaker.processing.Processor: The baseline processor
      """
      quality_check_cfg = self.quality_check_config
      # Unlike other input, dataset must be a directory for the Monitoring image.
      baseline_dataset_container_path = (
          baseline_dataset_input.destination
      )
  
      post_processor_script_container_path = None
      if post_processor_script_input is not None:
          post_processor_script_container_path = str(
              pathlib.PurePosixPath(
                  post_processor_script_input.destination,
                  os.path.basename(
                      quality_check_cfg.post_analytics_processor_script
                  ),
              )
          )
  
      record_preprocessor_script_container_path = None
      if isinstance(quality_check_cfg, DataQualityCheckConfig):
          if record_preprocessor_script_input is not None:
              record_preprocessor_script_container_path = str(
                  pathlib.PurePosixPath(
                      record_preprocessor_script_input.destination,
                      os.path.basename(
                          quality_check_cfg.record_preprocessor_script
                      ),
                  )
              )
          normalized_env = ModelMonitor._generate_env_map(
              env=self._model_monitor.env,
              dataset_format=quality_check_cfg.dataset_format,
              output_path=baseline_output.source,
              enable_cloudwatch_metrics=False,  # Only supported for monitoring schedules
              dataset_source_container_path=baseline_dataset_container_path,
              record_preprocessor_script_container_path=record_preprocessor_script_container_path,
              post_processor_script_container_path=post_processor_script_container_path,
          )
      else:
          inference_attribute = (
              str(quality_check_cfg.inference_attribute)
              if quality_check_cfg.inference_attribute is not None
              else None
          )
          probability_attribute = (
              str(quality_check_cfg.probability_attribute)
              if quality_check_cfg.probability_attribute is not None
              else None
          )
          ground_truth_attribute = (
              str(quality_check_cfg.ground_truth_attribute)
              if quality_check_cfg.ground_truth_attribute is not None
              else None
          )
          probability_threshold_attr = (
              str(quality_check_cfg.probability_threshold_attribute)
              if quality_check_cfg.probability_threshold_attribute
              is not None
              else None
          )
          normalized_env = ModelMonitor._generate_env_map(
              env=self._model_monitor.env,
              dataset_format=quality_check_cfg.dataset_format,
              output_path=baseline_output.source,
              enable_cloudwatch_metrics=False,  # Only supported for monitoring schedules
              dataset_source_container_path=baseline_dataset_container_path,
              post_processor_script_container_path=post_processor_script_container_path,
              analysis_type=_MODEL_QUALITY_TYPE,
              problem_type=quality_check_cfg.problem_type,
              inference_attribute=inference_attribute,
              probability_attribute=probability_attribute,
              ground_truth_attribute=ground_truth_attribute,
              probability_threshold_attribute=probability_threshold_attr,
          )
  
      return Processor(
          role=self._model_monitor.role,
          image_uri=self._model_monitor.image_uri,
          instance_count=self._model_monitor.instance_count,
          instance_type=self._model_monitor.instance_type,
          entrypoint=self._model_monitor.entrypoint,
          volume_size_in_gb=self._model_monitor.volume_size_in_gb,
          volume_kms_key=self._model_monitor.volume_kms_key,
          output_kms_key=self._model_monitor.output_kms_key,
          max_runtime_in_seconds=self._model_monitor.max_runtime_in_seconds,
          base_job_name=self._model_monitor.base_job_name,
          sagemaker_session=self._model_monitor.sagemaker_session,
          env=normalized_env,
          tags=self._model_monitor.tags,
          network_config=self._model_monitor.network_config,
      )
  
imports: from __future__ import absolute_import
  from abc import ABC
  from typing import List, Union, Optional
  import os
  import pathlib
  import attr
  from sagemaker import s3
  from sagemaker.model_monitor import ModelMonitor
  from sagemaker.processing import ProcessingOutput, ProcessingJob, Processor, ProcessingInput
  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 7 for calling the QualityCheckStep obj's underlying member method code with example usage: obj._generate_baseline_processor(baseline_dataset_input, baseline_output, post_processor_script_input, record_preprocessor_script_input) and returns: Processor