

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

# 使用 Debugger 客户端库创建自定义规则
<a name="debugger-custom-rules"></a>

您可以使用调试器规则 APIs 和提供用于构建自己的规则容器的工具的开源 [`smdebug`Python 库](https://github.com/awslabs/sagemaker-debugger/)来创建自定义规则来监控您的训练作业。

## 创建自定义规则的先决条件
<a name="debugger-custom-rules-prerequisite"></a>

要创建 Debugger 自定义规则，您需要满足以下先决条件。
+ [SageMaker 调试器规则. 自定义 API](https://sagemaker.readthedocs.io/en/stable/api/training/debugger.html#sagemaker.debugger.Rule.custom)
+ [开源 smdebug Python 库](https://github.com/awslabs/sagemaker-debugger/)
+ 您自己的自定义规则 python 脚本
+ [URIs 适用于自定义规则评估者的 Amazon SageMaker 调试器图片](debugger-reference.md#debuger-custom-rule-registry-ids)

**Topics**
+ [创建自定义规则的先决条件](#debugger-custom-rules-prerequisite)
+ [使用 `smdebug` 客户端库以 Python 脚本创建自定义规则](debugger-custom-rules-python-script.md)
+ [使用调试器 APIs 运行您自己的自定义规则](debugger-custom-rules-python-sdk.md)