LibraryExecutionError - testing a web service published via Rstudio RRS feed

  • Question

    • I built model in Rstudio, published in Azure ML Studio a web service using "AzureML" R package. When testing the web service, encountered an error:

    Error: AzureML returns error code:
    HTTP status code : 400
    AzureML error code : LibraryExecutionError

    Module execution encountered an internal library error.
    The following error occurred during evaluation of R script: R_tryEval: return error: Error: bad restore file magic number (file may be corrupted) -- no data loaded

    • Do you have any insights on how to solve such issue? Am I missing some important code in the R script?

    • The model I used was a RandomForest to predicted Species on Iris dataset

    # Iris dataset

    df = iris

    index = createDataPartition(df$Species, p = 0.7, list = FALSE)
    ML.train = df[index,]; 
    ML.test = df[-index,];  rm(index)

    model = randomForest::randomForest(Species ~., data = ML.train)

    mypredict = function(newdata) {
    predict(model, newdata, type = "response")

    # Create workspace

    wsObj = AzureML::workspace(id = "my Id", = "my token")  # I omitted my Id and my token values

    # Publishing



    api = AzureML::publishWebService(ws = wsObj,
    fun = mypredict,
    name = "IrisWebService",
    inputSchema = ML.test %>% select(-Species) )

    Wednesday, November 27, 2019 10:59 AM


All replies

  • Hello Colin,

    AzureML for RStudio is now not supported as the package is removed from CRAN repository from 2019-07-29.

    If you are using older versions of AzureML package then the following steps to publish a web service might be supported.


    Friday, November 29, 2019 8:54 AM
  • Hi Rohit, thanks for your reply and for confirming that AzureML for RStudio is now not supported.

    I went to the link you suggested. It is dated from Sep 2015, when AzureML package version was 0.1.1 This version is not possible to install anymore in Rstudio

    Can you confirm which Rstudio package has replaced AzureML?

    Thanks in advance, Colin

    Friday, November 29, 2019 11:03 AM
  • Hi Colin,

    Azure ML now supports azuremlsdk for Azure ML workspace. For Azure ML studio this package will not work as the studio package(AzureML) is now removed. 


    Monday, December 2, 2019 6:32 AM