Slide 53
Slide 53 text
Call to score a record of data using an existing Scoring Endpoint uri in OML Services
Call the REST endpoint to use a scoring endpoint uri to get the prediction on data
By passing a valid token to this REST API, plus passing the data columns in the "data-raw" section, OML
Services will return the result of the model scoring on the data sent. Multiple records can be sent in a Mini-
batch as well. Additionally, for OML Models, you can also request the Prediction Details to be returned using
the "topNdetails" optional setting.
The result is a JSON with a the result of the numeric scoring and/or labels and probabilities (in case of
classification models), plus any additional information requested, like the Prediction Details (optional).
For the following REST call, we will consider:
omlserver/omlmod/v1 = OML_URL , and remember to provide the full Token after "Bearer"
$ curl --location --request POST 'OML_URL/deployment/MyOMLModelURI/score' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI.... ==' \
--data-raw '{"topNdetails":5, \
"inputRecords": [
[ {"AGE":41, "BOOKKEEPING_APPLICATION": 1, "CUST_GENDER":"M", "CUST_MARITAL_STATUS":"NeverM", \
"EDUCATION":"HS-grad", "HOME_THEATER_PACKAGE":1, "HOUSEHOLD_SIZE":"4", "OCCUPATION":"Crafts", \
"YRS_RESIDENCE":6, "Y_BOX_GAMES":1 } ]
}'
3.13 OML Services – Deployment – Scoring an OML Model in OML Services
Copyright © 2021, Oracle and/or its affiliates
53
POST