简体   繁体   English

Azure ML与Azure功能,用于运行R-Script

[英]Azure ML vs Azure function for running R-Script

The stats team has developed an R-Script that takes an array of variables and returns an array of integers (calculations). 统计团队开发了一个R-Script,它接受一组变量并返回一个整数数组(计算)。 I want to build this as a stand alone function that I can call with HTTP requests from various apps. 我想将它构建为一个独立的功能,我可以使用来自各种应用程序的HTTP请求调用它。 A lot of the stuff I am reading is out dated. 我正在阅读的很多东西已经过时了。 Should I use Azure ML or Azure functions for this? 我应该使用Azure ML或Azure功能吗?

Note: The R-Script does not contain any machine learning. 注意:R-Script不包含任何机器学习。 The R-Script contains a package that is not listed on azure. R-Script包含一个未在azure上列出的包。

Azure ML appears to be all about predictive models so I have not tried it. Azure ML似乎都是关于预测模型的,所以我没有尝试过。 I tried Azure function under "consumption" pricing tier and I do not recommend it. 我在“消费”定价层下尝试了Azure功能,我不推荐它。 Currently R site extensions are removed from the Azure function site's extension list so the work around is to copy the R folder to your Azure function and use R.Net library in C# to initiate R commands. 目前,R站点扩展已从Azure功能站点的扩展列表中删除,因此解决方法是将R文件夹复制到Azure功能,并使用C#中的R.Net库启动R命令。

The issue with Azure function under "consumption" plan is that every 5 minutes of inactivity your function is erased from server memory so when the first user hit the app it initiates a "cold start". “消费”计划下Azure功能的问题是,每5分钟不活动,您的功能将从服务器内存中删除,因此当第一个用户点击应用程序时,它会启动“冷启动”。 In layman's terms, during a cold start Azure finds a server that is available to run your function and copies all the files to that server and then executes the script. 通俗地说,在冷启动期间,Azure找到一个可用于运行您的功能的服务器,并将所有文件复制到该服务器,然后执行该脚本。 Copying the R folder takes very long and is not ideal for any client facing requests. 复制R文件夹需要很长时间,并不适合任何面临请求的客户端。

I'm sure using a pricing plan would solve the cold start issue but pricing tier means I'm hosting it on my VM which is not a "serverless" function and defeats the purpose of having a function. 我确信使用定价计划可以解决冷启动问题,但定价层意味着我将其托管在我的VM上,这不是一个“无服务器”功能,并且无法实现功能。 I might as well build an API web app. 我不妨构建一个API Web应用程序。 I am going to try Lambda AWS to see if it has the same cold start issues. 我将尝试使用Lambda AWS来查看它是否具有相同的冷启动问题。

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

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