

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 生产中模型的偏压飘移
<a name="clarify-model-monitor-bias-drift"></a>

Ama SageMaker zon Clarify 偏差监控可帮助数据科学家和机器学习工程师定期监控偏差预测。在监控模型时，客户可以在 SageMaker Studio 中查看详细说明偏差的可导出报告和图表，并在 Amazon 中配置警报， CloudWatch 以便在检测到偏差超过特定阈值时接收通知。当训练数据与模型在部署期间看到的数据（即实时数据）不同时，就会在部署的机器学习模型中引入或加剧偏差。实时数据分布中的这些变化可能是暂时的（例如，由于一些短暂的真实事件），也可能是永久的。无论哪种情况，检测这些变化都可能很重要。例如，如果用于训练该模型的抵押贷款利率与当前的现实世界抵押贷款利率不同，则预测房价模型的输出可能会出现偏差。借助 Model Monitor 中的偏差检测功能，当 SageMaker AI 检测到偏差超过特定阈值时，它会自动生成指标，您可以在 SageMaker Studio 中或通过 Amazon CloudWatch 提醒查看这些指标。

通常，仅在 train-and-deploy相位期间测量偏差可能还不够。部署模型后，部署的模型所看到的数据（即实时数据）分布可能不同于训练数据集中的数据分布。随着时间的推移，这种变化可能会在模型中引入偏差。实时数据分布的变化可能是暂时的（例如，由于某些短暂的行为，例如假日季），也可能是永久的。无论哪种情况，检测这些变化并适时采取措施减少偏差可能都很重要。

为了检测这些变化，C SageMaker larify 提供了持续监控已部署模型的偏差指标的功能，并在指标超过阈值时自动发出警报。例如，考虑 DPPL 偏差指标。指定允许的值范围 A=(amin​,amax​)，例如区间 (-0.1, 0.1)，DPPL 在部署期间应属于该范围。任何偏离此范围的偏差都应引发*检测到偏差* 警报。使用 SageMaker Clarify，您可以定期执行这些检查。

例如，您可以将检查频率设置为 2 天。这意味着 Cl SageMaker arify 会根据在 2 天窗口内收集的数据计算 DPPL 指标。在本例中，Dwin 是模型在上一个 2 天时限内处理的数据。如果根据 Dwin​ 计算的 DPPL 值 bwin​ 超出允许范围 A，则会发出警报。这种检查 bwin 是否在 A 之外的方法可能会产生噪点。Dwin​ 可能由很少的样本组成，可能无法代表实时数据分布。样本量小意味着根据 Dwin​ 计算出的偏差 bwin​ 值可能不是一个非常可靠的估计值。实际上，观察到的极高（或极低）bwin​ 值可能纯属偶然。为了确保从观测数据 D win 中得出的结论具有统计学意义，Clarif SageMaker y 使用了置信区间。具体而言，它使用正常引导间隔方法来构造区间 C= (cmin, cmax)，这样 Clarify 就可以确信根据完整实时数据计算的真实偏差值很可能包含在 C 中。 SageMaker 现在，如果置信区间 C 与允许的范围 A 重叠， SageMaker Clarify 会将其解释为 “实时数据分布的偏差指标值很可能在允许的范围内”。如果 C 和 A 不相交，Cl SageMaker arify 确信偏差指标不在 A 中，因此会发出警报。

## Model Monitor 示例笔记本
<a name="clarify-model-monitor-sample-notebooks-bias-drift"></a>

Ama SageMaker zon Clarify 提供了以下示例笔记本，展示了如何捕获实时终端节点的推理数据，如何创建基线以监控不断变化的偏见，以及如何检查结果：
+ [监控偏见漂移和特征归因偏差 Amazon Cl SageMaker arif](https://sagemaker-examples.readthedocs.io/en/latest/sagemaker_model_monitor/fairness_and_explainability/SageMaker-Model-Monitor-Fairness-and-Explainability.html) y — 使用 Amazon SageMaker 模型监视器监控偏差和特征归因偏差随时间推移而发生的偏差偏移和特

本笔记本经过验证，只能在 Amazon SageMaker Studio 中运行。如果您需要有关如何在 Amazon SageMaker Studio 中打开笔记本的说明，请参阅[创建或打开 Amazon SageMaker Studio 经典笔记本电脑](notebooks-create-open.md)。如果系统提示您选择内核，请选择 **Python 3 (Data Science)**。以下主题包含最后两个步骤的重点内容，并包含示例笔记本中的代码示例。

**Topics**
+ [Model Monitor 示例笔记本](#clarify-model-monitor-sample-notebooks-bias-drift)
+ [创建偏差偏移基准](clarify-model-monitor-bias-drift-baseline.md)
+ [偏差偏移违规](clarify-model-monitor-bias-drift-violations.md)
+ [监测偏压飘移的参数](clarify-config-json-monitor-bias-parameters.md)
+ [计划偏差偏移监控作业](clarify-model-monitor-bias-drift-schedule.md)
+ [查看数据偏差偏移报告](clarify-model-monitor-bias-drift-report.md)
+ [CloudWatch 偏差漂移分析的指标](clarify-model-monitor-bias-drift-cw.md)

# 创建偏差偏移基准
<a name="clarify-model-monitor-bias-drift-baseline"></a>

将应用程序配置为捕获实时或批量转换推理数据后，监控偏差偏移的第一项任务就是创建基准。这包括配置数据输入、哪些组是敏感组、如何捕获预测结果，以及模型及其训练后偏差指标。然后，您需要启动设定基准作业。

模型偏差监控器可以定期检测机器学习模型的偏差偏移。与其他监控类型类似，创建模型偏差监控器的标准程序是先设定基准，然后制定监控计划。

```
model_bias_monitor = ModelBiasMonitor(
    role=role,
    sagemaker_session=sagemaker_session,
    max_runtime_in_seconds=1800,
)
```

`DataConfig` 存储有关待分析的数据集（如数据集文件）、其格式（即 CSV 或 JSON 行）、标题（如有）和标签的信息。

```
model_bias_baselining_job_result_uri = f"{baseline_results_uri}/model_bias"
model_bias_data_config = DataConfig(
    s3_data_input_path=validation_dataset,
    s3_output_path=model_bias_baselining_job_result_uri,
    label=label_header,
    headers=all_headers,
    dataset_type=dataset_type,
)
```

`BiasConfig` 是数据集中敏感组的配置。通常情况下，衡量偏差的方法是计算一个指标，并在不同组间进行比较。相关的组称为*分面*。对于训练后的偏差，还应考虑阳性标签。

```
model_bias_config = BiasConfig(
    label_values_or_threshold=[1],
    facet_name="Account Length",
    facet_values_or_threshold=[100],
)
```

`ModelPredictedLabelConfig` 指定如何从模型输出提取预测标签。在本例中，之所以选择 0.8 的临界值，是因为预计客户会经常交货。对于更复杂的输出，还有其他一些选项，比如 “标签” 是索引、名称或 JMESPath 在端点响应负载中定位预测的标签。

```
model_predicted_label_config = ModelPredictedLabelConfig(
    probability_threshold=0.8,
)
```

`ModelConfig` 是与用于推理的模型相关的配置。为了计算训练后偏差指标，计算需要获取所提供模型名称的推理。为此，处理作业使用模型创建临时端点（也称为*影子端点*）。计算完成后，处理作业会删除影子端点。可解释性监控器也使用此配置。

```
model_config = ModelConfig(
    model_name=model_name,
    instance_count=endpoint_instance_count,
    instance_type=endpoint_instance_type,
    content_type=dataset_type,
    accept_type=dataset_type,
)
```

现在，您可以启动设定基准作业了。

```
model_bias_monitor.suggest_baseline(
    model_config=model_config,
    data_config=model_bias_data_config,
    bias_config=model_bias_config,
    model_predicted_label_config=model_predicted_label_config,
)
print(f"ModelBiasMonitor baselining job: {model_bias_monitor.latest_baselining_job_name}")
```

计划的监控器会自动选取设定基准作业名称，并在监控开始之前等待该名称。

# 偏差偏移违规
<a name="clarify-model-monitor-bias-drift-violations"></a>

偏差偏移作业根据当前 `MonitoringExecution` 的分析结果来评估[基准配置](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateModelBiasJobDefinition.html#sagemaker-CreateModelBiasJobDefinition-request-ModelBiasBaselineConfig)提供的基准约束。如果检测到违规行为，则该作业会将其列在执行输出位置的 *constraint\$1violations.json* 文件中，并将执行状态标记为 [解释结果](model-monitor-interpreting-results.md)。

以下是偏差偏移违规文件的架构。
+ `facet` - 分面的名称，由监控作业分析配置分面 `name_or_index` 提供。
+ `facet_value` - 分面的值，由监控作业分析配置分面 `value_or_threshold` 提供。
+ `metric_name` - 偏差指标的简称。例如，“CI”表示类别不平衡。有关每个训练前偏差指标的简称，请参阅[训练前偏差指标](clarify-measure-data-bias.md)；有关每个训练后偏差指标的简称，请参阅[训练后数据和模型偏差指标](clarify-measure-post-training-bias.md)。
+ `constraint_check_type` - 监控的违规类型。目前仅支持 `bias_drift_check`。
+ `description` - 解释违规行为的描述性消息。

```
{
    "version": "1.0",
    "violations": [{
        "facet": "string",
        "facet_value": "string",
        "metric_name": "string",
        "constraint_check_type": "string",
        "description": "string"
    }]
}
```

偏差指标用于衡量分布中的相等程度。值接近于零表示分布较为均衡。如果作业分析结果文件 (analysis.json) 中偏差指标的值比基准约束文件中的相应值差，则会记录违规行为。例如，如果 DPPL 偏差指标的基准约束为 `0.2`，而分析结果为 `0.1`，则不会记录任何违规行为，因为 `0.1` 比 `0.2` 更接近 `0`。但是，如果分析结果为 `-0.3`，则会记录违规行为，因为它比基准约束 `0.2` 离 `0` 更远。

```
{
    "version": "1.0",
    "violations": [{
        "facet": "Age",
        "facet_value": "40",
        "metric_name": "CI",
        "constraint_check_type": "bias_drift_check",
        "description": "Value 0.0751544567666083 does not meet the constraint requirement"
    }, {
        "facet": "Age",
        "facet_value": "40",
        "metric_name": "DPPL",
        "constraint_check_type": "bias_drift_check",
        "description": "Value -0.0791244970125596 does not meet the constraint requirement"
    }]
}
```

# 监测偏压飘移的参数
<a name="clarify-config-json-monitor-bias-parameters"></a>

Ama SageMaker zon Clarify 偏差监控会重复使用分析配置中使用的参数子集。[分析配置文件](clarify-processing-job-configure-analysis.md)介绍完配置参数后，本主题将提供 JSON 文件的示例。这些文件用于配置 CSV 和 JSON 行数据集，以便在机器学习模型投入生产时监控这些数据集的偏差偏移。

必须在 JSON 文件中提供以下参数。此 JSON 文件的路径必须在 [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ModelBiasAppSpecification](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ModelBiasAppSpecification) API 的 `ConfigUri` 参数中提供。
+ `"version"` -（可选）配置文件的架构版本。如果未提供，则使用支持的最新版本。
+ `"headers"` -（可选）数据集中的列名称列表。如果 `dataset_type` 为 `"application/jsonlines"` 且指定了 `"label"`，则最后一个标题将成为标签列的标题。
+ `"label"` -（可选）用于*偏差指标* 的模型的目标属性。指定为列名或索引（如果数据集格式为 CSV），或者指定为 JMESPath （如果数据集格式为 JSON 行）。
+ `"label_values_or_threshold"` -（可选）标签值或阈值列表。表示用于偏差指标的阳性结果。
+ `"facet"` -（可选）作为敏感属性的特征列表，称为分面。分面以成对的形式用于*偏差指标*，包括以下内容：
  + `"name_or_index"` - 分面列名称或索引。
  + `"value_or_threshold"` -（可选）分面列可以采用的值或阈值列表。表示敏感组，例如用于衡量偏差的组。如果未提供，则每个唯一值（而不是所有值）的偏差指标将按一个组进行计算。如果分面列为数字，则应用此阈值作为选择敏感组的下限。
+ `"group_variable"` -（可选）列名称或索引，指示用于*偏差指标**条件人口统计差异* 的组变量。

其他参数应在 [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ModelBiasJobInput](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_ModelBiasJobInput) API 的 `EndpointInput`（对于实时端点）或 `BatchTransformInput`（对于批量转换作业）中提供。
+ `FeaturesAttribute` - 如果端点输入数据格式为 `"application/jsonlines"`，则需要使用此参数。如果数据集格式为 JSON 线，则它 JMESPath用于定位特征列。
+ `InferenceAttribute`— 目标属性在模型输出中的索引或 JMESPath 位置，用于使用偏差指标监测偏差。如果在 CSV `accept_type` 情况下未提供该值，则假定模型输出是与得分或概率相对应的单个数值。
+ `ProbabilityAttribute`— 概率在模型输出中的索引或 JMESPath 位置。例如，如果模型输出是带有标签和概率列表的 JSON 行，则会选择与最大概率对应的标签进行偏差计算。
+ `ProbabilityThresholdAttribute` -（可选）一个浮点值，用于表示在二进制分类情况下选择二进制标签的阈值。默认值为 0.5。

## CSV 和 JSON 行数据集的 JSON 配置文件示例
<a name="clarify-config-json-monitor-bias-parameters-examples"></a>

以下是用于配置 CSV 和 JSON 行数据集以监控其偏差偏移的 JSON 文件示例。

**Topics**
+ [CSV 数据集](#clarify-config-json-monitor-bias-parameters-example-csv)
+ [JSON 行数据集](#clarify-config-json-monitor-bias-parameters-example-jsonlines)

### CSV 数据集
<a name="clarify-config-json-monitor-bias-parameters-example-csv"></a>

考虑一个包含四个特征列和一个标签列的数据集，其中第一个特征和标签为二进制，如下例所示。

```
0, 0.5814568701544718, 0.6651538910132964, 0.3138080342665499, 0
1, 0.6711642728531724, 0.7466687034026017, 0.1215477472819713, 1
0, 0.0453256543003371, 0.6377430803264152, 0.3558625219713576, 1
1, 0.4785191813363956, 0.0265841045263860, 0.0376935084990697, 1
```

假设模型输出有两列，其中第一列是预测标签，第二列是概率，如下例所示。

```
1, 0.5385257417814224
```

然后，以下 JSON 配置文件显示了一个示例，介绍如何配置此 CSV 数据集。

```
{
    "headers": [
        "feature_0",
        "feature_1",
        "feature_2",
        "feature_3",
        "target"
    ],
    "label": "target",
    "label_values_or_threshold": [1],
    "facet": [{
        "name_or_index": "feature_1",
        "value_or_threshold": [1]
    }]
}
```

预测标签由 `"InferenceAttribute"` 参数选择。使用从零开始的编号，因此 0 表示模型输出的第一列。

```
"EndpointInput": {
    ...
    "InferenceAttribute": 0
    ...
}
```

或者，您可以使用不同的参数将概率值转换为二进制预测标签。使用从零开始的编号：1 表示第二列；`ProbabilityThresholdAttribute` 值为 0.6 表示大于 0.6 的概率预测二进制标签为 1。

```
"EndpointInput": {
    ...
    "ProbabilityAttribute": 1,
    "ProbabilityThresholdAttribute": 0.6
    ...
}
```

### JSON 行数据集
<a name="clarify-config-json-monitor-bias-parameters-example-jsonlines"></a>

考虑一个包含四个特征列和一个标签列的数据集，其中第一个特征和标签为二进制，如下例所示。

```
{"features":[0, 0.5814568701544718, 0.6651538910132964, 0.3138080342665499], "label":0}
{"features":[1, 0.6711642728531724, 0.7466687034026017, 0.1215477472819713], "label":1}
{"features":[0, 0.0453256543003371, 0.6377430803264152, 0.3558625219713576], "label":1}
{"features":[1, 0.4785191813363956, 0.0265841045263860, 0.0376935084990697], "label":1}
```

假设模型输出有两列，其中第一列是预测标签，第二列是概率。

```
{"predicted_label":1, "probability":0.5385257417814224}
```

以下 JSON 配置文件显示了一个示例，介绍如何配置此 JSON 行数据集。

```
{
    "headers": [
        "feature_0",
        "feature_1",
        "feature_2",
        "feature_3",
        "target"
    ],
    "label": "label",
    "label_values_or_threshold": [1],
    "facet": [{
        "name_or_index": "feature_1",
        "value_or_threshold": [1]
    }]
}
```

然后，使用 `EndpointInput`（对于实时端点）或 `BatchTransformInput`（对于批量转换作业）中的 `"features"` 参数值来定位数据集中的特征，`"predicted_label"` 参数值从模型输出中选择预测标签。

```
"EndpointInput": {
    ...
    "FeaturesAttribute": "features",
    "InferenceAttribute": "predicted_label"
    ...
}
```

或者，您可以使用 `ProbabilityThresholdAttribute` 参数值将概率值转换为预测的二进制标签。例如，值为 0.6 表示大于 0.6 的概率预测二进制标签为 1。

```
"EndpointInput": {
    ...
    "FeaturesAttribute": "features",
    "ProbabilityAttribute": "probability",
    "ProbabilityThresholdAttribute": 0.6
    ...
}
```

# 计划偏差偏移监控作业
<a name="clarify-model-monitor-bias-drift-schedule"></a>

创建基准后，您可以调用 `ModelBiasModelMonitor` 类实例的 `create_monitoring_schedule()` 方法来计划每小时一次的偏差偏移监控。以下几节介绍如何为部署到实时端点的模型以及为批量转换作业创建偏差偏移监控。

**重要**  
创建监控计划时，您可以指定批量转换输入或端点输入，但不能同时指定两者。

与数据质量监控不同，如果要监控模型质量，则需要提供 Ground Truth 标签。但是，Ground Truth 标签可能会延迟。要解决这个问题，请在创建监控计划时指定偏移量。有关如何创建时间偏移的详细信息，请参阅[Model Monitor 偏移量](model-monitor-model-quality-schedule.md#model-monitor-model-quality-schedule-offsets)。

如果您已提交设定基准作业，则监控器会自动从设定基准作业中选取分析配置。如果您跳过设定基准步骤，或者捕获数据集的性质与训练数据集不同，则必须提供分析配置。

## 对部署到实时端点的模型进行偏差偏移监控
<a name="model-monitor-bias-quality-rt"></a>

要为实时端点计划偏差偏移监控，请将 `EndpointInput` 实例传递给 `ModelBiasModelMonitor` 实例的 `endpoint_input` 参数，如以下代码示例所示：

```
from sagemaker.model_monitor import CronExpressionGenerator
            
model_bias_monitor = ModelBiasModelMonitor(
    role=sagemaker.get_execution_role(),
    ...
)

model_bias_analysis_config = None
if not model_bias_monitor.latest_baselining_job:
    model_bias_analysis_config = BiasAnalysisConfig(
        model_bias_config,
        headers=all_headers,
        label=label_header,
    )

model_bias_monitor.create_monitoring_schedule(
    monitor_schedule_name=schedule_name,
    post_analytics_processor_script=s3_code_postprocessor_uri,
    output_s3_uri=s3_report_path,
    statistics=model_bias_monitor.baseline_statistics(),
    constraints=model_bias_monitor.suggested_constraints(),
    schedule_cron_expression=CronExpressionGenerator.hourly(),
    enable_cloudwatch_metrics=True,
    analysis_config=model_bias_analysis_config,
    endpoint_input=EndpointInput(
        endpoint_name=endpoint_name,
        destination="/opt/ml/processing/input/endpoint",
        start_time_offset="-PT1H",
        end_time_offset="-PT0H",
        probability_threshold_attribute=0.8,
    ),
)
```

## 对批量转换作业进行偏差偏移监控
<a name="model-monitor-bias-quality-bt"></a>

要为批量转换作业计划偏差偏移监控，请将 `BatchTransformInput` 实例传递给 `ModelBiasModelMonitor` 实例的 `batch_transform_input` 参数，如以下代码示例所示：

```
from sagemaker.model_monitor import CronExpressionGenerator
                
model_bias_monitor = ModelBiasModelMonitor(
    role=sagemaker.get_execution_role(),
    ...
)

model_bias_analysis_config = None
if not model_bias_monitor.latest_baselining_job:
    model_bias_analysis_config = BiasAnalysisConfig(
        model_bias_config,
        headers=all_headers,
        label=label_header,
    )
    
schedule = model_bias_monitor.create_monitoring_schedule(
   monitor_schedule_name=schedule_name,
   post_analytics_processor_script=s3_code_postprocessor_uri,
   output_s3_uri=s3_report_path,
   statistics=model_bias_monitor.baseline_statistics(),
   constraints=model_bias_monitor.suggested_constraints(),
   schedule_cron_expression=CronExpressionGenerator.hourly(),
   enable_cloudwatch_metrics=True,
   analysis_config=model_bias_analysis_config,
   batch_transform_input=BatchTransformInput(
        destination="opt/ml/processing/input",
        data_captured_destination_s3_uri=s3_capture_path,
        start_time_offset="-PT1H",
        end_time_offset="-PT0H",
        probability_threshold_attribute=0.8
   ),
)
```

# 查看数据偏差偏移报告
<a name="clarify-model-monitor-bias-drift-report"></a>

如果您无法在 SageMaker Studio 中查看生成的报告中的监控结果，则可以按如下方式将其打印出来：

```
schedule_desc = model_bias_monitor.describe_schedule()
execution_summary = schedule_desc.get("LastMonitoringExecutionSummary")
if execution_summary and execution_summary["MonitoringExecutionStatus"] in ["Completed", "CompletedWithViolations"]:
    last_model_bias_monitor_execution = model_bias_monitor.list_executions()[-1]
    last_model_bias_monitor_execution_report_uri = last_model_bias_monitor_execution.output.destination
    print(f'Report URI: {last_model_bias_monitor_execution_report_uri}')
    last_model_bias_monitor_execution_report_files = sorted(S3Downloader.list(last_model_bias_monitor_execution_report_uri))
    print("Found Report Files:")
    print("\n ".join(last_model_bias_monitor_execution_report_files))
else:
    last_model_bias_monitor_execution = None
    print("====STOP==== \n No completed executions to inspect further. Please wait till an execution completes or investigate previously reported failures.")
```

 如果与基准相比存在违规情况，则在此列出：

```
if last_model_bias_monitor_execution:
    model_bias_violations = last_model_bias_monitor_execution.constraint_violations()
    if model_bias_violations:
        print(model_bias_violations.body_dict)
```

如果您的模型部署到实时终端节点，则可以在 SageMaker AI Studio 中查看分析结果和 CloudWatch 指标的可视化效果，方法是选择 “**端点**” 选项卡，然后双击该端点。

# CloudWatch 偏差漂移分析的指标
<a name="clarify-model-monitor-bias-drift-cw"></a>

本指南显示了在 Clarify 中可用于偏差漂移分析的 CloudWatch 指标及其 SageMaker 属性。偏差漂移监控作业会计算[训练前的偏差指标](https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-measure-data-bias.html)和[训练后的偏差指标](https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-measure-post-training-bias.html)，并将它们发布到以下命名空间： CloudWatch 
+ 对于实时端点：`aws/sagemaker/Endpoints/bias-metrics`
+ 对于批量转换作业：`aws/sagemaker/ModelMonitoring/bias-metrics`

 CloudWatch 指标名称会将指标的短名称附加到`bias_metric`后面。

例如，`bias_metric_CI` 是类别不平衡 (CI) 的偏差指标。

**注意**  
`+/- infinity` 以浮点数 `+/- 2.348543e108` 形式发布，不发布包含空值的错误。

每个指标都具有以下属性：
+ `Endpoint`：受监控端点的名称（如果适用）。
+ `MonitoringSchedule`：监控作业的计划名称。
+ `BiasStage`：偏差偏移监控作业的阶段名称。选择 `Pre-training` 或 `Post-Training`。
+ `Label`：目标特征的名称，由监控作业分析配置 `label` 提供。
+ `LabelValue`：目标特征的值，由监控作业分析配置 `label_values_or_threshold` 提供。
+ `Facet`：分面的名称，由监控作业分析配置分面 `name_of_index` 提供。
+ `FacetValue`：分面的值，由监控作业分析配置分面 `nvalue_or_threshold` 提供。

要阻止监控作业发布指标，请在[模型偏差作业](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateModelBiasJobDefinition.html)定义的 `Environment` 映射中将 `publish_cloudwatch_metrics` 设置为 `Disabled`。