Skip to main content

Oracle Accelerated Data Science SDK

Project description

Oracle Accelerated Data Science SDK (ADS)

PyPI

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 Model Catalog.
  • Deploy those models as HTTP 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).

Installation

You have various options when installing ADS.

Installing the oracle-ads base package

  $ python3 -m pip install oracle-ads

Installing extras libraries

To use ADS within a Notebook Session of the OCI Data Science service:

  $ python3 -m pip install oracle-ads[notebook]

For machine learning tasks install

  $ python3 -m pip install oracle-ads[boosted]

To work on text related tasks run

  $ python3 -m pip install oracle-ads[text]

For access to a broad set of data formats (for example, Excel, Avro, etc.) run

  $ python3 -m pip install oracle-ads[data]

Note

Multiple extra dependencies can be installed together. For example:

  $ python3 -m pip install  oracle-ads[notebook,boosted,text]

Documentation

Examples

Load data from Object Storage

  import ads
  from ads.common.auth import default_signer
  import oci

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

Load data from ADB (simple)

  connection_parameters = {
      "user_name": "<username>",
      "password": "<password>",
      "service_name": "<service_name_{high|med|low}>",
      "wallet_location": "/full/path/to/my_wallet.zip",
  }
  import pandas as pd
  import ads

  # simple read of a SQL query into a dataframe with no bind variables
  df = pd.DataFrame.ads.read_sql(
      "SELECT * FROM SH.SALES",
      connection_parameters=connection_parameters,
  )

Load data from ADB (using sql-injection-safe bind variables)

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

Contributing

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

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

Security

Please consult the security guide for our responsible security vulnerability disclosure process.

License

Copyright (c) 2020, 2022 Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oracle_ads-2.5.10.tar.gz (939.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oracle_ads-2.5.10-py3-none-any.whl (1.2 MB view details)

Uploaded Python 3

File details

Details for the file oracle_ads-2.5.10.tar.gz.

File metadata

  • Download URL: oracle_ads-2.5.10.tar.gz
  • Upload date:
  • Size: 939.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.7.10

File hashes

Hashes for oracle_ads-2.5.10.tar.gz
Algorithm Hash digest
SHA256 6add4bc9f8f60d24a425a26ad9a029b5dc8c3c3e0605ddacd289d5d673dafb59
MD5 7f9dfdbf3c96e614eb536cc3a938914e
BLAKE2b-256 b9f8857955266293e173419f3ad165b0c72f2707f90f4594a34fb9fe08b6bf34

See more details on using hashes here.

File details

Details for the file oracle_ads-2.5.10-py3-none-any.whl.

File metadata

  • Download URL: oracle_ads-2.5.10-py3-none-any.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.7.10

File hashes

Hashes for oracle_ads-2.5.10-py3-none-any.whl
Algorithm Hash digest
SHA256 bf7b21ed051963701f8baa307f43f736861f288a3a9e9b9bd83980200a6255ed
MD5 e8265f3e42d5d10341bbc43df33415a4
BLAKE2b-256 2eecfe3dee0687c2fbf794cd030f08d2c5c379d8f72bdfbc1d52f29c43d3cf06

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page