You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/machine-learning/how-to-consume-web-service.md
+57-57Lines changed: 57 additions & 57 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ The [azureml.core.Webservice](https://docs.microsoft.com/python/api/azureml-core
42
42
*`auth_enabled` - If key authentication is enabled, `True`; otherwise, `False`.
43
43
*`token_auth_enabled` - If token authentication is enabled, `True`; otherwise, `False`.
44
44
*`scoring_uri` - The REST API address.
45
-
*`swagger_uri` - The address of the OpenAPI specification. This URI is available if you enabled automatic schema generation. For more information, see [Deploy models with Azure Machine Learning](how-to-deploy-and-where.md#schema).
45
+
*`swagger_uri` - The address of the OpenAPI specification. This URI is available if you enabled automatic schema generation. For more information, see [Deploy models with Azure Machine Learning](how-to-deploy-and-where.md#optional-define-model-web-service-schema).
46
46
47
47
There are a three ways to retrieve this information for deployed web services:
48
48
@@ -274,47 +274,47 @@ This example demonstrates how to use Go to call the web service created from the
274
274
package main
275
275
276
276
import (
277
-
"bytes"
278
-
"encoding/json"
279
-
"fmt"
280
-
"io/ioutil"
281
-
"net/http"
277
+
"bytes"
278
+
"encoding/json"
279
+
"fmt"
280
+
"io/ioutil"
281
+
"net/http"
282
282
)
283
283
284
284
// Features for this model are an array of decimal values
285
285
type Features []float64
286
286
287
287
// The web service input can accept multiple sets of values for scoring
288
288
type InputData struct {
289
-
Data []Features `json:"data",omitempty`
289
+
Data []Features `json:"data",omitempty`
290
290
}
291
291
292
292
// Define some example data
293
293
var exampleData= []Features{
294
-
[]float64{
295
-
0.0199132141783263,
296
-
0.0506801187398187,
297
-
0.104808689473925,
298
-
0.0700725447072635,
299
-
-0.0359677812752396,
300
-
-0.0266789028311707,
301
-
-0.0249926566315915,
302
-
-0.00259226199818282,
303
-
0.00371173823343597,
304
-
0.0403433716478807,
305
-
},
306
-
[]float64{
307
-
-0.0127796318808497,
308
-
-0.044641636506989,
309
-
0.0606183944448076,
310
-
0.0528581912385822,
311
-
0.0479653430750293,
312
-
0.0293746718291555,
313
-
-0.0176293810234174,
314
-
0.0343088588777263,
315
-
0.0702112981933102,
316
-
0.00720651632920303,
317
-
},
294
+
[]float64{
295
+
0.0199132141783263,
296
+
0.0506801187398187,
297
+
0.104808689473925,
298
+
0.0700725447072635,
299
+
-0.0359677812752396,
300
+
-0.0266789028311707,
301
+
-0.0249926566315915,
302
+
-0.00259226199818282,
303
+
0.00371173823343597,
304
+
0.0403433716478807,
305
+
},
306
+
[]float64{
307
+
-0.0127796318808497,
308
+
-0.044641636506989,
309
+
0.0606183944448076,
310
+
0.0528581912385822,
311
+
0.0479653430750293,
312
+
0.0293746718291555,
313
+
-0.0176293810234174,
314
+
0.0343088588777263,
315
+
0.0702112981933102,
316
+
0.00720651632920303,
317
+
},
318
318
}
319
319
320
320
// Set to the URIfor your service
@@ -323,32 +323,32 @@ var serviceUri string = "<your web service URI>"
323
323
var authKey string="<your key or token>"
324
324
325
325
func main() {
326
-
// Create the input data from example data
327
-
jsonData := InputData{
328
-
Data: exampleData,
329
-
}
330
-
// Create JSONfrom it and create the body for the HTTP request
Copy file name to clipboardExpand all lines: articles/stream-analytics/machine-learning-udf.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@ The following table describes each property of Azure ML Service functions in Str
53
53
54
54
## Supported input parameters
55
55
56
-
When your Stream Analytics query invokes an Azure Machine Learning UDF, the job creates a JSON serialized request to the web service. The request is based on a model-specific schema. You have to provide a sample input and output in your scoring script to [automatically generate a schema](../machine-learning/how-to-deploy-and-where.md#optional-automatic-schema-generation). The schema allows Stream Analytics to construct the JSON serialized request for any of the supported data types such as numpy, pandas and PySpark. Multiple input events can be batched together in a single request.
56
+
When your Stream Analytics query invokes an Azure Machine Learning UDF, the job creates a JSON serialized request to the web service. The request is based on a model-specific schema. You have to provide a sample input and output in your scoring script to [automatically generate a schema](../machine-learning/how-to-deploy-and-where.md#optional-define-model-web-service-schema). The schema allows Stream Analytics to construct the JSON serialized request for any of the supported data types such as numpy, pandas and PySpark. Multiple input events can be batched together in a single request.
57
57
58
58
The following Stream Analytics query is an example of how to invoke an Azure Machine Learning UDF:
0 commit comments