Skip to content

Latest commit

 

History

History
190 lines (138 loc) · 6.07 KB

index.rst

File metadata and controls

190 lines (138 loc) · 6.07 KB

Oracle Accelerated Data Science SDK (ADS)

PyPI_ Python_ Notebook Examples_

release_notes user_guide/quick_start/quick_start

user_guide/cli/quickstart user_guide/cli/authentication user_guide/cli/opctl/configure user_guide/cli/opctl/local-development-setup

user_guide/loading_data/connect user_guide/data_labeling/index user_guide/data_transformation/data_transformation user_guide/data_visualization/visualization user_guide/model_training/index user_guide/model_registration/introduction

user_guide/apachespark/spark user_guide/big_data_service/index user_guide/jobs/index user_guide/logs/logs user_guide/pipeline/index user_guide/secrets/index

modules

Oracle Accelerated Data Science (ADS) SDK

The Oracle Accelerated Data Science (ADS) SDK is maintained by the Oracle Cloud Infrastructure Data Science service team. It speeds up common data science activities by providing tools that automate and/or simplify common data science tasks, along with providing a data scientist friendly pythonic interface to Oracle Cloud Infrastructure (OCI) services, most notably OCI Data Science, Data Flow, Object Storage, and the Autonomous Database. ADS gives you an interface to manage the lifecycle of machine learning models, from data acquisition to model evaluation, interpretation, and model deployment.

With ADS you can:

  • Read datasets from Oracle Object Storage, Oracle RDBMS (ATP/ADW/On-prem), AWS S3, and other sources into Pandas dataframes.
  • Easily compute summary statistics on your dataframes and perform data profiling.
  • Tune models using hyperparameter optimization with the ADSTuner tool.
  • Generate detailed evaluation reports of your model candidates with the ADSEvaluator module.
  • Save machine learning models to the OCI Data Science Models.
  • Deploy those models as HTTPS endpoints with Model Deployment.
  • Launch distributed ETL, data processing, and model training jobs in Spark with OCI Data Flow.
  • Train machine learning models in OCI Data Science Jobs.
  • Manage the lifecycle of conda environments through the ads conda command line interface (CLI).
  • Distributed Training with PyTorch, Horovod and Dask

Installation

python3 -m pip install oracle-ads

>>> import ads
>>> ads.hello()

  O  o-o   o-o
 / \ |  \ |
o---o|   O o-o
|   ||  /     |
o   oo-o  o--o

ADS SDK version: X.Y.Z
Pandas version: x.y.z
Debug mode: False

Additional Documentation

Examples

Load data from Object Storage

import ads
import oci
import pandas as pd

ads.set_auth(
   auth="api_key", oci_config_location=oci.config.DEFAULT_LOCATION, profile="DEFAULT"
)
bucket_name = "<bucket_name>"
path = "<path>"
namespace = "<namespace>"
df = pd.read_csv(
   f"oci://{bucket_name}@{namespace}/{path}", storage_options=ads.auth.default_signer()
)

Load data from Autonomous DB

This example uses SQL injection safe binding variables.

import ads
import pandas as pd

connection_parameters = {
    "user_name": "<user_name>",
    "password": "<password>",
    "service_name": "<tns_name>",
    "wallet_location": "<file_path>",
}

df = pd.DataFrame.ads.read_sql(
    """
    SELECT *
    FROM SH.SALES
    WHERE ROWNUM <= :max_rows
    """,
    bind_variables={ max_rows : 100 },
    connection_parameters=connection_parameters,
)

More Examples

See quick start<user_guide/quick_start/quick_start> guide for more examples

Contributing

This project welcomes contributions from the community. Before submitting a pull request, please review our contribution guide CONTRIBUTING.md.

Find Getting Started instructions for developers in README-development.md

Security

Consult the security guide SECURITY.md for our responsible security vulnerability disclosure process.

License

Copyright (c) 2020, 2022 Oracle and/or its affiliates. Licensed under the Universal Permissive License v1.0