[英]Script test seems to not have correct working directory
I am trying to see if I can get code examples to run in my user account, rather than the testuser
account. 我正在尝试查看是否可以在我的用户帐户而不是
testuser
帐户中运行代码示例。 To that end, I did the following: 为此,我做了以下工作:
example-fraud-score
under my DeployR user account (not the testuser
as laid out in the tutorial, found here: https://msdn.microsoft.com/en-us/microsoft-r/deployr-data-scientist-getting-started ) testuser
下创建了一个example-fraud-score
文件夹,位于以下位置: https ://msdn.microsoft.com/zh-cn/microsoft-r/deployr-data -科学家入门 ) analytics/
from the tutorial to the example-fraud-score
directory on the DeployR server. analytics/
的内容到DeployR服务器上的example-fraud-score
目录。 ccFraudScore.R
, contents here: https://github.com/Microsoft/js-example-fraud-score-basics/blob/master/analytics/ccFraudScore.R using the 'Test' tab on the right after clicking on the filename in DeployR. ccFraudScore.R
,其内容在这里: https : //github.com/Microsoft/js-example-fraud-score-basics/blob/master/analytics/ccFraudScore.R使用右侧的“测试”选项卡在DeployR中单击文件名后。 When I do, I get the error: 当我这样做时,我得到了错误:
Connecting to 172.31.232.190:8000
3:53:26 PM Stream Connect matthew.pettis connection established, waiting for an event...
> require(deployrUtils)
> deployrInput("{\"name\": \"bal\", \"render\":\"integer\", \"default\": 5000, \"min\" : 0, \"max\": 25000 }")
> deployrInput("{\"name\": \"trans\", \"render\":\"integer\", \"default\": 12, \"min\" : 0, \"max\": 100 }")
> deployrInput("{\"name\": \"credit\", \"render\":\"integer\", \"default\": 8, \"min\" : 0, \"max\": 75 }")
> if (!exists("fraudModel")) {
+ load("fraudModel.rData")
Console Error cannot open the connection
API Error cannot open the connection
I tried following the post here to troubleshoot, but I could not find where my directory was: deployR cannot open the connection 我尝试按照此处的帖子进行故障排除,但找不到目录所在的位置: deployR无法打开连接
When I used the script to look for the working directory (and list contents), I see: 当我使用脚本查找工作目录(和列表内容)时,我看到:
> require(deployrUtils)
> getwd()
[1] "C:/PROGRA~1/MICROS~2/DEPLOY~1.0/rserve/workdir/conn2209460"
> list.files(getwd())
[1] "DeployREngineSource.r" "unnamedplot001.png"
This seems like the wrong directory to be using. 这似乎是使用错误的目录。 When I try to hunt around for my directory for my user, I can't seem to find it.
当我尝试为用户寻找目录时,似乎找不到它。 My DeployR version is 8.0.0.
我的DeployR版本是8.0.0。
Help is appreciated. 感谢帮助。
Thanks, Matt 谢谢,马特
Is that the remote directory (the second box)? 那是远程目录(第二个方框)吗? If so, why don't you call
setwd()
? 如果是这样,为什么不调用
setwd()
呢?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.