none
Machine Learning server packages error RRS feed

  • Question


  • Function which we are using:

    TestPackages <- function(data) {
     
      ##################### print executable location ###############################################
     
      print(file.path(R.home("bin"), "R"))
     
      ###############################################################################################
     
      library(readr)
      library(tidyjson)
      library(jsonlite)
      library(stringr)
      library(lubridate)
      library(dplyr)
      library(tidyr)
      #library(gtools)
      library(data.table)
      #library(modeest)
      options(warn = -1)
     
    }  

    ### connecting to remote server
    remoteLogin("http://#############12800",
                username = "#######",
                password = "###############",
                session = FALSE
    )

    ### publishing the function

    api <- publishService(
      "TestPackages",
      code = TestPackages,
      v = "v1.0.3"
    )

    api <- getService("TestPackages", "v1.0.3") ## 17.5
    data = api$TestPackages()
    data$errorMessage
    data$outputParameters


    Error:  Sometimes the packages are getting loaded and sometimes not. I am calling the API continously and facing this issue 2 or 3 times for every 5 calls approximately.

    [1] "Error in base::library(...) : there is no package called 'gtools'\n"
    

    the issue is with multiple packages like tidyr, modeest, etc..

    I have restarted the ML Server, even installed the packages multiple times in location:

    [1] "C:/Program Files/Microsoft/ML Server/R_SERVER/library\"

    [2] \"C:/Program Files/Microsoft/ML Server/R_SERVER/bin/x64/R\"\r\n"


     But still packages not loaded. Could you please help us in what might be the issue.





    Monday, March 25, 2019 8:38 PM

All replies

  • Are you consistently getting the following error every time it fails?

    [1] "Error in base::library(...) : there is no package called 'gtools'\n"

    If yes, you need to uncomment the 'library(gtools)' call in your 'TestPackages()' function.

    If you are getting a different error, what is the error it throws when the script fails?? 

    Tuesday, March 26, 2019 5:28 PM
  • The problem is i am not gettiing this error consistently, like sometime it works and sometimes it doesn't.

    I ran it for 5 times consequently and below are the results:

    Works,does not work, does not work, works,does not work

    Not sure on why some R instances act differently, i am facing this from last thursday onwards before that everything was working fine.

    The problem is not with gtools package, because i am getting the error for other packages as well tidyr, modeest.

    Tuesday, March 26, 2019 9:43 PM