预加载R包 [英] Pre-load R packages
问题描述
我正在尝试使用Microsoft机器学习服务器(开发人员版)来发布R代码,我是否有办法在默认情况下预加载某些软件包以节省软件包加载时间。
<我在OpenCPU中找到了这个选项,在那里我可以定义要在OpenCPU配置文件中预加载的包。
MS Machine Learning Server中有类似的功能
非常感谢。
这是怎么回事你能行的。这是指机器学习服务器的最新9.3版本:
1。发布服务时添加initcode。我们的Py API和REST API支持init代码:
https://microsoft.github.io/deployr-api-docs/#publishwebservicerequest
https://docs.microsoft.com/en-us/machine-learning-server/python-reference/azureml-model-management-sdk/service-definition#code_str
initCode将加载所需的包。
2。您可以将专用池与initCode一起使用,以便在我们在池中创建shell而不是服务消耗时加载包:
https://docs.microsoft。 com / en-us / machine-learning-server / operationalize / how-to-create-manage-session-pools
https://docs.microsoft.com/en-us/机器学习服务器/操作化/ python /如何创建管理会话池
I am trying Microsoft Machine Learning Server (Developer Edition) to publish R code, I wounder is there a way to pre load some packages by default to save package loading time.
I found this option in OpenCPU where I can define the packages to be pre-loaded in the OpenCPU configuration file.
is there a similar feature in MS Machine Learning Server
Many Thanks.
Hi,
Here is how you can do it. This refer to the latest 9.3 version of Machine learning server:
1. Add an initcode when you publish a service. The init code is supported by our Py API and in our REST APIs:
https://microsoft.github.io/deployr-api-docs/#publishwebservicerequest
https://docs.microsoft.com/en-us/machine-learning-server/python-reference/azureml-model-management-sdk/service-definition#code_str
The initCode will load the needed packages.
2. You can use the dedicated pool together with the initCode so that the packages will be loaded when we create the shell in the pool and not on service consumption:
https://docs.microsoft.com/en-us/machine-learning-server/operationalize/how-to-create-manage-session-pools
https://docs.microsoft.com/en-us/machine-learning-server/operationalize/python/how-to-create-manage-session-pools
这篇关于预加载R包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!