Slide 1

Slide 1 text

Oracle Machine Learning Office Hours Feature Highlight: OML Services OML Rest API for model deployment and management with Marcos Arancibia, Sherry LaMonica & Mark Hornick Product Management, Oracle Machine Learning oracle.com/machine-learning March 2021

Slide 2

Slide 2 text

The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, timing, and pricing of any features or functionality described for Oracle’s products may change and remains at the sole discretion of Oracle Corporation. Safe harbor statement Copyright © 2021, Oracle and/or its affiliates 2

Slide 3

Slide 3 text

Oracle Machine Learning Key Attributes Automated Get better results faster with less effort – even non-expert users Scalable Handle big data volumes using parallel, distributed algorithms – no data movement Production-ready Deploy and update data science solutions faster with integrated ML platform Increase productivity, Achieve enterprise goals, Innovate more Copyright © 2021, Oracle and/or its affiliates 3

Slide 4

Slide 4 text

Oracle Machine Learning Key Attributes Automated Get better results faster with less effort – even non-expert users Scalable Handle big data volumes using parallel, distributed algorithms – no data movement Production-ready Deploy and update data science solutions faster with integrated ML platform Increase productivity, Achieve enterprise goals, Innovate more Copyright © 2021, Oracle and/or its affiliates 4

Slide 5

Slide 5 text

OML Services extends OML functionality to support model deployment and model lifecycle management for both in-database OML models and third-party Open Neural Networks Exchange (ONNX) machine learning models via REST APIs. The REST API for Oracle Machine Learning Services on Oracle Autonomous Database provides: • Endpoints that enable the storing machine learning models along with its metadata • Creation of scoring endpoints for the registered models. • Support for classification and regression of third-party models in ONNX format, including from packages like Scikit-learn and TensorFlow, among several others. • Proprietary cognitive text capabilities in English, French and Spanish for topic discovery, keywords, summary, sentiment, and feature extraction, based on a Wikipedia knowledge base using Embeddings. • Cognitive image functionality, supported through the ONNX format third-party model deployment feature, with the ability to score using images or tensors. Oracle Machine Learning Services overview Copyright © 2021, Oracle and/or its affiliates 5

Slide 6

Slide 6 text

Components with built-in Oracle Machine Learning Admin • Token using ADB user and password Generic • Metadata for all Versions: Version 1 Metadata • Open API Specification Deployment • Create Model Endpoint • Score Model using Endpoint • Endpoints • Endpoint Details • Open API Specification for Endpoint • Endpoint Repository • Store Model • Update Model Namespace • Models list • Model Info • Model Metadata • Model Content • Model Cognitive Text • Get Most Relevant Topics • Get Most Relevant Keywords • Get Summaries • Get Sentiments • Get Semantic Similarities • Numeric Features • Get Endpoints Oracle Machine Learning Services - Methods GET POST DELETE GET POST DELETE GET POST GET POST Copyright © 2021, Oracle and/or its affiliates 6

Slide 7

Slide 7 text

Standard call for all OML Services endpoints The main REST URL for Oracle Autonomous Database, where the OML Services endpoints exist, looks like the following: omlserver/omlmod/v1/ (for version 1) And to obtain a token to access OML Services you need to request a Token with a valid ADB user and password, from the OML request endpoint at: omlserver/omlusers/tenants/tenant/databases/pdb where: • omlserver = OML Services server for your Autonomous Database, for example: https://adb.us-ashburn-1.oraclecloud.com • tenant = Oracle Cloud Tenancy OCID (not to be confused with the ADB OCID), in the form of: OCID1.TENANCY.OC1..AAAAAAAAFCUE47PQMRF4VIG…… • pdb = Oracle Autonomous Database PDB (or database name), for example: OMLDW Oracle Machine Learning Services – REST endpoints Copyright © 2021, Oracle and/or its affiliates 7

Slide 8

Slide 8 text

Copyright © 2021, Oracle and/or its affiliates 8 Administration Request Token and Get metadata and Open API specifications

Slide 9

Slide 9 text

Initial call to get a Token and be able to access all other OML Services endpoints Request a Token To request a Token for accessing all other OML Services endpoints, you need a valid user and password for your Oracle Autonomous Database that has the proper grants as an OML Developer from the OML Administrator. For the following REST call, we will consider (see previous slide for examples): omlserver/omlusers/tenants/tenant/databases/pdb = ADB_URL $ curl –I \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ –d '{"grant_type":"password", "username": "YourOMLuser", "password": "YourOMLpass"}'\ "ADB_URL/api/oauth2/v1/token" OML Services – Request a Token POST Copyright © 2021, Oracle and/or its affiliates 9

Slide 10

Slide 10 text

Initial call to get a Token and be able to access all other OML Services endpoints Request a Token To request a Token for accessing all other OML Services endpoints, you need a valid user and password for your Oracle Autonomous Database that has the proper grants as an OML Developer from the OML Administrator, usually created by the OMLADMIN OML Services – Request a Token POST Copyright © 2021, Oracle and/or its affiliates 10

Slide 11

Slide 11 text

Call to get the basic Metadata Description for the current OML Services Metadata Description To review the basic description of the metadata for the current REST end points for OML Services, you need to pass a valid Token. 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 GET 'OML_URL' \ --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.....==' OML Services – Metadata Description GET This is the token Copyright © 2021, Oracle and/or its affiliates 11

Slide 12

Slide 12 text

Call to get the basic Metadata Description for the current OML Services Metadata Description Get the basic description of the Metadata for the available End Points from the OML Services REST service OML Services – Metadata Description GET Copyright © 2021, Oracle and/or its affiliates 12

Slide 13

Slide 13 text

Call to get the Open API description for the current OML Services Open API description To review the Open API specification for the OML Services REST end points, you need to pass a valid Token. 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 GET 'OML_URL/api' \ --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.....==' OML Services – Open API description GET This is the token Copyright © 2021, Oracle and/or its affiliates 13

Slide 14

Slide 14 text

Call to get the Open API description for the current OML Services Open API description To review the Open API specification for the OML Services REST end points, you need to pass a valid Token into the following GET request: OML Services – Metadata Description GET Copyright © 2021, Oracle and/or its affiliates 14

Slide 15

Slide 15 text

Copyright © 2021, Oracle and/or its affiliates 15 Store Models OML, ONNX and ONNX Image models

Slide 16

Slide 16 text

Call to store a serialized OML model to the OML Services model repository Store OML model To store a serialized OML model object into the OML Services repository, you need to pass a valid Token, and in the body pass the name, version, modelType='OML', whether is going to be a shared model, the serialized OML model file (usually with a .mod extension), and optionally a namespace for organizing models into groups. The result is a unique model ID. 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/models' \ --header 'Authorization: Bearer eyJhbGciOiJSUzI.... ==' \ --form 'modelName=OML_Insurance_Affinity' \ --form 'modelType=OML' \ --form 'version=1.4' \ --form 'shared=true' \ --form 'modelData=@/Users/MyUser/MyModels/omlModel.mod' \ --form 'namespace=OML_MODELS' OML Services – Repository - Store OML model POST Copyright © 2021, Oracle and/or its affiliates 16

Slide 17

Slide 17 text

Call to store a serialized OML model to the OML Services model repository Store OML model To store a serialized OML model object into the OML Services repository, you need to pass a valid Token, and in the body pass the name, version, modelType='OML', whether is going to be a shared model, the serialized OML model file (usually with a .mod extension), and optionally a namespace for organizing models into groups. The result is a unique model ID. OML Services – Repository - Store OML model POST Copyright © 2021, Oracle and/or its affiliates 17

Slide 18

Slide 18 text

Call to store a third-party ONNX model for classification or regression into OML Services repository Store ONNX model To store third-party ONNX model for classification or regression object into the OML Services repository, you need to pass a valid Token, and in the body pass the name, version, modelType='ONNX', whether is going to be a shared model, the zip file with the ONNX model and metadata, and optionally a namespace for organizing models into groups. The result is a unique model ID. 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/models' \ --header 'Authorization: Bearer eyJhbGciOiJSUzI.... ==' \ --form 'modelName=onnxTitanicModel' \ --form 'version=1.4' \ --form 'modelType=ONNX' \ --form 'shared=true' \ --form 'modelData=@/Users/MyUser/MyONNXModels/sk_cl_pipeline_titanic_onnx.zip' \ --form 'namespace=ONNX_MODELS' OML Services – Repository - Store ONNX model POST Copyright © 2021, Oracle and/or its affiliates 18

Slide 19

Slide 19 text

Call to store a third-party ONNX model for classification or regression into OML Services repository Store ONNX model To store third-party ONNX model for classification or regression object into the OML Services repository, you need to pass a valid Token, and in the body pass the name, version, modelType='ONNX', whether is going to be a shared model, the zip file with the ONNX model and metadata, and optionally a namespace for organizing models into groups. The result is a unique model ID. OML Services – Repository - Store ONNX model POST Copyright © 2021, Oracle and/or its affiliates 19

Slide 20

Slide 20 text

Call to store a third-party ONNX Image model for classification into OML Services repository Store ONNX Image model To store third-party ONNX Image model for classification into the OML Services repository, you need to pass a valid Token, and in the body pass the name, version, modelType='ONNX_IMG', whether is going to be a shared model, the zip file with the ONNX Image model and metadata, and optionally a namespace for organizing models into groups. The result is a unique model ID. 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/models' \ --header 'Authorization: Bearer eyJhbGciOiJSUzI.... ==' \ --form 'modelName=efficientnetlite' \ --form 'version=1.1' \ --form 'modelType=ONNX_IMG' \ --form 'shared=True' \ --form 'modelData=@/Users/MyUser/MyONNX_IMGModels/efficient-lite4.zip' \ --form 'namespace=ONNX_IMG_MODELS' OML Services – Repository - Store ONNX Image model POST Copyright © 2021, Oracle and/or its affiliates 20

Slide 21

Slide 21 text

Call to store a third-party ONNX Image model for classification into OML Services repository Store ONNX Image model To store third-party ONNX Image models for classification into the OML Services repository, you need to pass a valid Token, and in the body pass the name, version, modelType='ONNX_IMG', whether is going to be a shared model, the zip file with the ONNX Image model and metadata, and optionally a namespace for organizing models into groups. The result is a unique model ID. OML Services – Repository - Store ONNX Image model POST Copyright © 2021, Oracle and/or its affiliates 21

Slide 22

Slide 22 text

Copyright © 2021, Oracle and/or its affiliates 22 Register Models and Create REST Endpoints OML, ONNX and ONNX Image models

Slide 23

Slide 23 text

Call to create a Rest Endpoint for an OML model stored in the OML Services repository Create REST endpoint for OML model To create a Rest Endpoint for an OML model object into the OML Services repository, you need to pass a valid Token, and pass as data-raw the "model ID" of an existing OML Model, and the desired "model URI" to host the model. The result is the HTTP Reference for the Model URI. 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/models' \ --header 'Authorization: Bearer eyJhbGciOiJSUzI.... ==' \ --data-raw '{"modelId":"b93af335-bc5b-4f2b-92ef-fd9af5fc933c", \ "uri":"Affinity_Insurance_URI"}' OML Services – Repository – Create Rest Endpoint – OML models POST Copyright © 2021, Oracle and/or its affiliates 23

Slide 24

Slide 24 text

Call to create a Rest Endpoint for an OML model stored in the OML Services repository Create REST endpoint for OML model To create a Rest Endpoint for an OML model object into the OML Services repository, you need to pass a valid Token, and pass as data-raw the "model ID" of an existing OML Model, and the desired "model URI" to host the model. The result is the HTTP Reference for the Model URI. OML Services – Repository – Create REST Endpoint - OML models POST Copyright © 2021, Oracle and/or its affiliates 24

Slide 25

Slide 25 text

