使用步骤函数对两个 Sagemaker 训练的模型进行比较
正如标题所说,我正在尝试找到一种方法,以使用步骤功能在萨格人训练的两个模型之间进行比较。 目前看起来像这样的周期: 开始训练,保存模型,运行一个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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用步骤功能:将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].