Slide 1

Slide 1 text

OML feature highlight: Deploy a Python XGBoost Model using OML Services OML Office Hours Sherry LaMonica Principal Member of Technical Staff, Oracle Machine Learning Supported by Marcos Arancibia and Mark Hornick Product Management, Oracle Machine Learning Move the Algorithms; Not the Data! Copyright © 2021, Oracle and/or its affiliates. This Session will be Recorded

Slide 2

Slide 2 text

• Motivation • Overview of OML Services • Overview of ONNX • Demo • Train a Python XGBoost model • Materialize the model to ONNX format • Deploy the ONNX model using OML Services on Autonomous Database • Q&A Topics for today Copyright © 2021, Oracle and/or its affiliates 2

Slide 3

Slide 3 text

Motivation 3 Copyright © 2021, Oracle and/or its affiliates

Slide 4

Slide 4 text

• Simplifies the task of putting models into production • Algorithm not available in-database • Very fast scoring • Cost effective • Requirement to separate development and deployment environments, for example, web applications • OML Services contains ONNX support for classification and regression models Motivation 4 Why deploy an ONNX model using OML Services? Copyright © 2021, Oracle and/or its affiliates.

Slide 5

Slide 5 text

OML Services 5 Copyright © 2021, Oracle and/or its affiliates

Slide 6

Slide 6 text

Oracle Machine Learning OML4SQL OML Notebooks OML4R Oracle Data Miner OML4Py OML4Spark OML AutoML UI OML Services Interfaces for 3 popular data science languages: SQL, R, and Python Collaborative notebook environment based on Apache Zeppelin with Autonomous Database SQL Developer extension to create, schedule, and deploy ML solutions through a drag-and-drop interface ML for the big data environment from R with scalable algorithms Code-free AutoML interface on Autonomous Database Model Deployment and Management, Cognitive Text 6 Copyright © 2021, Oracle and/or its affiliates

Slide 7

Slide 7 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 7 Copyright © 2021, Oracle and/or its affiliates

Slide 8

Slide 8 text

Oracle Machine Learning Services architecture Connectivity and use from Client REST Client user/pass Token + Actions & T ext/Objects GET POST DELETE Oracle Autonomous Database GET Token 8 Copyright © 2021, Oracle and/or its affiliates /omlusers PDB /omlmod OM L Services

Slide 9

Slide 9 text

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

Slide 10

Slide 10 text

ONNX 10 Copyright © 2021, Oracle and/or its affiliates

Slide 11

Slide 11 text

ONNX is an open standard format for representing and storing machine learning models. It is the basis of an open ecosystem with interchangeable ML models. Benefits include: • Promoting interoperability, portability, and efficiency • Integration into different machine learning frameworks and tools - XGBoost, SciKit-Learn, PyTorch, TensorFlow, and others • ONNX models run on a variety of ONNX compliant tools and frameworks for scoring 11 Copyright © 2021, Oracle and/or its affiliates ONNX

Slide 12

Slide 12 text

ONNX Copyright © 2021, Oracle and/or its affiliates 12 Oracle Machine Learning Services Other Frameworks and Devices Train Export Deploy

Slide 13

Slide 13 text

Architecture Copyright © 2020, Oracle and/or its affiliates | Confidential: Internal/Restricted/Highly Restricted 13 On an external Python engine, build XGBoost model and export in ONNX format Deploy Oracle Machine Learning Services Oracle Autonomous Database

Slide 14

Slide 14 text

Python dependencies on external Python engine Package requirements Copyright © 2021, Oracle and/or its affiliates 14 $ pip install onnx $ pip install onnxmltools The model is represented in ONNX format and can be deployed to OML Services Export the model to ONNX format using ONNXMLtools Train a model using XGBoost in Python $ pip install xgboost XGBoost ONNXMLtools ONNX

Slide 15

Slide 15 text

Demo 15 Copyright © 2021, Oracle and/or its affiliates

Slide 16

Slide 16 text

Where to go from here? 105 Copyright © 2021, Oracle and/or its affiliates

Slide 17

Slide 17 text

Helpful Links 17 ORACLE MACHINE LEARNING ON O.COM https://www.oracle.com/machine-learning OML TUTORIALS OML LiveLab: https://apexapps.oracle.com/pls/apex/dbpm/r/livelabs/view-workshop?p180_id=560 OML4Py LiveLab: https://apexapps.oracle.com/pls/apex/dbpm/r/livelabs/view-workshop?wid=786 Interactive tour: https://docs.oracle.com/en/cloud/paas/autonomous-database/oml-tour OML OFFICE HOURS https://asktom.oracle.com/pls/apex/asktom.search?office=6801#sessionss ORACLE ANALYTICS CLOUD https://www.oracle.com/solutions/business-analytics/data-visualization/examples.html OML4PY ORACLE AUTOML UI OML SERVICES Oracle Machine Learning AutoML UI (2m video) Oracle Machine Learning Demonstration (6m video) OML AutoML UI Technical Brief Blog: Introducing Oracle Machine Learning AutoML UI Oracle Machine Learning Services (2m video) OML Services Technical Brief Oracle Machine Learning Services Documentation Blog: Introducing Oracle Machine Learning Services GitHub Repository with OML Services examples OML4Py (2m video) OML4Py Introduction (17m video) OML4Py Technical Brief OML4Py User’s Guide Blog: Introducing OML4Py GitHub Repository with Python notebooks

Slide 18

Slide 18 text

On our GitHub, you can find: Copyright © 2021, Oracle and/or its affiliates 18 https://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 ONNX and Cognitive Text Demos, in PostMan collections

Slide 19

Slide 19 text

Info page: https://github.com/onnx/sigs/tree/master/models-tutorials The ONNX Model Zoo is a collection of pre-trained models in the ONNX format contributed by community members. Accompanying each model are Jupyter notebooks for model training and running inference with the trained model.

Slide 20

Slide 20 text

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

Slide 21

Slide 21 text

Thank you [email protected] Copyright © 2021, Oracle and/or its affiliates. 21