使用带有训练脚本的拥抱面估计器和直接在 AWS sagemaker 中使用笔记本有什么区别?

what is the difference between using a hugging face estimator with training script and directly using a notebook in AWS sagemaker?

在像Fine-tuning a pytorch bert model and deploying it with sagemaker and fine-tune and host huggingface models on sagemaker这样的教程中,使用拥抱脸估计器来调用训练脚本。如果我直接 运行 笔记本本身中的脚本代码会有什么区别?是因为估算器让部署模型更容易吗?

您可以 运行 笔记本本身中的脚本,但它不会使用 SageMaker 提供的功能进行部署。您看到的估算器是向 SageMaker 指定您正在使用的框架以及您正在传递的训练脚本。如果您 运行 笔记本中的脚本代码就像在您的本地环境中进行训练一样。通过将脚本传递给 Estimator,您 运行 正在执行 SageMaker 训练作业。估算器旨在封装 SageMaker 上的训练。

SageMaker 估算器概述:https://sagemaker.readthedocs.io/en/stable/overview.html