简体   繁体   English

如何使用新训练的 Model 更新 Sagemaker Endpoint?

[英]How to update Sagemaker Endpoint with the newly Trained Model?

I am able to train a model on Sagemaker and then deploy a model endpoint out of it.我能够在 Sagemaker 上训练一个 model,然后从中部署一个 model 端点。

Now, I want to retrain my model every week with the new data that is coming in. My question is - when I retrain the model how do I update my existing endpoint to use the latest model. (I don't want to deploy a new endpoint)现在,我想每周用新数据重新训练我的 model。我的问题是 - 当我重新训练 model 时,我如何更新我现有的端点以使用最新的 model。(我不想部署一个新端点)

From some exploration, I think I can do it in 2 ways -通过一些探索,我认为我可以通过两种方式做到这一点 -

  1. Near the end of the training job, I create a new EndpointConfig and later use UpdateEndpoint - The downside of this would be - I would end up with a lot of unnecessary Endpoint Configurations in my AWS Account?在训练工作接近尾声时,我创建了一个新的EndpointConfig并稍后使用UpdateEndpoint - 这样做的缺点是 - 我最终会在我的 AWS 账户中得到很多不必要的端点配置? Or am I thinking about it wrongly?还是我想错了?

  2. Near the end of the training job, I deploy the trained model using .deploy() and set update_endpoint=True as illustrated in Sagemaker SDK Doc在培训工作接近尾声时,我使用.deploy()部署经过培训的 model 并设置update_endpoint=True ,如Sagemaker SDK Doc中所示

I am not sure which is the better solution to accomplish this?我不确定哪个是实现此目标的更好解决方案? Is there an even better way to do this?有没有更好的方法来做到这一点?

If you are interested in doing this programmatically, use an AWS SDK (I will answer this assuming you are using Java.如果您有兴趣以编程方式执行此操作,请使用 AWS SDK(假设您使用的是 Java,我会回答这个问题。

Look the AWS SDK for Java V2 Javadocs.在 AWS SDK 中查找 Java V2 Javadocs。 You can use the UpdateEndpoint to perform this use case.您可以使用UpdateEndpoint来执行此用例。 This method deploys the new EndpointConfig specified in the request, switches to using newly created endpoint, and then deletes resources provisioned for the endpoint using the previous EndpointConfig (there is no availability loss).此方法部署请求中指定的新 EndpointConfig,切换到使用新创建的端点,然后删除使用以前的 EndpointConfig 为端点配置的资源(没有可用性损失)。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将重新训练的 Sagemaker model 部署到端点? - How can I deploy a re-trained Sagemaker model to an endpoint? 如何在 AWS sagemaker 上部署预训练的 sklearn model? (端点停留在创建) - How do I deploy a pre trained sklearn model on AWS sagemaker? (Endpoint stuck on creating) 使用自定义训练的 Keras model 和 Sagemaker 端点结果 ModelError:调用 InvokeEndpoint 操作时发生错误(ModelError): - Using custom trained Keras model with Sagemaker endpoint results ModelError: An error occurred (ModelError) when calling the InvokeEndpoint operation: 为 PyTorch Model 调用 SageMaker 端点 - Invoking SageMaker Endpoint for PyTorch Model 如何从端点内访问 sagemaker 模型注册表指标 - How to access sagemaker model registry metrics from within the endpoint 从 SageMaker model 端点获取 model 元数据 - Getting model metadata from SageMaker model endpoint 如何使用在不同输入数据上训练的多个 ml 模型生成一个 model 并在 Sagemaker 中给出预测? - How to use multiple ml models trained on different input data to produce one model and give prediction in Sagemaker? 如何 Curl Amazon Sagemaker 端点 - How to Curl an Amazon Sagemaker Endpoint 部署 TensorFlow 概率回归 model 作为 Sagemaker 端点 - Deploy TensorFlow probability regression model as Sagemaker endpoint 在 Sagemaker 和 Huggingface 中训练一个已经训练过的 model 而无需重新初始化 - Train an already trained model in Sagemaker and Huggingface without re-initialising
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM