4 OML Notebooks
Oracle Machine Learning Notebooks is an enhanced web-based notebook platform for data analyst and data scientists. You can write code, text, create visualizations, and perform data analytics including machine learning. Notebooks work with interpreters in the back-end. In Oracle Machine Learning user interface, notebooks are available in a project, where you can create, edit, delete, copy, move, and even save notebooks as templates.
- Oracle Machine Learning Notebooks
Oracle Machine Learning Notebooks is an enhanced web-based notebook platform for data engineers, data analyst, R and Python users, and data scientists. You can write code, text, create visualizations, and perform data analytics including machine learning. Notebooks work with interpreters in the back-end. - GitHub Notebooks
Oracle Machine Learning UI supports direct interaction of Oracle Machine Learning Notebooks with your external GitHub repositories. You can now directly import notebooks from your GitHub repositories. - Enable GPU Compute Capabilities in a Notebook through the Python Interpreter
This topic demonstrates how to enable GPU compute capabilities in a notebook through the Python interpreter. It also shows how to get information about the current GPU on which the notebook is running, and other details. - Visualize your Data in Oracle Machine Learning Notebooks
Oracle Machine Learning Notebooks offer rich visualization capabilities of your data. The visualizations depend on the type of your dataset. - Export a Notebook
You can export a Notebook in Native format (.dsnb) file, Zeppelin format (.json) file, in Jupyter format (.ipynb), and later import them in to the same or a different environment. - Import a Notebook
You can import notebooks into your Oracle Machine Learning UI projects. Oracle Machine Learning UI supports the import of notebooks in the native format(.dsnb), Zeppelin(.json)and Jupyter(.ipynb)notebooks. Oracle Machine Learning UI also supports importing notebooks from your GitHub repository. - Use the SQL Interpreter in a Notebook Paragraph
An Oracle Machine Learning notebook supports multiple languages. Each paragraph is associated with a specific interpreter. For example, to run SQL statements use the SQL interpreter. To run PL/SQL statements, use thescriptinterpreter. - Use the Python Interpreter in a Notebook Paragraph
An Oracle Machine Learning notebook supports multiple languages. Each paragraph is associated with a specific interpreter. To run Python commands in a notebook, you must first connect to the Python interpreter. To use OML4Py, you must import theomlmodule. - Use the R Interpreter in a Notebook Paragraph
An Oracle Machine Learning notebook supports multiple languages. Each paragraph is associated with a specific interpreter. To run R functions in an Oracle Machine Learning notebook, you must first connect to the R interpreter. - Use the Conda Interpreter in a Notebook Paragraph
Oracle Machine Learning Notebooks provides a Conda interpreter to enable administrators to create conda environments with custom third-party Python and R libraries. Once created, you can download and activate Conda environments inside a notebook session also using the Conda interpreter. - Use the Scratchpad
The Scratchpad provides you convenient one-click access to a notebook for running SQL statements, PL/SQL, R, and Python scripts that can be renamed. The Scratchpad is available on the Oracle Machine Learning User Interface (UI) home page. - Use the Markdown Interpreter and Generate Static html from Markdown Plain Text
Use the Markdown interpreter and generate static html from Markdown plain text. - About Interpreters and Notebook Service Levels
An interpreter is a plug-in that allows you to use a specific data processing language backend.
4.1 Enable GPU Compute Capabilities in a Notebook through the Python Interpreter
This topic demonstrates how to enable GPU compute capabilities in a notebook through the Python interpreter. It also shows how to get information about the current GPU on which the notebook is running, and other details.
- Paid Oracle Autonomous AI Database Serverless database instances.
- The GPU feature is enabled for Oracle Autonomous AI Lakehouse Serverless or Oracle Autonomous AI Transaction Processing Serverless instances with 16 or more ECPUs specified for the OML application. For cost details, refer to the Oracle PaaS and IaaS Universal Credits Service Descriptions document available on the Oracle Cloud Services contracts page.
- While basic NVIDIA libraries are included with the
base environment, you are expected to create a custom Conda
environment with the GPU-enabled 3rd party libraries
required for your project. Only GPU-enabled packages will
benefit from GPUs in Python paragraphs.
Note:
By default, pre-installed and pre-configured NVIDIA libraries are provided to the GPU interpreter container in the host VM. However, third-party Python packages that use GPUs typically require specific versions of NVIDIA CUDA libraries as dependencies, which may override the included libraries. - Third-party GPU-enabled Python packages. In this
example, we use
pytorch.
Note:
There is an expected delay in starting a notebook with GPU compute capabilities due to reserving and starting the GPU resources, which may take a few minutes.- Create a Conda environment with the desired third-party GPU-enabled Python packages (ADMIN role required).
- Download and activate the Conda environment in OML Notebooks to use the GPU compute capabilities (OML_DEVELOPER role required).
- In Oracle Machine Learning Notebooks, select the notebook type gpu from the Update Notebook Type drop-down menu in the notebook editor (OML_DEVELOPER role required). This setting is persisted in the notebook until you change it to another type.
Related Topics
Parent topic: OML Notebooks
4.2 Export a Notebook
You can export a Notebook in Native format (.dsnb) file,
Zeppelin format ( .json ) file, in Jupyter format ( .ipynb
), and later import them in to the same or a different environment.
Related Topics
Parent topic: OML Notebooks
4.3 Import a Notebook
You can import notebooks into your Oracle Machine Learning UI projects.
Oracle Machine Learning UI supports the import of notebooks in the native format
(.dsnb), Zeppelin (.json) and Jupyter
(.ipynb) notebooks. Oracle Machine Learning UI also supports importing
notebooks from your GitHub repository.
.json) and Jupyter (.ipynb) notebooks.
Import Notebook from File
- On the Notebooks page, click Import. Here, you have
two options—File and Git.
- Click File. This opens the File Upload dialog.
- In the File Upload dialog, browse and
select the notebook to import.
Note:
You must have the notebook saved as a.jsonfile or.dsnbfile to import it. You can import notebooks exported from non-Oracle Apache Zeppelin environments, but only paragraphs types that are supported may be run. - Click Open.
This completes the task of importing a notebook file into your project.
Import/Clone Notebooks from GitHub
- On the Notebooks page, click Import. Here, you have two options—File and Git.
- Click Git. This opens the GitHub
Checkout page.
- On the GitHub Checkout page, enter these
details:
- Repository URL: Enter the URL of
the GitHub repository you want to access. You have the following
options to provide the GitHub repository URL:
- Minimum valid URL:
You can provide the GitHub URL containing only the
repository name and the owner. For example,
https://github.com/RepoOwner/RepoName. This loads the branches found in the remote repository. - Base URL and branch:
Enter the GitHub repository URL along with the branch
you want to clone. For example,
https://github.com/RepoOwner/RepoName/tree/BranchName/orhttps://github.com/RepoOwner/RepoName/blob/BranchName/. This automatically loads the Branches field. Select the Branch Name defined in the URL. and this will trigger the load of the directory structure found in the repository. - Base URL, branch and
directory: You can also provide the
GitHub URL containing one or several sub-directories in
the remote repository. For example,
https://github.com/RepoOwner/RepoName/tree/Branch/Dir/Di2rThis loads the directory structure and pre-select the directory specified in the URL. - Complete file path:
You can also enter the complete file path in the remote
GitHub repository. For example,
https://github.com/RepoOwner/RepoName/blob/Branch/Dir/file.dsnb. This loads the branches, directories and the file in the Selected notebooks field at the bottom of the dialog.
- Minimum valid URL:
You can provide the GitHub URL containing only the
repository name and the owner. For example,
- Select a credential: Click the down arrow and select a credential. If you do not have a credential created, click the + icon to create one. See Create GitHub Credentials for more information.
- Branch: The drop-down menu displays the branches available in the remote GitHub repository based on the specified repository owner, repository name, and credential combination. Select a branch. The notebooks available in the branch are listed. You can also filter the notebooks you are looking for by typing in the notebook name in the Filter field.
- Select the notebooks you want to clone and click Add. The notebooks you selected are now listed in the Selected notebooks section.
- Click Checkout. This starts cloning all the GitHub notebooks you selected. Once completed, it displays the message "Notebooks successfully cloned". Click Open Notebook listing on the message box to go to the Notebooks listing page.
This completes the task of cloning and importing a notebook from your GitHub repository.
- Repository URL: Enter the URL of
the GitHub repository you want to access. You have the following
options to provide the GitHub repository URL:
Parent topic: OML Notebooks
4.4 Use the Scratchpad
The Scratchpad provides you convenient one-click access to a notebook for running SQL statements, PL/SQL, R, and Python scripts that can be renamed. The Scratchpad is available on the Oracle Machine Learning User Interface (UI) home page.
Note:
The Scratchpad is a regular notebook that is prepopulated with four paragraphs -%sql, %script,
, %python and %r.
Parent topic: OML Notebooks
4.5 Use the Markdown Interpreter and Generate Static html from Markdown Plain Text
Use the Markdown interpreter and generate static html from Markdown plain text.
Parent topic: OML Notebooks















