SQL Server 2017机器学习服务中R的持久环境 [英] Persistent environment for R in SQL Server 2017 Machine Learning Services

查看:90
本文介绍了SQL Server 2017机器学习服务中R的持久环境的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在SQL Server 2017中配置了机器学习服务,供我的开发人员测试他的R代码。

I have configured Machine Learning Services in SQL Server 2017 for my developer to test his R code.

我们还没有找到如何在SQL Server中设置持久R环境,以便每次运行存储过程时都不必重新加载R环境。

We haven't found how we can setup a persistent R environment in SQL Server so that the R environment doesn't have to be reloaded every time we run the stored procedure.

我们错过了什么?有人知道这是否可行?

Is there something we missed? Anyone know if this is possible?

谢谢!

史蒂夫

推荐答案

我假设你不想在启动时加载R包,并希望它们被预加载。

I assume you would like to not have to load R packages on startup and would like them to be preloaded.

如果你可以修改文件,那就是你的目的: 

If that is what you are after you can modify the file:  

C:\Program Files \ Microsoft \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\ etcc \ Rprofile.site 

C:\Program Files\Microsoft\ML Server\R_SERVER\etc\Rprofile.site 

以便这些库在启动时自动加载。

so that these libraries get automatically loaded on startup.

您可以添加以下行:

library(data.table)

library(data.table)

到文件的最后,或者你可以修改以下行来预加载这些库:

to the very end of the file or you can modify the following line to preload these libraries:

选项(defaultPackages = c(getOption(" defaultPackages")," rpart"," lattice"," RevoScaleR",

             if(!相同(system.file(package =" mrsdeploy& ";","""&&相同(。平台

options(defaultPackages=c(getOption("defaultPackages"), "rpart", "lattice", "RevoScaleR",
            if(!identical(system.file(package="mrsdeploy"), "") && identical(.Platform


操作系统,"窗口"))"mrsdeploy",


   #我们有MicrosoftML package

    if(!相同(system.file(package =" MicrosoftML"),"")&&& isMMLSupported)" MicrosoftML",
$
   "RevoMods","RevoUtils","RevoUtilsMath"))
OS, "windows")) "mrsdeploy",
   # we have MicrosoftML package
   if(!identical(system.file(package="MicrosoftML"),"") && isMMLSupported) "MicrosoftML",
   "RevoMods", "RevoUtils", "RevoUtilsMath"))


这篇关于SQL Server 2017机器学习服务中R的持久环境的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