Azure ML samples
These samples are short code examples for using Azure Machine Learning with the R SDK. If you are new to the R SDK, we recommend that you first take a look at the more detailed end-to-end vignettes.
Before running a sample in RStudio, set the working directory to the folder that contains the sample script in RStudio using setwd(dirname) or Session -> Set Working Directory -> To Source File Location. Each vignette assumes that the data and scripts are in the current working directory.
- train-on-amlcompute: Train a model on a remote AmlCompute cluster.
- train-on-local: Train a model locally with Docker.
- deploy-to-aci: Deploy a model as a web service to Azure Container Instances (ACI).
- deploy-to-local: Deploy a model as a web service locally.
Before you run these samples, make sure you have an Azure Machine Learning workspace. You can follow the configuration vignette to set up a workspace. (You do not need to do this if you are running these examples on an Azure Machine Learning compute instance).
Troubleshooting
-
If the following error occurs when submitting an experiment using RStudio:
Error in py_call_impl(callable, dots$args, dots$keywords) : PermissionError: [Errno 13] Permission denied
Move the files for your project into a subdirectory and reset the working directory to that directory before re-submitting.
In order to submit an experiment, the Azure ML SDK must create a .zip file of the project directory to send to the service. However, the SDK does not have permission to write into the .Rproj.user subdirectory that is automatically created during an RStudio session. For this reason, the recommended best practice is to isolate project files into their own directory.