简体   繁体   English

将AWS SageMaker ml模型转换为Java库

[英]Convert AWS SageMaker ml model into a java library

When using AWS SageMaker, after you complete the training of a model, SageMaker will output the model as a model.tar.gz file in a specificed S3 bucket. 使用AWS SageMaker时,完成模型训练后,SageMaker会将模型输出为特定S3存储桶中的model.tar.gz文件。 The next step the documentation recommends is to deploy the model onto SageMaker. 文档建议的下一步是将模型部署到SageMaker上。 However, I do not want to deploy the model. 但是,我不想部署模型。 In my case, there are some service to service latency considerations for not going that route. 在我的情况下,有一些服务到服务的延迟注意事项,它们没有走那条路线。 Furthermore, I would also like to still utilize predictions from the model in offline scenarios. 此外,我还想在离线情况下仍然利用模型的预测。 Has anyone been able to take the model.tar.gz and make it into a java library? 有人能将model.tar.gz放入Java库吗? What tools did you use? 您使用了哪些工具? How did you parse the model? 您是如何解析模型的?

Most of the machine learning in the recent years are developed in Python and it is very common and performing well to serve the model with Python environments. 近年来,大多数机器学习都是使用Python开发的,在Python环境下为模型提供服务非常普遍并且运行良好。 You can see the flow in SageMaker documentation ( https://docs.aws.amazon.com/sagemaker/latest/dg/how-it-works-hosting.html ), but this is completely open and can be achieved with NGNIX, GUnicorn. 您可以在SageMaker文档( https://docs.aws.amazon.com/sagemaker/latest/dg/how-it-works-hosting.html )中看到该流程,但这是完全开放的,可以使用NGNIX实现,独角兽 推理Docker结构

You find some Java libraries for running some of the common machine learning algorithms, mainly: https://github.com/jpmml 您会找到一些Java库来运行一些常见的机器学习算法,主要是: https : //github.com/jpmml

Nevertheless, check if you must have Java as your run-time environment. 但是,请检查是否必须将Java作为运行时环境。 Java will add very little value here (if any) and a lot of issues of compatibility. Java将在这里(如果有的话)增加很少的价值,并且会带来很多兼容性问题。

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

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