Package: oracle-ads
Oracle Accelerated Data Science (ADS)TheOracle Accelerated Data Science (ADS) SDKis maintained by the Oracle Cloud Infrastructure (OCI)Data Science serviceteam. It speeds up common data science activities by providing tools that automate and simplify common data science tasks. Additionally, provides data scientists a friendly pythonic interface to OCI services. Some of the more notable services are OCI Data Science, Model Catalog, Model Deployment, Jobs, ML Pipelines, Data Flow, Object Storage, Vault, Big Data Service, Data Catalog, and the Autonomous Database. ADS gives you an interface to manage the life cycle 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 intoPandas dataframes.Tune models using hyperparameter optimization with theADSTunertool.Generate detailed evaluation reports of your model candidates with theADSEvaluatormodule.Save machine learning models to theOCI Data Science Model Catalog.Deploy models as HTTP endpoints withModel Deployment.Launch distributed ETL, data processing, and model training jobs in Spark withOCI Data Flow.Train machine learning models in OCI Data ScienceJobs.Define and run an end-to-end machine learning orchestration covering all the steps of machine learning lifecycle in a repeatable, continuousML Pipelines.Manage the life cycle of conda environments through theads condacommand line interface (CLI).InstallationYou have various options when installing ADS.Installing the oracle-ads base packagepython3-mpipinstalloracle-adsInstalling OCI AI OperatorsTo use the AI Forecast Operator, install the "forecast" dependencies using the following command:python3-mpipinstall'oracle_ads[forecast]==2.9.0'Installing extras librariesTo work with gradient boosting models, install theboostedmodule. This module includes XGBoost and LightGBM model classes.python3-mpipinstall'oracle-ads[boosted]'For big data use cases using Oracle Big Data Service (BDS), install thebdsmodule. It includes the following libraries,ibis-framework[impala],hdfs[kerberos]andsqlalchemy.python3-mpipinstall'oracle-ads[bds]'To work with a broad set of data formats (for example, Excel, Avro, etc.) install thedatamodule. It includes thefastavro,openpyxl,pandavro,asteval,datefinder,htmllistparse, andsqlalchemylibraries.python3-mpipinstall'oracle-ads[data]'To work with geospatial data install thegeomodule. It includes thegeopandasand libraries from thevizmodule.python3-mpipinstall'oracle-ads[geo]'Install thenotebookmodule to use ADS within a OCI Data Science servicenotebook session. This module installsipywidgetsandipythonlibraries.python3-mpipinstall'oracle-ads[notebook]'To work with ONNX-compatible run times and libraries designed to maximize performance and model portability, install theonnxmodule. It includes the following libraries,onnx,onnxruntime,onnxmltools,skl2onnx,xgboost,lightgbmand libraries from thevizmodule.python3-mpipinstall'oracle-ads[onnx]'For infrastructure tasks, install theopctlmodule. It includes the following libraries,oci-cli,docker,conda-pack,nbconvert,nbformat, andinflection.python3-mpipinstall'oracle-ads[opctl]'For hyperparameter optimization tasks install theoptunamodule. It includes theoptunaand libraries from thevizmodule.python3-mpipinstall'oracle-ads[optuna]'Install thetensorflowmodule to includetensorflowand libraries from thevizmodule.python3-mpipinstall'oracle-ads[tensorflow]'For text related tasks, install thetextmodule. This will include thewordcloud,spacylibraries.python3-mpipinstall'oracle-ads[text]'Install thetorchmodule to includepytorchand libraries from thevizmodule.python3-mpipinstall'oracle-ads[torch]'Install thevizmodule to include libraries for visualization tasks. Some of the key packages arebokeh,folium,seabornand related packages.python3-mpipinstall'oracle-ads[viz]'Seepyproject.tomlfile[project.optional-dependencies]section for full list of modules and its list of extra libraries.NoteMultiple extra dependencies can be installed together. For example:python3-mpipinstall'oracle-ads[notebook,viz,text]'DocumentationOracle Accelerated Data Science SDK (ADS) DocumentationOCI Data Science and AI services ExamplesOracle AI & Data Science BlogOCI DocumentationExamplesLoad data from Object Storageimportadsfromads.common.authimportdefault_signerimportociimportpandasaspdads.set_auth(auth="api_key",oci_config_location=oci.config.DEFAULT_LOCATION,profile="DEFAULT")bucket_name=<bucket_name>key=<key>namespace=<namespace>df=pd.read_csv(f"oci://{bucket_name}@{namespace}/{key}",storage_options=default_signer())Load data from ADBThis example uses SQL injection safe binding variables.importadsimportpandasaspdconnection_parameters={"user_name":"<user_name>","password":"<password>","service_name":"<tns_name>","wallet_location":"<file_path>",}df=pd.DataFrame.ads.read_sql("""SELECT *FROM SH.SALESWHERE ROWNUM <= :max_rows""",bind_variables={max_rows:100},connection_parameters=connection_parameters,)ContributingThis project welcomes contributions from the community. Before submitting a pull request, pleasereview our contribution guideFind Getting Started instructions for developers inREADME-development.mdSecurityConsult the security guideSECURITY.mdfor our responsible security vulnerability disclosure process.LicenseCopyright (c) 2020, 2022 Oracle and/or its affiliates. Licensed under theUniversal Permissive License v1.0