Thursday, 17 September 2026

Oracle Autonomous Database Select AI Question and Answer

What is role and responsibility for AI cloud data engineer An OCI AI Cloud Data
 Engineer builds scalable data architectures, pipelines, and vector-ready storage on Oracle Cloud Infrastructure to power enterprise AI, Generative AI (GenAI), and machine learning workloads

Core Responsibilities
  • Data Pipeline & ETL Engineering: Build extract, transform, load, and serverless data pipelines using OCI Data Integration, OCI Dataflow (Spark), and Python/Scala. [
  • AI-Enabling & Vector Data: Prepare vector embeddings, manage vector data types in Oracle Autonomous Database, and build retrieval-augmented generation (RAG) data flows. [
  • Data Lakehouse Management: Structure raw and processed data across OCI Object Storage, data lakes, and data warehouses (Autonomous Data Warehouse - ADW). [
  • AI/ML & MLOps Support: Configure and manage OCI Data Science environments, feature stores, model catalogs, and automated training/inference pipelines. 
  • Enterprise Integration: Connect OCI data services with enterprise apps like Oracle ERP, SCM, HCM, and external sources. 
  • Data Governance & Security: Enforce data lineage, metadata management, PII/PHI redaction, and access control policies. 
  • Performance & Cost Optimization: Tune query execution, indexing, partition strategies, and cluster scaling. [

Essential OCI Tech Stack
CategoryOCI / Core ToolsOpen-Source / Standard Alternative
Storage / LakehouseOCI Object Storage, ADWAWS S3, Snowflake
ETL / Big DataOCI Data Integration, OCI DataflowApache Airflow, Spark
Real-Time / StreamingOCI StreamingApache Kafka
AI / ML PlatformOCI Data Science, OCI GenAI ServiceVertex AI, Databricks
Infrastructure / IaCOCI Resource ManagerTerraform

Required Skills
  • Languages: Python, SQL, Shell scripting, Scala/Java (optional).
  • AI/GenAI Concepts: Embeddings, vector search, RAG, Model Context Protocol (MCP), LLM data preparation.
  • Cloud Architecture: OCI IAM, networking, storage lifecycle policies, monitoring/observability.
  • Collaboration: Cross-functional work with data scientists, DBAs, and ML engineers.
Question : What is Oracle Autonomous Database Select AI
Oracle Autonomous Database Select AI is a built-in feature that enables users to run Natural Language to SQL (NL2SQL) queries against enterprise data. It acts as a bridge between Large Language Models (LLMs) and the database engine by sending schema metadata (tables, columns, and constraints) to an external or internal LLM to generate syntactically accurate SQL, which is then securely executed inside the database.
Q1: How does Select AI handle data privacy? Does it send corporate data to public LLMs like OpenAI?
Answer: No, it does not send actual data. Select AI only transmits database schema metadata (table names, column names, comments, and data types) to the LLM to generate the SQL query. Once the LLM sends back the raw SQL, that statement is executed locally and privately within the Oracle Autonomous Database, ensuring sensitive data never leaves your secure boundary.
Q2: What are the primary "Actions" supported by the SELECT AI keyword, and how do they differ?
Answer: There are four core parameters used to define the behavior of the keyword:
  • runsql (Default): Translates the natural language prompt into SQL, runs it against the database, and returns the tabular result dataset.
  • showsql: Only returns the translated SQL statement string for debugging or verification; it does not execute it.
  • narrate: Runs the generated SQL query and passes the raw dataset results back to the LLM to generate a natural, conversational textual summary.
  • chat: Acts as a direct pass-through to the LLM for general prompts completely unrelated to database schema querying.
Q3: How do you configure Select AI to understand company-specific abbreviations or custom logic?
Answer: You configure this using AI Profiles through the DBMS_CLOUD_AI package. To capture business-specific nuances (e.g., teaching the model that "active customer" translates to STATUS = 'A'), developers utilize table/column database comments or supply declarative metadata rules within the AI profile definition to guide the LLM's context.

2. Implementation Example & Test Cases
Setup and Profile Configuration
Before writing a natural language query, you must build an AI profile tied to a secure credential.
sql
-- Step 1: Set up Network ACL to the AI Provider (Executed as ADMIN)
BEGIN
  DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE(
    host => 'api.openai.com',
    ace  => xs$ace_type(privilege_list => xs$name_list('http'),
                        principal_name => 'SALES_USER',
                        principal_type => xs_acl.ptype_db)
  );
END;
/

-- Step 2: Create a secure credential for the LLM API provider
BEGIN
  DBMS_CLOUD.CREATE_CREDENTIAL(
    credential_name => 'OPENAI_CRED',
    username        => 'OPENAI',
    password        => 'sk-proj-xxxxxxYOUR-API-KEY-xxxxxx'
  );
END;
/

-- Step 3: Initialize the AI Profile for target tables
BEGIN
  DBMS_CLOUD_AI.CREATE_PROFILE(
    profile_name => 'SALES_GPT_PROFILE',
    attributes   => '{"provider": "openai",
                      "model": "gpt-4o",
                      "credential_name": "OPENAI_CRED",
                      "object_list": [{"owner": "SALES_USER", "name": "CUSTOMERS"},
                                      {"owner": "SALES_USER", "name": "ORDERS"}]}'
  );
END;
/

-- Step 4: Enable the profile for the current session
ALTER SESSION SET AI_PROFILE_NAME = 'SALES_GPT_PROFILE';
SQL Implementation Example
sql
-- Query using the default 'runsql' action

SELECT
AI what is the total revenue generated from customers in New York for 2026?;
Test Cases
Test Case IDTest ObjectivePrompt InputExpected Behavior / Translated SQL Structure
TC-01Verify showsql outputSELECT AI showsql list the top 3 customers by spendingMust output a SELECT... FROM ORDERS... GROUP BY... ORDER BY... FETCH FIRST 3 ROWS ONLY string without returning data rows.
TC-02Implicit Date FilteringSELECT AI showsql orders placed last monthMust dynamically compute timestamps using system dates (e.g., WHERE order_date >= TRUNC(ADD_MONTHS(SYSDATE, -1), 'MM')).
TC-03narrate GenerationSELECT AI narrate how many customers do we have?Instead of returning a grid containing a single count number, it must return a sentence: "You currently have 1,420 registered customers across your systems."
TC-04Out-of-Scope SafetySELECT AI write a python function to scrape a web pageSince the target tables cannot satisfy this, the LLM should cleanly state it cannot find matching schema definitions or return an execution boundary error.

3. Architecture & Project Explanation
Project Title: Enterprise Analytics GenAI Chatbot with Oracle APEX & Select AI
Business Problem
Traditional enterprise users frequently submit data request tickets to business intelligence (BI) teams for custom data views. This leads to information bottlenecks, slowing down immediate operational decisions.
Solution Architecture
This project implements a self-service conversational interface embedded inside an Oracle APEX web application.
  1. User Interface (Frontend): An Oracle APEX chat interface takes text or voice inputs from managers.
  2. Database Engine (Middle-tier Orchestration): APEX directly fires a PL/SQL or standard SQL string using the SELECT AI prefix.
  3. Context Enrichment Engine: The Autonomous Database captures the prompt, intercepts the relevant schema data definitions, bundles them into an enriched payload, and calls the secure AI Provider API.
  4. Execution Cycle: The returned SQL query is seamlessly compiled, verified against database privileges, and executed locally. Results populate dynamically generated interactive grids, charts, or maps inside APEX.
[ APEX Chat UI ] ──(Natural Language)──► [ Autonomous DB ] ──(Schema Metadata Only)──► [ OCI GenAI / OpenAI ]
       ▲                                         │                                            │
       │                                  (Executes Query)                               (Generates SQL)
       └──────────(Tabular Data/Charts)──────────┴◄────────────────(Raw SQL String)───────────┘

4. Job Market Analysis
The market demand for developers and database experts proficient in cloud-native generative AI features is accelerating rapidly.
  • Role Redefinition: Traditional Database Administrator (DBA) positions are quickly morphing into AI & Cloud Data Engineer and Database Infrastructure Architect roles. Routine operational work like manual patching, index optimization, and backups are handled natively by the Autonomous engine, freeing talent to work on business integrations.
  • Core Skills in Demand: Job listings by major enterprises and Oracle consultancies explicitly seek professionals who understand RAG (Retrieval-Augmented Generation), AI Vector Search, LLM API orchestration via PL/SQL, and secure cloud networking parameters (such as OCI Service Principals or AWS ARN credentials).
  • Compensation Trends: Professionals capable of bridging the gap between data persistence layers (SQL) and generative AI application frameworks command premium salaries, routinely ranging from $115,000 to over $175,000 annually for senior engineering tracks.
Q1: How does SELECT AI fundamentally work under the hood?
Answer: Select AI uses the database package DBMS_CLOUD_AI to combine user-supplied natural language with schema metadata (table structures, data types, and column comments). It packages this metadata into an augmented prompt and securely sends it to a pre-configured LLM provider via REST APIs. The LLM returns a syntactically accurate SQL query, which the Autonomous Database executes privately and securely within its own firewall. No actual table rows or enterprise data are transmitted to the LLM.
Q2: What are the primary actions supported by the SELECT AI syntax?
Answer: The syntax relies on a standard SQL statement prefixed with SELECT AI. It supports four primary modes:
  1. runsql (Default): Generates the SQL query based on natural language and immediately returns the data records.
  2. showsql: Returns the generated SQL query statement as text instead of running it, which is ideal for testing and debugging.
  3. narrate: Runs the query and passes the raw dataset back to the LLM to format it into a user-friendly conversational summary.
  4. chat: Acts as a direct bypass straight to the LLM for general knowledge prompts, functioning similarly to an interactive chatbot.
Q3: How do you protect your environment from SQL injections or data exposure when using Select AI?
Answer: Security is managed via three layers:
  • Network Access: You must configure Network Access Control Lists (ACLs) using DBMS_NETWORK_ACL_ADMIN to rigidly allow outbound traffic only to specific AI endpoints (e.g., ://openai.com).
  • No Raw Data Leakage: Only table columns and structural schema descriptions are used for prompt engineering—never the row data itself.
  • Database Privileges: End-users inherit the standard database roles and privileges. If a user doesn't have SELECT access to an underlying table, the generated SQL will fail to execute locally.

2. Practical Example & Test Case
To make Select AI function, you must first create an AI Profile that maps your chosen LLM credentials to your active schema tables.
Step A: Database Configuration (Admin Setup)
sql
-- 1. Grant network access to the AI provider endpoint
BEGIN
  DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE(
    host => '://openai.com',
    ace  => xs$ace_type(privilege_list => xs$name_list('http'),
                        principal_name => 'MYSCHEMA',
                        principal_type => xs_acl.ptype_db)
  );
END;
/

-- 2. Store your API Key Securely inside the database
BEGIN
  DBMS_CLOUD.CREATE_CREDENTIAL(
    credential_name => 'OPENAI_CRED',
    username        => 'OPENAI_USER',
    password        => 'sk-proj-xxxxxxxxxxxxxxxxxxxxxxxx'
  );
END;
/

-- 3. Define the AI Profile pointing to specific tables
BEGIN
  DBMS_CLOUD_AI.CREATE_PROFILE(
    profile_name => 'SALES_AI_PROFILE',
    attributes   => '{"provider": "openai", 
                      "model": "gpt-4o", 
                      "object_list": [{"owner": "MYSCHEMA", "name": "CUSTOMERS"}, 
                                      {"owner": "MYSCHEMA", "name": "SALES"}]}'
  );
END;
/
Use code with caution.
Step B: Active Execution & Test Cases
Before asking questions, set your current session profile:
sql
EXEC DBMS_CLOUD_AI.SET_PROFILE('SALES_AI_PROFILE');
Use code with caution.
Test Case 1: Inspecting the AI translation logic (showsql)
  • Prompt: SELECT AI showsql what are the top 3 selling products ordered by total sales?
  • Generated Output:
    sql
    SELECT product_name, SUM(amount_sold) AS total_sales 
    FROM MYSCHEMA.SALES 
    GROUP BY product_name 
    ORDER BY total_sales DESC 
    FETCH FIRST 3 ROWS ONLY;
    
    Use code with caution.
Test Case 2: Direct Execution (runsql)
  • Prompt: SELECT AI who are our top 5 customers in terms of purchase volume?
  • Result: A standard SQL table grid containing the customer names and volumes seamlessly fetched by the generated query.

3. Production Project Explanation
Project Title: Natural Language Enterprise Business Intelligence (BI) Engine
  • Objective: Enable non-technical business stakeholders (Sales Managers, HR Personnel, Operations Teams) to safely pull real-time operational reports using simple conversational text, bypassing standard IT ticket queues.
  • Architecture Stack:
    • Front-End UI: Oracle APEX (Application Express) configured with a chat interface wrapper.
    • Middleware / Database: Oracle Autonomous Data Warehouse (ADW) 23ai utilizing the DBMS_CLOUD_AI package.
    • LLM Engine: OCI Generative AI (Cohere/Llama models) for completely localized enterprise security compliance.
  • Implementation Strategy:
    To maximize accuracy and eliminate hallucinated columns, the database schema was heavily enriched using native SQL object COMMENTS. For instance, a column named CUST_STATUS_CD was explicitly commented: "Stores the customer's loyalty status, where 'A' means Active and 'I' means Inactive". When a user prompts the system for "Active customers", the LLM checks the comments in the prompt payload and constructs WHERE CUST_STATUS_CD = 'A' with near-perfect reliability.

4. Job Market Relevance (2026 Landscape)
With Oracle Database 23ai establishing itself across cloud enterprise infrastructures, the demand for traditional DBAs has dramatically pivoted toward AI-Native Data Architects and Analytics Engineers.
  • High-Demand Roles: Cloud Database Engineers, AI/ML Engineers, and BI Developers skilled in combining relational data models with Retrieval-Augmented Generation (RAG).
  • Key Skills Sought: Experience implementing DBMS_CLOUD_AI, vector search architectures (AI Vector Search), developing data pipelines for LLMs, and building conversational dashboards in Oracle APEX.
  • Market Outlook: Enterprises are heavily investing in migrating legacy on-premise systems into Autonomous Cloud setups. Knowing how to interface transactional databases with AI without causing security breaches is currently one of the most lucrative niche skills in the enterprise cloud market.

Q1: How do you configure a custom environment in OCI Data Science Notebooks for a team requiring specific CUDA and library versions?
Answer:
To configure a custom environment, you use OCI Data Science Conda Environments.
  1. Create and Modify: Inside an active OCI Data Science Notebook session, open the Environment Explorer. You can clone an existing Oracle-maintained conda environment (like a GPU-based PyTorch environment) or create a new one from scratch.
  2. Publish: Use the odsc conda publish CLI tool or the notebook interface to export the environment. You must specify an OCI Object Storage bucket where the environment's tarball will be stored.
  3. Share: Once published, other data scientists in the tenancy can configure their notebook sessions or model deployments to point to this Object Storage path, ensuring environment parity across the team.
Q2: Explain the architecture and benefits of the OCI Data Science Feature Store. How does it prevent data leakage?
Answer:
The OCI Feature Store is a centralized repository that allows teams to define, ingest, and serve features for ML models. It consists of:
  • Feature Lineage/Metadata: Tracks how features are calculated.
  • Offline Store: (Usually backed by OCI Object Storage or Autonomous Database) Stores historical feature data for training.
  • Online Store: (Backed by low-latency databases like OCI NoSQL) Stores the latest feature values for real-time inference.
Preventing Data Leakage: The Feature Store uses time-travel queries. When training a model, you can request the exact state of features at a specific point in the past (as_of timestamp). This ensures that features generated after the target event occurred are not inadvertently included in the training data.
Q3: How does the OCI Model Catalog handle model reproducibility and governance?
Answer:
The OCI Model Catalog acts as a centralized, immutable repository for storing trained models. It ensures governance and reproducibility through the following components:
  • Model Artifact: A zipped archive containing the serialized model object (e.g., .pkl, .onnx), a runtime.yaml file defining the conda environment dependency, and a score.py file containing the prediction logic.
  • Metadata & Provenance: Automatically records git commit hashes, the OCID (Oracle Cloud Identifier) of the Notebook or Pipeline that generated the model, and training dataset taxonomies.
  • Schema Definition: Stores input and output data schemas to ensure the operational environment matches the training environment.
Q4: Describe how you would build an automated, end-to-end ML training and deployment pipeline using OCI Data Science Pipelines.

Answer:
I would configure an OCI Data Science Pipeline using the OCI Python SDK or Console, structured with the following steps:
  1. Data Ingestion Step: A ScriptStep that triggers an OCI Data Flow (Spark) job to extract data from OCI Object Storage and clean it.
  2. Feature Engineering Step: A step that interacts with the OCI Feature Store to ingest fresh features.
  3. Model Training Step: A PipelineStep running on a GPU shape that executes the training script, logs metrics, and outputs a validated model.
  4. Model Registration Step: Registers the approved model artifact directly into the OCI Model Catalog.
  5. Deployment Step (Optional/Triggered): A step that updates an OCI Model Deployment HTTP endpoint with the new model version using a zero-downtime rolling upgrade strategy.

 Hands-On Project Example: Automated Demand Forecasting
Project Overview
An e-commerce platform needs an automated MLOps pipeline to forecast product demand weekly. The solution requires feature management, automated retraining when data drifts, and a secure REST endpoint for real-time inventory adjustments.
Architecture Implementation
[OCI Object Storage] ──> [OCI Feature Store] ──> [OCI Data Science Pipeline]
                                                        │
                                                        ▼
[OCI Model Deployment] <── [OCI Model Catalog] <── [Model Artifact (score.py)]
Code Snippet: score.py for OCI Model Deployment
This script is packaged inside the Model Catalog artifact to process incoming inference requests.
python
import os
import json
import pandas as pd
import joblib

model_name = "demand_forecast_model.joblib"

def load_model():
    """Loads the model from the local artifact directory."""
    model_dir = os.path.dirname(os.path.realpath(__file__))
    contents = os.listdir(model_dir)
    if model_name in contents:
        return joblib.load(os.path.join(model_dir, model_name))
    else:
        raise Exception(f"Model file {model_name} not found in {model_dir}")

# Initialize the model globally to optimize hot-starts
model = load_model()

def predict(data, model=model):
    """
    Accepts incoming JSON payload, converts it to a DataFrame, 
    and returns predictions.
    """
    try:
        # Expected format: {"input": [{"store_id": 10, "item_id": 105, "promo": 1}]}
        payload = json.loads(data)
        input_data = pd.DataFrame(payload["input"])
        
        # Perform inference
        predictions = model.predict(input_data)
        
        return {"predictions": predictions.tolist()}
    except Exception as e:
        return {"error": str(e)}
 Test Cases for the MLOps Pipeline
To ensure the pipeline is robust before moving to production, execute the following automated tests:
1. Unit Test: Model Artifact Validation
  • Objective: Ensure score.py properly processes payloads and matches the expected output shape before cataloging.
  • Test Case: Run a local mock execution of score.py passing a valid JSON string and verify that a dictionary containing "predictions" is returned without throwing an exception.
2. Integration Test: Feature Store Time-Travel
  • Objective: Verify that the OCI Feature Store retrieves historically accurate feature snapshots.
  • Test Case: Assert that querying the feature group with a timestamp from 30 days ago returns the exact statistical metrics (e.g., historical item price) recorded on that date, preventing data leakage.
3. Production Deployment Test: Zero-Downtime Verification
  • Objective: Ensure model updates do not interrupt live client applications.
  • Test Case: During an automated deployment update in OCI Model Deployment, continuously ping the endpoint at 100ms intervals. Assert that the HTTP success status code remains 200 OK throughout the rolling transition from Version 1 to Version 2.

 Pro-Tips for the Interview
  • IAM & Security: Be ready to talk about OCI IAM Policies. Always mention that you use Dynamic Groups and Resource Principals so your Notebooks and Pipelines can securely interact with Object Storage or the Model Catalog without embedding hardcoded API keys.
  • Autoscaling: Mention that OCI Model Deployments support autoscaling based on CPU/Memory utilization or request counts, ensuring cost efficiency.

Q1: How do you handle "Training-Serving Skew" within Oracle Cloud Infrastructure (OCI), and how does the Feature Store address this?
Answer:
Training-Serving Skew occurs when the feature engineering logic used during model training differs from the logic applied during real-time inference. 
  • The Solution via OCI Feature Store: We define feature entities and transformation logic exactly once. The Feature Store exposes two primary APIs:
    1. Historical Query API (Offline): Used by OCI Data Science Jobs to generate point-in-time snapshots for training.
    2. Low-Latency REST API (Online): Deployed using Redis/MySQL on OCI or Autonomous Database to fetch the latest feature vectors in milliseconds during real-time model deployment. 
  • This architectural consistency guarantees that the model receives identical mathematical data definitions in both development and production.
Q2: What is the structural purpose of the OCI Model Catalog, and what artifacts must be present to successfully deploy a model?
Answer:
The Model Catalog acts as a centralized, immutable repository for managing model versions, tracking provenance, and serving as a secure gateway for deployments. To register a valid model package, a zipped Model Artifact must include: 
  • model.onnx, model.pkl, or equivalent framework weights.
  • score.py: The critical execution script containing two mandatory functions: load_model() (caches weights in memory) and predict() (processes input payloads).
  • runtime.yaml: Captures environment definitions, target python versions, and the exact Conda environment path (slug) needed to build the execution container dynamically.
Q3: How do you design an end-to-end Automated Retraining and Deployment Loop using OCI Data Science Pipelines?
Answer:
We construct an OCI Data Science Pipeline comprised of sequential and parallel steps managed by the Oracle Accelerated Data Science (ADS) SDK
  1. Data Ingestion Step: Triggers via an OCI Event when a new data batch hits an OCI Object Storage bucket.
  2. Validation Step: Runs statistical checks using tools like Great Expectations to block corrupted payloads.
  3. Training Job Step: Spins up a managed compute instance running a specialized training script.
  4. Evaluation Step: Compares metrics (e.g., F1-Score) of the new candidate model against the current champion active in the Model Catalog.
  5. Conditional Gate: If the new model outperforms the current production baseline, it programmatically updates the catalog tag to #production and triggers an update to the running OCI Model Deployment endpoint. [

Part 2: Hands-On Project Implementation Guide
Project Overview: Predictive Customer Churn Pipeline
An automated enterprise pipeline built on OCI Data Science, engineered to ingest raw data, fetch features, validate models, register artifacts, and serve real-time predictions.
End-to-End Code Blueprint (automated_pipeline.py)
python
import os
import ads
from ads.dataset.factory import DatasetFactory
from ads.model.framework.sklearn_model import SklearnModel
from ads.pipeline import Pipeline, PythonStep, BuiltinStep
from sklearn.ensemble import RandomForestClassifier

# 1. Define Environment Configuration
COMPARTMENT_ID = os.environ.get("NB_SESSION_COMPARTMENT_OCID")
PROJECT_ID = os.environ.get("PROJECT_OCID")
LOG_GROUP_ID = "ocid1.loggroup.oc1.iad.example_log_group"

ads.set_auth("resource_principal") # Secure machine authentication on OCI

def train_and_eval_model():
    """Simulates an isolated OCI Pipeline Step for training and catalog ingestion."""
    # Fetch offline feature store data simulated via secure object storage paths
    train_df = DatasetFactory.open("oci://my-feature-store-bucket@my-tenancy/churn_features.csv").to_dataframe()
    
    X = train_df.drop(columns=['target', 'customer_id'])
    y = train_df['target']
    
    # Train Candidate Model
    model = RandomForestClassifier(n_estimators=100, random_state=42)
    model.fit(X, y)
    
    # Instantiate ADS Model wrapper for OCI Model Catalog packaging
    sklearn_model = SklearnModel(estimator=model, artifact_dir="./churn_artifact_dir")
    
    # Dynamically generates score.py and runtime.yaml
    sklearn_model.prepare(
        inference_conda_env="generalpython39_v1",
        training_conda_env="generalpython39_v1",
        use_case_type="binary_classification",
        X_sample=X.head(1),
        force_overwrite=True
    )
    
    # Save directly to the managed OCI Model Catalog
    model_id = sklearn_model.save(
        compartment_id=COMPARTMENT_ID,
        project_id=PROJECT_ID,
        display_name="churn-predict-rf-model",
        description="Automated production churn prediction model."
    )
    print(f"Successfully registered model to Catalog. OCID: {model_id}")
    return model_id

if __name__ == "__main__":
    # Orchestrate using OCI Pipeline Step
    step = PythonStep(
        name="churn_training_step",
        action=train_and_eval_model
    )
    
    pipeline = Pipeline(
        display_name="Production-Churn-MLOps-Pipeline",
        compartment_id=COMPARTMENT_ID,
        project_id=PROJECT_ID,
        steps=[step]
    )
    
    # Deploy infrastructure and execute on OCI managed instances
    pipeline.create()
    pipeline_run = pipeline.run()
    pipeline_run.watch()
Part 3: Production Test Cases
To guarantee predictable deployments, implement these rigorous test criteria within your CI/CD pipelines before code ever hits execution stages. 
Test Scenario CategoryTest Target / ObjectiveInput Verification DataExpected Deterministic Outcome
Pipeline Integration TestValidate that the orchestration script successfully registers a compliant zip into the OCI Model Catalog.Executing automated_pipeline.py script against development compartment IDs.System produces a valid Model OCID and returns a successful step status code (SUCCEEDED).
Artifact Structure TestEnsure the compiled zip contains all components required by the OCI Model Deployment environment container.Introspecting files within ./churn_artifact_dir/.Directory must cleanly assert the inclusion of score.py, runtime.yaml, and serialized weight binaries.
Deterministic Inference TestEnsure that the input format parsed by score.py accurately mirrors real-time payload payloads to prevent server syntax faults.Send raw JSON payload matching structural schemas: {"customer_id": "C992", "tenure": 12, "monthly_charges": 75.5}.The deployment prediction engine returns a structured JSON result: {"prediction": 1, "probability": 0.88} with a network turnaround runtime under 50ms.

No comments:

Post a Comment