Skip to content

Commit dd114c9

Browse files
authored
Merge pull request #49009 from penggu/patch-1
Update linux-dsvm-walkthrough.md
2 parents 87624a5 + 08ba32b commit dd114c9

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

articles/machine-learning/data-science-virtual-machine/linux-dsvm-walkthrough.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,8 @@ To deploy the decision tree code from the preceding section, sign in to Azure Ma
184184
![The Azure Machine Learning Studio (classic) primary authorization token](./media/linux-dsvm-walkthrough/workspace-token.png)
185185
1. Load the **AzureML** package, and then set values of the variables with your token and workspace ID in your R session on the DSVM:
186186

187+
if(!require("devtools")) install.packages("devtools")
188+
devtools::install_github("RevolutionAnalytics/AzureML")
187189
if(!require("AzureML")) install.packages("AzureML")
188190
require(AzureML)
189191
wsAuth = "<authorization-token>"
@@ -203,9 +205,23 @@ To deploy the decision tree code from the preceding section, sign in to Azure Ma
203205
return(colnames(predictDF)[apply(predictDF, 1, which.max)])
204206
}
205207

208+
1. Create a settings.json file for this workspace:
209+
210+
vim ~/.azureml/settings.json
211+
212+
1. Make sure the following contents are put inside settings.json:
213+
214+
{"workspace":{
215+
"id": "<workspace-id>",
216+
"authorization_token": "<authorization-token>",
217+
"api_endpoint": "https://studioapi.azureml.net",
218+
"management_endpoint": "https://management.azureml.net"
219+
}
220+
206221

207222
1. Publish the **predictSpam** function to AzureML by using the **publishWebService** function:
208223

224+
ws <- workspace()
209225
spamWebService <- publishWebService(ws, fun = predictSpam, name="spamWebService", inputSchema = smallTrainSet, data.frame=TRUE)
210226

211227
1. This function takes the **predictSpam** function, creates a web service named **spamWebService** that has defined inputs and outputs, and then returns information about the new endpoint.

0 commit comments

Comments
 (0)