Code Monkey home page Code Monkey logo

azure-machinelearning-clientlibrary-r's Introduction

azure-machinelearning-clientlibrary-r's People

Contributors

andrie avatar briannagerads avatar jreynolds01 avatar microsoft-github-policy-service[bot] avatar ritzjwa avatar w4ngatang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

azure-machinelearning-clientlibrary-r's Issues

setting RCurlOptions breaks functionality in OS X 10.11

line 3 in AzureML:::getFramework() breaks functionality in Revolution R Open 3.2.2 on OS X 10.11 El Capitan.

tUrl <- sprintf("%s/workspaces/%s/webservices", AzureML:::prodURL, ws_id)
auth <- paste("Bearer",auth_token)
out <- RCurl::curlPerform(url = tUrl, httpheader = c(Authorization = auth, 
                                              'Content-Type' = "application/json", Accept = "application/json"))
getOption("RCurlOptions")

works. and the getOption() call returns an empty list.

Although the previous commands work, the following command:

AzureML:::getFramework(tUrl, auth_token)

fails with error code -9841:

* SSLRead() return error -9841
* Closing connection 0
Error in function (type, msg, asError = TRUE)  : 
  SSLRead() return error -9841

At this point, trying to rerun the curlPerform() call:

out <- RCurl::curlPerform(url = tUrl, httpheader = c(Authorization = auth, 
                                              'Content-Type' = "application/json", Accept = "application/json"))

now fails, because the RCurlOption cainfo field is set:

> getOption("RCurlOptions")
$cainfo
[1] "/Library/Frameworks/R.framework/Versions/3.2/Resources/library/RCurl/CurlSSL/cacert.pem"

Resetting the option to an empty list:

options(RCurlOptions = list())

restores functionality, and

out <- RCurl::curlPerform(url = tUrl, httpheader = c(Authorization = auth, 
                                              'Content-Type' = "application/json", Accept = "application/json"))

works again.

cannot open file 'xyz.zip': No such file or directory on publishWebService

Hi guys, great stuff this! I'm running a small experiment to see how publishWebService would deal with global variables, but I'm getting an error.

Here's the code - just trying to get a 'hello world' going:

install.packages(c("RCurl", "RJSONIO", "uuid", "jsonlite", "codetools", "base64enc", "httr", "data.table", "df2json", "rjson", "devtools"), repos = "http://cran.r-project.org")
devtools::install_github("Azure-MachineLearning-ClientLibrary-R", "Azure", subdir="AzureML")
require(AzureML)

counter <- 0;

greet <- function(name, age) {
  counter <<- counter + 1;
  return(c('hi there', name, ' your age is ', age, ' counter is @ ', counter))
}

wsid <- "my-ws-id"
authToken <- "my-auth-token"

response <- publishWebService("greet", "greetOnline", 
                              list("name"="string", "age"="int"), list("greeting"="string"), wsid, authToken)

The error message I'm getting:

Error in file(what, "rb") : cannot open the connection
In addition: Warning messages:
1: running command '"zip" -r9X "f0dc22a6610811e5a3343563995c4650" "f0dc22a6610811e5a3343563995c4650" ' had status 127 
2: In file(what, "rb") :
  cannot open file 'f0dc22a6610811e5a3343563995c4650.zip': No such file or directory

Now, I've checked and inside my current working directory - a new file was generated, called f0dc22a6610811e5a3343563995c4650 - however, it's not called 'f0dc22a6610811e5a3343563995c4650.zip( with.zip` at the end ). Could this be a bug?

I'm on windows, running R 3.2.1 and R studio. I'll start with updating the R version, but I'm sceptical whether that's going to be the problem.

Add version checking

AzureML should check to make sure that the current version of R/Rtools is compatible with AzureML.

WorkspaceNotFoundThe Workspace Id in the request URL is invalid or does not exist

Hi guys,

I'm following the tutorial here: https://cran.r-project.org/web/packages/AzureML/vignettes/AzureML.html.

I'm trying to publish this very simple function to Azure ML:

install.packages(c("RCurl", "RJSONIO", "uuid", "jsonlite", "codetools", "base64enc", "httr", "data.table", "df2json", "rjson", "devtools"), repos = "http://cran.r-project.org")
devtools::install_github("Azure-MachineLearning-ClientLibrary-R", "Azure", subdir="AzureML")
require(AzureML)

counter <- 0;

greet <- function(name, age) {
  counter <<- counter + 1;
  return(c('hi there', name, ' your age is ', age, ' counter is @ ', counter))
}

wsid <- "d891e15e356647aab01e1e2fcd65aa9f"
authToken <- "4b1faa5269094b71957988e39e7ac5f4"

response <- publishWebService("greet", "greetOnline", 
                              list("name"="string", "age"="int"), list("greeting"="string"), wsid, authToken)

I'm getting error message:

* Hostname was NOT found in DNS cache
*   Trying 157.55.203.189...
* Connected to management-tm.azureml.net (157.55.203.189) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: C:/Users/Jochen/Documents/R/win-library/3.2/RCurl/CurlSSL/cacert.pem
  CApath: none
* SSL connection using TLSv1.0 / ECDHE-RSA-AES256-SHA
* Server certificate:
*    subject: CN=*.azureml.net
*    start date: 2015-01-22 23:26:30 GMT
*    expire date: 2017-01-21 23:26:30 GMT
*    subjectAltName: management-tm.azureml.net matched
*    issuer: C=US; ST=Washington; L=Redmond; O=Microsoft Corporation; OU=Microsoft IT; CN=Microsoft IT SSL SHA2
*    SSL certificate verify ok.
> GET /workspaces/d891e15e356647aab01e1e2fcd65aa9f/webservices/NULL/endpoints HTTP/1.1
Host: management-tm.azureml.net
Authorization: Bearer 4b1faa5269094b71957988e39e7ac5f4
Content-Type: application/json
Accept: application/json

< HTTP/1.1 400 Bad Request
< Content-Length: 177
< Content-Type: application/json; charset=utf-8
< Server: Microsoft-HTTPAPI/2.0
< x-ms-request-duration: 590
< x-ms-request-id: ff1c3bfc-a318-433f-8d20-fa460677491d
< Date: Tue, 22 Sep 2015 09:31:52 GMT
< 
* Connection #0 to host management-tm.azureml.net left intact
Error in getFramework(sprintf(paste(url, "/workspaces/%s/webservices/%s/endpoints",  : 
  WorkspaceNotFoundThe Workspace Id in the request URL is invalid or does not exist. Fix the workspace id and try again.

I know what you're thinking - your workspace id is wrong. I thought so too - but I checked and verified 10 times. See images below:

2015-09-22 11_39_10-start

2015-09-22 11_39_27-settings - microsoft azure machine learning studio

I know my credentials are now exposed - I'll burn this environment after and create a new one.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.