← Back to list

AutoML in Oracle Autonomous Datawarehouse 23ai

AutoML on ADW has been available since earlier releases. Oracle Database 23ai, the next long-term support release, introduces over 300 new…

Francis John Picaso · 2024-10-03 12:55 · 1 claps · 3.4 min read
#python #adw #automl #flask #tailwind-css
Open on Medium ↗
Wiki topics: AGT · AI Agents 🌐 · Web Development

AutoML in Oracle Autonomous Datawarehouse 23ai

AutoML on ADW has been available since earlier releases. Oracle Database 23ai, the next long-term support release, introduces over 300 new features, with a strong emphasis on artificial intelligence (AI) and developer productivity.

Learn more.

AutoML User Interface (AutoML UI) provides a no-code, automated machine learning interface. It enables business users without a data science background to easily create and deploy machine learning models.

Learn more.

Let me quickly demonstrate how to run AutoML on an Autonomous Data Warehouse in OCI.

Getting Started with AutoML on ADW

  1. Accessing Oracle Machine Learning: From your ADW instance, navigate to Database Actions and select Oracle Machine Learning. Log in using your Oracle Machine Learning (OML) user credentials.

Creating an Experiment

Set up the experiment: Define your data source — this could be a table in your schema. Then, specify the column that will act as the label (the target variable). In this example, I’m using binary classification (predicting 1 for a win and 0 for a loss).

Configure settings: Adjust settings like the number of top models and the evaluation metrics that will help determine the best model.

Select algorithms and features: Choose the algorithms and input features for your experiment.

Run the experiment: Save the experiment and begin the run. You can opt for a quick result or a more accurate result (which takes longer). The various steps of the experiment will be shown on the right.

Review results: After the experiment completes, you’ll see the top-performing models and their metrics. Feature importance is also highlighted, helping optimize feature selection.

Deploy your model: Choose a model from the top-performing options and deploy it as a REST API, making it accessible for application integration.

Check the model attributes: Navigate to Models and select your deployed model. Ensure that when calling the model’s endpoint, you pass values with the correct data types.

Obtaining API URLs and Tokens

This step can be tricky. You’ll need two URLs:

OAuth 2.0 Token URL: Used to authenticate API requests.

  • Format: https://<your-adw-instance>.adb.us-phoenix-1.oraclecloudapps.com/omlusers/api/oauth2/v1/token

Prediction URL: Used for scoring (predictions).

  • Format: https://<your-adw-instance>.adb.us-phoenix-1.oraclecloudapps.com/omlmod/v1/deployment/<your-uri-base>/score

You can find these URLs under Oracle Machine Learning RESTful Services in Database Actions.

Getting the Token

You can obtain an OAuth token by running a cURL command or using Python’s requests library.

Using cURL:

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' \
-d '{"grant_type":"password", "username":"'${username}'", "password":"'${password}'"}' \
"<oml-cloud-service-location-url>/omlusers/api/oauth2/v1/token"

Using Python:

def get_token():
    # Obtain a token
    response = requests.post(TOKEN_URL, json={
        "grant_type": "password",
        "username": "<user>",
        "password": "<password>"
    })

    if response.status_code == 200:
        return response.json()["accessToken"]
    return None

Performing Predictions

Once you have the token, you can perform predictions using the deployed model.

Using cURL:

curl --location "https://<your-adw-instance>.adb.us-phoenix-1.oraclecloudapps.com/omlmod/v1/deployment/<your-uri>/score" \
--header "Authorization: Bearer <token>" \
--header "Content-Type: application/json" \
--data '{
    "inputRecords": [
        {
            "HOME_GAME": 0,
            "TEAM_RESTDAYS": 2,
            "ALLOWED_TWO_POINT_PERCENTAGE": 0.495555556,
            "ALLOWED_THREE_POINT_PERCENTAGE": 0.38277512,
            "ALLOWED_POINTS": 107.4615385,
            ...
        }
    ]
}'

Using Python:

def predict(data):
    token = get_token()
    if token:
        headers = {
            "Authorization": f"Bearer {token}",
            "Content-Type": "application/json"
        }
        response = requests.post(PREDICT_URL, headers=headers, json={"inputRecords": [data]})
        return response.json()
    return None

Sample Flask Implementation

Here’s a sample implementation that consumes the model through a basic Flask application. This app uses Tailwind CSS for styling.

After clicking Submit

Check out the code here.


메타데이터
post_id
2da416ef795f
slug
automl-in-oracle-autonomous-datawarehouse-23ai-2da416ef795f
url
https://medium.com/@francisjohnpicaso/automl-in-oracle-autonomous-datawarehouse-23ai-2da416ef795f
canonical_url
https://medium.com/@francisjohnpicaso/automl-in-oracle-autonomous-datawarehouse-23ai-2da416ef795f
author_url
https://medium.com/@francisjohnpicaso
status
ok
fetched_at
2026-06-11 05:11:55