Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Oracle Machine Learning feature highlight: OML Services

Oracle Machine Learning feature highlight: OML Services

A new feature of Oracle Machine Learning on Autonomous Database is the Oracle Machine Learning Services.

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 provides REST API endpoints hosted on Oracle Autonomous Database. These endpoints enable the storage of machine learning models along with its metadata, and the creation of scoring endpoints for the model.

These third-party classification or regression models can be built using tools that support the ONNX format, which includes packages like Scikit-learn and TensorFlow, among several others.

In addition, OML Services supports proprietary cognitive text capabilities, with capabilities for topic discovery, keywords, summary, sentiment, and feature extraction. The initial languages supported include English, Spanish, and French (based on a Wikipedia knowledgebase using embeddings).

OML Services cognitive image functionality, supported through the ONNX format third-party model deployment feature, supports scoring using images or tensors.

9e699c26463e7da4cbc8a5313cf55da3?s=128

Marcos Arancibia

March 11, 2021
Tweet

Transcript

  1. 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
  2. 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
  3. 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
  4. 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
  5. 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
  6. 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
  7. 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
  8. Copyright © 2021, Oracle and/or its affiliates 8 Administration Request

    Token and Get metadata and Open API specifications
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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
  15. Copyright © 2021, Oracle and/or its affiliates 15 Store Models

    OML, ONNX and ONNX Image models
  16. 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
  17. 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
  18. 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
  19. 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
  20. 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
  21. 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
  22. Copyright © 2021, Oracle and/or its affiliates 22 Register Models

    and Create REST Endpoints OML, ONNX and ONNX Image models
  23. 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
  24. 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
  25. 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
  26. 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
  27. 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
  28. 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
  29. Copyright © 2021, Oracle and/or its affiliates 29 List Models

    OML, ONNX and ONNX Image models
  30. 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
  31. 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
  32. 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
  33. 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
  34. Copyright © 2021, Oracle and/or its affiliates 34 Scoring Models

    OML, ONNX and ONNX Image models
  35. 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
  36. 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
  37. 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
  38. 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
  39. 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
  40. 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
  41. 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
  42. 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
  43. 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
  44. 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
  45. 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
  46. 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
  47. 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
  48. 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
  49. Copyright © 2021, Oracle and/or its affiliates 50 Deploying models

    with OML AutoML UI Using OML AutoML UI to deploy models to OML Services
  50. None
  51. 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
  52. 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
  53. For more information about Oracle Machine Learning in general oracle.com/machine-learning

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

    55
  55. Thank You Product Management Oracle Machine Learning