sagemaker.mlops.workflow.quality_check_step#

The step definitions for workflow.

Classes

DataQualityCheckConfig(baseline_dataset, ...)

Data Quality Check Config.

ModelQualityCheckConfig(baseline_dataset, ...)

Model Quality Check Config.

QualityCheckConfig(baseline_dataset, ...[, ...])

Quality Check Config.

QualityCheckStep(name, quality_check_config, ...)

QualityCheck step for workflow.

class sagemaker.mlops.workflow.quality_check_step.DataQualityCheckConfig(baseline_dataset: str | PipelineVariable, dataset_format: dict, record_preprocessor_script: str | None = None, *, output_s3_uri: str | PipelineVariable | None = None, post_analytics_processor_script: str | None = None)[source]#

Bases: QualityCheckConfig

Data Quality Check Config.

record_preprocessor_script#

The path to the record preprocessor script (default: None). This can be a local path or an S3 uri string but CANNOT be any type of the PipelineVariable.

Type:

str

record_preprocessor_script: str#
class sagemaker.mlops.workflow.quality_check_step.ModelQualityCheckConfig(baseline_dataset: str | PipelineVariable, dataset_format: dict, problem_type: str | PipelineVariable, inference_attribute: str | PipelineVariable | None = None, probability_attribute: str | PipelineVariable | None = None, ground_truth_attribute: str | PipelineVariable | None = None, probability_threshold_attribute: str | PipelineVariable | None = None, *, output_s3_uri: str | PipelineVariable | None = None, post_analytics_processor_script: str | None = None)[source]#

Bases: QualityCheckConfig

Model Quality Check Config.

problem_type#

The type of problem of this model quality monitoring. Valid values are “Regression”, “BinaryClassification”, “MulticlassClassification”.

Type:

str or PipelineVariable

inference_attribute#

Index or JSONpath to locate predicted label(s) (default: None).

Type:

str or PipelineVariable

probability_attribute#

Index or JSONpath to locate probabilities (default: None).

Type:

str or PipelineVariable

ground_truth_attribute (str or PipelineVariable

Index or JSONpath to locate actual label(s) (default: None).

probability_threshold_attribute#

Threshold to convert probabilities to binaries (default: None).

Type:

str or PipelineVariable

ground_truth_attribute: str | PipelineVariable#
inference_attribute: str | PipelineVariable#
probability_attribute: str | PipelineVariable#
probability_threshold_attribute: str | PipelineVariable#
problem_type: str | PipelineVariable#
class sagemaker.mlops.workflow.quality_check_step.QualityCheckConfig(baseline_dataset: str | PipelineVariable, dataset_format: dict, *, output_s3_uri: str | PipelineVariable | None = None, post_analytics_processor_script: str | None = None)[source]#

Bases: ABC

Quality Check Config.

baseline_dataset#

The path to the baseline_dataset file. This can be a local path or an S3 uri string

Type:

str or PipelineVariable

dataset_format#

The format of the baseline_dataset.

Type:

dict

output_s3_uri#

Desired S3 destination of the constraint_violations and statistics json files (default: None). If not specified an auto generated path will be used: “s3://<default_session_bucket>/model-monitor/baselining/<job_name>/results”

Type:

str or PipelineVariable

post_analytics_processor_script#

The path to the record post-analytics processor script (default: None). This can be a local path or an S3 uri string but CANNOT be any type of the PipelineVariable.

Type:

str

baseline_dataset: str | PipelineVariable#
dataset_format: dict#
output_s3_uri: str | PipelineVariable#
post_analytics_processor_script: str#
class sagemaker.mlops.workflow.quality_check_step.QualityCheckStep(name: str, quality_check_config: QualityCheckConfig, check_job_config: CheckJobConfig, skip_check: bool | PipelineVariable = False, fail_on_violation: bool | PipelineVariable = True, register_new_baseline: bool | PipelineVariable = False, model_package_group_name: str | PipelineVariable | None = None, supplied_baseline_statistics: str | PipelineVariable | None = None, supplied_baseline_constraints: str | PipelineVariable | None = None, display_name: str | None = None, description: str | None = None, cache_config: CacheConfig | None = None, depends_on: List[str | Step] | None = None)[source]#

Bases: Step

QualityCheck step for workflow.

property arguments: Dict[str, Any] | List[Dict[str, Any]]#

The arguments dict that is used to define the QualityCheck step.

property properties#

A Properties object representing the output parameters of the QualityCheck step.

to_request() Dict[str, Any] | List[Dict[str, Any]][source]#

Updates the dictionary with cache configuration etc.