简体   繁体   English

如何部署 sagemaker 模型(使用 Java)

[英]How to deploy a sagemaker model(using Java)

I am trying to use Sagemaker for predictions that my Springboot application needs.我正在尝试使用 Sagemaker 进行我的 Springboot 应用程序需要的预测。 I have created an ML model using sageMakerClient.createModel then created a training job for it using sageMakerClient.createTrainingJob and successfully created model as shown below,我使用 sageMakerClient.createModel 创建了一个 ML model 然后使用sageMakerClient.createModel sageMakerClient.createTrainingJob了一个训练作业并成功创建了 model ,如下所示,

在此处输入图像描述

Now how to I deploy the model and create a REST end point that I can use from my Java application to end data and get predictions?现在如何部署 model 并创建一个 REST 端点,我可以从我的 Java 应用程序中使用它来结束数据并获取预测? I am not able to figure that out.我无法弄清楚。

You should be able to do this using the Java SDK.您应该可以使用 Java SDK 来执行此操作。 Here is the documentation for creating an endpoint.这是创建端点的文档。 http://appdoc.app/artifact/com.amazonaws/aws-java-sdk-osgi/1.11.333/com/amazonaws/services/sagemaker/model/CreateEndpointResult.html http://appdoc.app/artifact/com.amazonaws/aws-java-sdk-osgi/1.11.333/com/amazonaws/services/sagemaker/model/CreateEndpointResult.html

To invoke an endpoint use the following documentation https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/sagemakerruntime/AmazonSageMakerRuntime.html#invokeEndpoint-com.amazonaws.services.sagemakerruntime.model.InvokeEndpointRequest-要调用终端节点,请使用以下文档https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/sagemakerruntime/AmazonSageMakerRuntime.html#invokeEndpoint-com.amazonaws.services.sagemakerruntime.Z20F35E630DAF49D8F4C3C。 InvokeEndpointRequest-

Here is a public Github gist with examples of invocation of an endpoint from all languages including Java.这是一个公共 Github 要点,其中包含从所有语言(包括 Java)调用端点的示例。 https://gist.github.com/mvsusp/b9de070b310af6876de7b59beda0fb4a https://gist.github.com/mvsusp/b9de070b310af6876de7b59beda0fb4a

I work for AWS & my opinions are my own.我为 AWS 工作,我的意见是我自己的。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM