sagemaker.mlops.workflow.clarify_check_step#

The step definitions for workflow.

Classes

ClarifyCheckConfig(data_config, *[, ...])

Clarify Check Config

ClarifyCheckStep(name, clarify_check_config, ...)

ClarifyCheckStep step for workflow.

DataBiasCheckConfig(data_config, ...[, ...])

Data Bias Check Config

ModelBiasCheckConfig(data_config, ...[, ...])

Model Bias Check Config

ModelExplainabilityCheckConfig(data_config, ...)

Model Explainability Check Config

class sagemaker.mlops.workflow.clarify_check_step.ClarifyCheckConfig(data_config: DataConfig, *, kms_key: str | None = None, monitoring_analysis_config_uri: str | None = None)[source]#

Bases: ABC

Clarify Check Config

data_config#

Config of the input/output data.

Type:

DataConfig

kms_key#

The ARN of the KMS key that is used to encrypt the user code file (default: None). This field CANNOT be any type of the PipelineVariable.

Type:

str

monitoring_analysis_config_uri#

(str): The uri of monitoring analysis config. This field does not take input. It will be generated once uploading the created analysis config file.

Type:

str

data_config: DataConfig#
kms_key: str#
monitoring_analysis_config_uri: str#
class sagemaker.mlops.workflow.clarify_check_step.ClarifyCheckStep(name: str, clarify_check_config: ClarifyCheckConfig, 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_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

ClarifyCheckStep step for workflow.

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

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

property properties#

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

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

Updates the dictionary with cache configuration etc.

class sagemaker.mlops.workflow.clarify_check_step.DataBiasCheckConfig(data_config: DataConfig, data_bias_config: BiasConfig, methods: str | List[str] = 'all', *, kms_key: str | None = None, monitoring_analysis_config_uri: str | None = None)[source]#

Bases: ClarifyCheckConfig

Data Bias Check Config

data_bias_config#

Config of sensitive groups.

Type:

BiasConfig

methods#

Selector of a subset of potential metrics: [”CI”, “DPL”, “KL”, “JS”, “LP”, “TVD”, “KS”, “CDDL”]. Defaults to computing all. This field CANNOT be any type of the PipelineVariable.

Type:

str or list[str]

data_bias_config: BiasConfig#
methods: str | List[str]#
class sagemaker.mlops.workflow.clarify_check_step.ModelBiasCheckConfig(data_config: DataConfig, data_bias_config: BiasConfig, model_config: ModelConfig, model_predicted_label_config: ModelPredictedLabelConfig, methods: str | List[str] = 'all', *, kms_key: str | None = None, monitoring_analysis_config_uri: str | None = None)[source]#

Bases: ClarifyCheckConfig

Model Bias Check Config

data_bias_config#

Config of sensitive groups.

Type:

BiasConfig

model_config#

Config of the model and its endpoint to be created.

Type:

ModelConfig

model_predicted_label_config#

Config of how to extract the predicted label from the model output.

Type:

ModelPredictedLabelConfig

methods#

Selector of a subset of potential metrics: [”DPPL” , “DI”, “DCA”, “DCR”, “RD”, “DAR”, “DRR”, “AD”, “CDDPL “, “TE”, “FT”]. Defaults to computing all. This field CANNOT be any type of the PipelineVariable.

Type:

str or list[str]

data_bias_config: BiasConfig#
methods: str | List[str]#
model_config: ModelConfig#
model_predicted_label_config: ModelPredictedLabelConfig#
class sagemaker.mlops.workflow.clarify_check_step.ModelExplainabilityCheckConfig(data_config: DataConfig, model_config: ModelConfig, explainability_config: SHAPConfig, model_scores: str | int | ModelPredictedLabelConfig | None = None, *, kms_key: str | None = None, monitoring_analysis_config_uri: str | None = None)[source]#

Bases: ClarifyCheckConfig

Model Explainability Check Config

model_config#

Config of the model and its endpoint to be created.

Type:

ModelConfig

explainability_config#

Config of the explainability method. Supports SHAP or PDP. For PDPConfig, features must be specified. top_k_features based on SHAP is currently not supported.

Type:

SHAPConfig or PDPConfig

model_scores#

Index or JMESPath expression to locate the predicted scores in the model output (default: None). This is not required if the model output is a single score. Alternatively, an instance of ModelPredictedLabelConfig can be provided but this field CANNOT be any type of the PipelineVariable.

Type:

str or int or ModelPredictedLabelConfig

explainability_config: SHAPConfig#
model_config: ModelConfig#
model_scores: str | int | ModelPredictedLabelConfig#