Call to create a Rest Endpoint for a third-party ONNX model for classification or regression stored in the OML Services repository Create REST endpoint for third-party ONNX classification or regression model To create a Rest Endpoint for a third-party ONNX classification or regression model that is stored in the OML Services repository, you need to pass a valid Token, and pass as data-raw the "model ID" of an existing ONNX Model, and the desired "model URI" to host the model. The result is the HTTP Reference for the Model URI. 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/models' \ --header 'Authorization: Bearer eyJhbGciOiJSUzI.... ==' \ --data-raw '{"modelId":"9ce5b797-27ea-4121-8fed-eb74f2e92a53", \ "uri":"onnxTitanicModeluri"}' OML Services – Repository – Create REST Endpoint - ONNX models POST Copyright © 2021, Oracle and/or its affiliates 25

Slide 26

Slide 26 text

Call to create a Rest Endpoint for a third-party ONNX model for classification or regression stored in the OML Services repository Create REST endpoint for third-party ONNX classification or regression model To create a Rest Endpoint for a third-party ONNX classification or regression model that is stored in the OML Services repository, you need to pass a valid Token, and pass as data-raw the "model ID" of an existing ONNX Model, and the desired "model URI" to host the model. The result is the HTTP Reference for the Model URI. OML Services – Repository – Create REST Endpoint - ONNX models POST Copyright © 2021, Oracle and/or its affiliates 26

Slide 27

Slide 27 text

Call to create a Rest Endpoint for a third-party ONNX Image model for classification stored in the OML Services repository Create REST endpoint for third-party ONNX Image classification model To create a REST Endpoint for a third-party ONNX Image classification model that is stored in the OML Services repository, you need to pass a valid Token, and pass as data-raw the "model ID" of an existing ONNX Model, and the desired "model URI" to host the model. The result is the HTTP Reference for the Model URI. 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/models' \ --header 'Authorization: Bearer eyJhbGciOiJSUzI.... ==' \ --data-raw '{"modelId":"ae5e12a8-d859-4cdc-9a15-0ff42e3aa78f", \ "uri":"onnxIMGModeluri"}' OML Services – Repository – Create REST Endpoint - ONNX Image models POST Copyright © 2021, Oracle and/or its affiliates 27

Slide 28

Slide 28 text

Call to store a third-party ONNX Image model for classification into the OML Services model repository Create REST endpoint for third-party ONNX Image classification model To create a REST Endpoint for a third-party ONNX Image classification model that is stored in the OML Services repository, you need to pass a valid Token, and pass as data-raw the "model ID" of an existing ONNX Model, and the desired "model URI" to host the model. The result is the HTTP Reference for the Model URI. OML Services – Repository - Store ONNX Image model POST Copyright © 2021, Oracle and/or its affiliates 28

Slide 29

Slide 29 text

Copyright © 2021, Oracle and/or its affiliates 29 List Models OML, ONNX and ONNX Image models

Slide 30

Slide 30 text

Call to list all the Models currently registered in OML Services repository Call the REST endpoint to check all current registered models By passing a valid token to this REST API, OML Services will return a list of all models currently available to the user (and any shared models). These models have not necessarily been deployed as REST Endpoints, but they are stored in the repository. The result is a JSON with a list of the Models with a lot of metadata about the models 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 GET 'OML_URL/models' \ --header 'Authorization: Bearer eyJhbGciOiJSUzI.... ==' OML Services – Repository – List Models registered in OML Services Copyright © 2021, Oracle and/or its affiliates 30 GET

Slide 31

Slide 31 text

Call to list all the Models currently registered in OML Services repository Call the REST endpoint to check all current registered models By passing a valid token to this REST API, OML Services will return a list of all models currently available to the user (and any shared models). These models have not necessarily been deployed as REST Endpoints, but they are stored in the repository. The result is a JSON with a list of the Models with a lot of metadata about the models OML Services – Repository – List Models registered in OML Services Copyright © 2021, Oracle and/or its affiliates 31 GET

Slide 32

Slide 32 text

Call to list all the Scoring Endpoints currently active in OML Services repository Call the REST endpoint to check all current registered scoring endpoints By passing a valid token to this REST API, OML Services will return a list of all scoring endpoints currently available to the user (and any shared models). These models endpoints are the ones currently available for scoring. The result is a JSON with a list of the Scoring Endpoints with a lot of metadata about them and the uri of each model. 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 GET 'OML_URL/deployment' \ --header 'Authorization: Bearer eyJhbGciOiJSUzI.... ==' OML Services – Repository – List Scoring Endpoints in OML Services Copyright © 2021, Oracle and/or its affiliates 32 GET

