Skip to content

Commit bef922e

Browse files
authored
Update linux-dsvm-walkthrough.md
Fixes a few glitches inside the doc. 1. The instructions to install azureml package was outdated. 2. Undefined variable ws 3. ~/.azureml/settings.json file is needed for workspace initialization.
1 parent d89bbae commit bef922e

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

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

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services: machine-learning
66
ms.service: machine-learning
77
ms.subservice: data-science-vm
88

9-
author: vijetajo
9+
author: vijetaj
1010
ms.author: vijetaj
1111
ms.topic: conceptual
1212
ms.date: 07/16/2018
@@ -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 setting.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)