Using MLflow R API in your Virtual Desktop

To use MLflow R API in your Linux Virtual Desktop, you will need to unset the proxy. This will also allow you to perform POST requests to the localhost.

If you encounter any issues unsetting the proxy or running MLflow, then please submit a Service Desk request.

Using the R console

When using R console in the VM, you can unset the proxy by running:

Sys.unsetenv("http_proxy")
Sys.unsetenv("https_proxy")

Using the terminal

Alternatively, if you are using the terminal you can turn off the proxy by running:

export http_proxy=""
export https_proxy=""

Unset the proxy permanently

A more permanent fix is to add the relevant urls (localhost,127.0.0.1) to a variable called no_proxy. This can be set for a user by running:

echo "export no_proxy=localhost,127.0.0.1,$no_proxy" >> ~/.bashrc

However, this needs to be run by each individual user on a VM. This can then be imported into R automatically by running the following command:

echo "no_proxy=Sys.getenv('no_proxy')" | sudo tee -a /etc/R/Renviron.site 

This last command only needs to be run once as the /etc/R/Renviron.site file is shared between all users.

Updated on July 27, 2021

Was this article helpful?

Related Articles

Not the solution you were looking for?
Click the link below to submit a support ticket
CONTACT SERVICE DESK