Slide 33

Slide 33 text

Call to list all the Scoring Endpoints currently active in OML Services repository Call the REST endpoint to check all current registered scoring endpoints By passing a valid token to this REST API, OML Services will return a list of all scoring endpoints currently available to the user (and any shared models). These models endpoints are the ones currently available for scoring. The result is a JSON with a list of the Scoring Endpoints with a lot of metadata about them and the uri of each model OML Services – Repository – List Models registered in OML Services Copyright © 2021, Oracle and/or its affiliates 33 GET

Slide 34

Slide 34 text

Copyright © 2021, Oracle and/or its affiliates 34 Scoring Models OML, ONNX and ONNX Image models

Slide 35

Slide 35 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 } ] }' OML Services – Deployment – Scoring an OML Model in OML Services Copyright © 2021, Oracle and/or its affiliates 35 POST

Slide 36

Slide 36 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). OML Services – Deployment – Scoring an OML Model in OML Services Copyright © 2021, Oracle and/or its affiliates 36 POST

Slide 37

Slide 37 text

Call to score a record of data using an existing Scoring Endpoint uri in OML Services Another example Scoring an OML Model with data in a mini-batch (two records in this example) Another example Scoring an OML Model with data in a mini-batch (two records in this example) & Prediction Details OML Services – Deployment – Scoring an OML Model in OML Services Copyright © 2021, Oracle and/or its affiliates 37 POST

Slide 38

Slide 38 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. The result is a JSON with a the result of the numeric scoring and/or labels and probabilities (in case of classification models). 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/MyONNXModelURI/score' \ --header 'Authorization: Bearer eyJhbGciOiJSUzI.... ==' \ --data-raw'{ "inputRecords":[ { "pclass": [["3"]], "sex": [["male"]], "age": [["NaN"]], "fare": [[22.3583]], "embarked":[["C"]] } ] }' OML Services – Deployment – Scoring an ONNX ML Model in OML Services Copyright © 2021, Oracle and/or its affiliates 38 POST

Slide 39

Slide 39 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. The result is a JSON with a the result of the numeric scoring and/or labels and probabilities (in case of classification models). OML Services – Deployment – Scoring an ONNX ML Model in OML Services Copyright © 2021, Oracle and/or its affiliates 39 POST

Slide 40

Slide 40 text

Call to score a record of data using an existing Scoring Endpoint uri in OML Services Another example Scoring an ONNX Model with data in a mini- batch (two records in this example) OML Services – Deployment – Scoring an ONNX ML Model in OML Services Copyright © 2021, Oracle and/or its affiliates 40 POST

Slide 41

Slide 41 text

Call to score an Image using an existing Scoring Endpoint uri in OML Services Call the REST endpoint to use a scoring endpoint uri to get the prediction on an image By passing a valid token to this REST API, plus passing the actual local image file (or tensors) in the "form" section, OML Services will return the result of the model scoring on the data sent. The result is a JSON with a the result of the labels and probabilities computed by the Image Classification model. 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/MyONNXImageModelURI/score' \ --header 'Authorization: Bearer eyJhbGciOiJSUzI.... ==' \ --form 'imageData=@"/Users/Me/MyPictures/tiger-shark.jpg"' OML Services – Deployment – Scoring an ONNX Image Model in OML Services Copyright © 2021, Oracle and/or its affiliates 41 POST

Slide 42

Slide 42 text

Call to score an Image using an existing Scoring Endpoint uri in OML Services Call the REST endpoint to use a scoring endpoint uri to get the prediction on an image By passing a valid token to this REST API, plus passing the actual local image file (or tensors) in the "form" section, OML Services will return the result of the model scoring on the data sent. The result is a JSON with a the result of the labels and probabilities computed by the Image Classification model. The example on the right uses a Tiger Shark image for scoring. OML Services – Deployment – Scoring an ONNX Image Model in OML Services Copyright © 2021, Oracle and/or its affiliates 42 POST

Slide 43

Slide 43 text

