[英]Where to deploy machine learning model for API predictions?
I created a machine learning model with Prophet :我用Prophet创建了一个机器学习模型:
https://www.kaggle.com/marcmetz/ticket-sales-prediction-facebook-prophet https://www.kaggle.com/marcmetz/ticket-sales-prediction-facebook-prophet
I have a web application running with Django.我有一个与 Django 一起运行的 Web 应用程序。 From that application, I want to be able to lookup predictions from the model I created.
在该应用程序中,我希望能够从我创建的模型中查找预测。 I assume the best way to do is to deploy my model on Google Cloud Platform or AWS (?) and access forecasts through API calls from my web application to one of these services.
我认为最好的方法是将我的模型部署在 Google Cloud Platform 或 AWS (?) 上,并通过从我的 Web 应用程序到这些服务之一的 API 调用访问预测。
My question now: Is that way I described it the right way to do so?我现在的问题是:我这样描述它是正确的方法吗? I still struggle to decide if either AWS or Google Cloud is the better solution for my case, especially with Prophet.
我仍然很难决定 AWS 或 Google Cloud 是否更适合我的情况,尤其是对于 Prophet。 I could only find examples with
scikit-learn
.我只能找到
scikit-learn
例子。 Any of you who has experience with that and can point me in the right direction?你们中有人有这方面的经验并且可以指出我正确的方向吗?
It really depends on the type of model that you are using.这实际上取决于您使用的模型类型。 In many cases, the model inference is getting a data point (similar to the data points you trained it with) and the model will generate a prediction to that requested data point.
在许多情况下,模型推理正在获取一个数据点(类似于您训练它的数据点),并且模型将生成对该请求数据点的预测。 In such cases, you need to host the model somewhere in the cloud or on the edge.
在这种情况下,您需要将模型托管在云端或边缘的某处。
However, Prophet is often generating the predictions for the future as part of the training of the model.但是,作为模型训练的一部分,Prophet 通常会生成对未来的预测。 In this case, you only need to serve the predictions that were already calculated, and you can serve them as a CSV file from S3, or as lookup values from a DynamoDB or other lookup data stores.
在这种情况下,您只需提供已经计算过的预测,您可以将它们作为来自 S3 的 CSV 文件提供,或者作为来自 DynamoDB 或其他查找数据存储的查找值提供。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.