使用步骤函数对两个 Sagemaker 训练的模型进行比较

发布于 2025-01-18 17:12:41 字数 182 浏览 0 评论 0原文

正如标题所说,我正在尝试找到一种方法,以使用步骤功能在萨格人训练的两个模型之间进行比较。 目前看起来像这样的周期: 开始训练,保存模型,运行一个lambda,检查准确性是否大于90%,是否满足:批处理作业(如果不满足):循环终止。 我希望能够部署的是一种解决方案,而不是与90%的精度相比,这与以前的培训相比。 我目前正在使用步骤功能数据科学SDK。

as the title says, I am trying to find a way to make a comparison between two models trained in sagemaker, using a step functions.
The cycle currently looks like this:
Start training, save the model, a lambda is run that checks if the accuracy was greater than 90 percent, if it is met: a batch job is started, if it is not met: the cycle is terminated.
What I would like to be able to deploy is a solution that instead of being compared to 90% accuracy, that is compared to a previous training.
I am currently using the Step Functions Data Science SDK.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

冬天的雪花 2025-01-25 17:12:41

使用步骤功能:将JSON文件保存在S3中,并具有先前的模型评估结果,并具有比较当前和先前结果的LAMBDA步骤。

还要考虑使用SageMaker管道而不是步骤功能。 AS sagemaker' a>,您将添加此条件逻辑:

在评估步骤(处理作业)中,获取先前执行的准确性值并计算最佳。这将通过处理脚本中的Python代码完成。然后,生成一个JSON文件,该文件既包含当前执行的精度值,又包含过去执行中的最佳值。
定义使用a propertyfile propertyfile a>和jsonget表达式从json文件中读取条件的左侧和右侧,以获得[准确性> POSTER_BEST_ACCURACY]。

With Step Functions: Save a json file in S3 with previous model evaluation results, and have a Lambda step to compare current and previous results.

Also consider using SageMaker Pipelines instead of Step Functions. As SageMaker Pipelines is integrated with SageMaker Experiments, you'll add this conditional logic:

In the evaluation step (processing job) get the accuracy values of the previous executions and compute the best. This will be done via Python code in the processing script. Then, generate a JSON file that contains both the accuracy value for the current execution and the best value across the past executions.
Define a conditional step that uses a PropertyFile and JsonGet expression to read from the JSON file both the left side and right side of the condition, in order to get a condition like [accuracy > previous_best_accuracy].

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文