question

AdrianAnticoTEKsystemsInc-1526 avatar image
0 Votes"
AdrianAnticoTEKsystemsInc-1526 asked AdrianAnticoTEKsystemsInc-1526 commented

Using Azure ML Studio Designer with R script: package not found but I installed it on the compute instance

I created a compute instance and then I installed all the necessary R packages to execute a few scripts. The scripts run without issue when I'm inside an RStudio instance on that compute instance. However, when I try to have those scripts run through the Designer service using the same compute instance, R no longer recognizes the packages as being installed. Is there a way for Designer to recognize the installed R packages without resorting to using a Docker image, or the zip file method from the stackoverflow question linked below?

https://stackoverflow.com/questions/40632047/azure-ml-studio-cannot-load-a-installed-package-in-r

azure-machine-learning
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@AdrianAnticoTEKsystemsInc-1526 Based on my experience this scenario is still not possible with the new designer. The guidance is to still use install.packages() in the module script.
I am also checking internally to find out if there is a possible way to achieve this.


1 Vote 1 ·

@romungi-MSFT

Found a workaround that gets me past the previous hurdle. If I use install.packages as such, I can install github packages:

install.packages("https://github.com/AdrianAntico/RemixAutoML/archive/refs/tags/V0.5.9.tar.gz", repos = NULL, type = "source", INSTALL_opts = c("--no-multiarch", "--no-test-load"))


1 Vote 1 ·

@romungi-MSFT

Thanks! Running install.packages() within the script is much easier than collecting package binaries and zipping them up. I was able to get it running I just needed to add in "options(repos = c(CRAN = "https://cran.rstudio.com"))" so install.packages() new where to look for packages (cran mirror). I also included the same command line installs as I did with the script although I'm not sure if I needed to.

Install Dependencies

system("sudo apt-get update")

Run in terminal

system("sudo apt-get upgrade -y")

Needed for 'curl' to install devtools and forecast packages

system("sudo apt-get install libcurl4-openssl-dev --fix-broken")

I'm not sure who is in charge of documentation for Azure Machine Learning services but I'd be happy to share what I've setup to help others who are looking to do something similar. It wasn't an easy process to figure out and having some real world examples could make life a lot easier for other users.

0 Votes 0 ·

@romungi-MSFT

It looks like I'm running into trouble when attempting to install a github package via devtools::install_github()

Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
namespace ‘ellipsis’ 0.3.0 is already loaded, but >= 0.3.1 is required

In the R script I tried to remove.packages("ellipsis") and then install.packages("ellipsis") but I keep getting the same error.

Do you know a workaround for installing github packages?

0 Votes 0 ·

0 Answers