Neptune ML 阶段的实例选择 - Amazon Neptune
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

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

Neptune ML 阶段的实例选择

Neptune ML 处理的不同阶段使用不同的 SageMaker 实例。在这里,我们将讨论如何为每个阶段选择合适的实例类型。您可以在 Amazon SageMaker 定价中找到有关 SageMaker 实例类型和定价的信息。

选择进行数据处理的实例

SageMaker 数据处理步骤需要一个具有足够内存和磁盘存储空间的处理实例,用于存放输入、中间和输出数据。所需的具体内存和磁盘存储量取决于 Neptune ML 图形的特性及其导出的特征。

默认情况下,Neptune ML 会选择内存比磁盘上导出的图形数据大小大十倍的最小 ml.r5 实例。

为模型训练和模型转换选择实例

模型训练模型转换选择正确的实例类型取决于任务类型、图形大小和周转要求。GPU 实例可提供最佳性能。我们通常建议使用 p3g4dn 串行实例。您也可以使用 p2p4d 实例。

默认情况下,Neptune ML 选择其内存超过模型训练和模型转换所需内存的最小 GPU 实例。您可以在 Amazon S3 数据处理输出位置的 train_instance_recommendation.json 文件中找到该选择的内容。下面是 train_instance_recommendation.json 文件的内容示例:

{ "instance": "(the recommended instance type for model training and transform)", "cpu_instance": "(the recommended instance type for base processing instance)", "disk_size": "(the estimated disk space required)", "mem_size": "(the estimated memory required)" }

为推理端点选择实例

推理端点选择正确的实例类型取决于任务类型、图形大小和预算。默认情况下,Neptune ML 选择推理端点所需内存较多的最小 ml.m5d 实例。

注意

如果需要超过 384GB 的内存,Neptune ML 将使用 ml.r5d.24xlarge 实例。

您可以在位于您用于模型训练的 Amazon S3 位置的 infer_instance_recommendation.json 文件中查看 Neptune ML 推荐的实例类型。下面是该文件内容的示例:

{ "instance" : "(the recommended instance type for an inference endpoint)", "disk_size" : "(the estimated disk space required)", "mem_size" : "(the estimated memory required)" }