Copyright © 2021, Oracle and/or its affiliates 44 Cognitive Text Using OML Services and the built-in Cognitive Text Wikipedia model Keywords, summary, similarity and features available in English, French and Spanish Sentiment analysis available in English

Slide 44

Slide 44 text

Call to score a Text using one of the pre-existing uri for Cognitive Text in OML Services Call the REST endpoint to use a scoring endpoint uri to access the Cognitive Text functions By passing a valid token to this REST API, plus passing the desired text in the "data-raw" section, OML Services will return keywords/summary/sentiment/similarity/features related to the text. You would reques the number of items to be returned by passing the "topN" option in the data-raw section. The result is a JSON with a the resulting keywords/summary/sentiment/similarity/features computed by OML Services using the built-in Wikipedia embeddings model. 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/cognitive-text/topics' \ --header 'Authorization: Bearer eyJhbGciOiJSUzI.... ==' \ --data-raw '{ "topN":5, "textList":["With Oracle Machine Learning, Oracle moves the algorithms to the data. \ Oracle runs machine learning within the database, where the data reside. \ This approach minimizes or eliminates data movement, achieves scalability, \ preserves data security, and accelerates time-to-model deployment. "] \ }' OML Services – Cognitive Text – Functions available in OML Services Copyright © 2021, Oracle and/or its affiliates 45 POST

Slide 45

Slide 45 text

Call to score a Text using one of the pre-existing uri for Cognitive Text in OML Services Call the REST endpoint to use a scoring endpoint uri to access the Cognitive Text functions By passing a valid token to this REST API, plus passing the desired text in the "data- raw" section, OML Services will return keywords/summary/sentiment/similarity/f eatures related to the text. You would reques the number of items to be returned by passing the "topN" option in the data- raw section. The result is a JSON with a the resulting keywords/summary/sentiment/similarity/f eatures computed by OML Services using the built-in Wikipedia embeddings model. OML Services – Cognitive Text – Functions available in OML Services Copyright © 2021, Oracle and/or its affiliates 46 POST

Slide 46

Slide 46 text

Call to score a Text using one of the pre-existing uri for Cognitive Text in OML Services Another example Keywords in French Another example Keywords in Spanish OML Services – Cognitive Text – Functions available in OML Services Copyright © 2021, Oracle and/or its affiliates 47 POST

Slide 47

Slide 47 text

Call to score a Text using one of the pre-existing uri for Cognitive Text in OML Services Another example Similarity in English Another example Summary in English OML Services – Cognitive Text – Functions available in OML Services Copyright © 2021, Oracle and/or its affiliates 48 POST

Slide 48

Slide 48 text

Call to score a Text using one of the pre-existing uri for Cognitive Text in OML Services Another example Sentiment in English Another example Features in English (mapping of 2,000+ weights) OML Services – Cognitive Text – Functions available in OML Services Copyright © 2021, Oracle and/or its affiliates 49 POST

Slide 49

Slide 49 text

Copyright © 2021, Oracle and/or its affiliates 50 Deploying models with OML AutoML UI Using OML AutoML UI to deploy models to OML Services

Slide 50

Slide 50 text

No content

Slide 51

Slide 51 text

For more information on OML Services Copyright © 2021, Oracle and/or its affiliates 52 Pre-General Availability Draft Documentation available at: https://docs.oracle.com/en/cloud/paas/autonomous-data-warehouse-cloud/omlss/index.html

Slide 52

Slide 52 text

On our GitHub, you can find: Copyright © 2021, Oracle and/or its affiliates 53 github.com/oracle/oracle-db-examples/tree/master/machine-learning • Example Notebooks in OML4SQL and OML4Python • SQL code examples for DB 18c, 19c and 21c • Labs folder with OML4Py HOL Labs • OML Services demos including Cognitive Text Demos, in PostMan collections

Slide 53

Slide 53 text

For more information about Oracle Machine Learning in general oracle.com/machine-learning Copyright © 2021, Oracle and/or its affiliates 54

Slide 54

Slide 54 text

Q & A Copyright © 2021, Oracle and/or its affiliates 55

Slide 55

Slide 55 text

Thank You Product Management Oracle Machine Learning