12 Administer Oracle Machine Learning

Oracle Machine Learning is managed at the system level and at the application level by an administrator.

  • Administrator — Creates and manages Oracle Machine Learning user accounts, manages compute resourses, connection groups, and notebook sessions. The Administrator also reassigns user workspace.

    Note:

    The Administrator is not authorized to run notebooks. The Administrator can only read notebooks.
    Admin home page and left navigation menu
  • Developer — This is the default user role that allows you to create and run notebooks, run SQL Statements, create SQL scripts, run Python scripts, create jobs to schedule and run notebooks, use example template notebooks, create and run AutoML experiments, and deploy models.Developer home page and left navigation menu

12.1 Typical Workflow for Managing Oracle Machine Learning

To manage Oracle Machine Learning User Interface and other administrative tasks, refer to the tasks listed in the table as a guide.

Tasks Oracle Machine Learning Interface/OCI CLI Interface More Information
Obtain Oracle Machine Learning User Management URL from OCI command line Oracle Cloud Infrastructure (OCI) Command Line Interface (CLI) Access OML User Management from Command Line
User account and password creation Oracle Machine Learning User Management interface Create Users for Oracle Machine Learning
Connection Groups — View and Reset Oracle Machine Learning User Interface Work with Connection Groups
Compute Resource — View Oracle Machine Learning User Interface About Compute Resource
User Data administration — Delete all users, all user related objects such as workspace, projects, and notebooks, and workspace reassignment Oracle Machine Learning User Interface About User Data
Notebook session — Loading and stopping of notebook sessions Oracle Machine Learning User Interface Get Started with Notebook Sessions
Conda environment — Installation and management of the Conda environment, add and delete of packages from the environment. Oracle Autonomous Database About the Conda Environment and Conda Interpreter

Note:

The tasks listed here can be performed by an administrator only.

12.2 Access OML User Management from Command Line

You can obtain the Oracle Machine Learning User Management URL for a specific tenancy from the Oracle Cloud Infrastructure (OCI) command line.

Prerequisite: Tenancy ID
To obtain the Oracle Machine Learning User Management URL for a specific tenancy from the OCI command line, you must first obtain the tenancy ID.
  1. To obtain the tenancy ID, go to your OCI Profile on the top right corner of the Oracle Cloud page and click Tenancy.

    Figure 12-1 OCI Profile

    Oracle Cloud Profile Information
  2. On the Tenancy details page, click Copy to obtain the tenancy URL.

    Figure 12-2 Tenancy Information

    Tenancy Information
  3. Type the following command in your OCI command line interface:
    oci db database list  --compartment-id  <tenancy OCID>
    Here,
    • compartment-id: This is the unique ID assigned to your compartment.
    • tenancy OCID: This is the Oracle Cloud Identifier (OCID) for your tenancy.
    This command returns the following:
    "connection-urls": {
            "apex-url": https://<tenancy ID>-<database name>.<region>.oraclecloudapps.com/ords/apex,
            "graph-studio-url": https://<tenancy ID>-<database name>.<region>.oraclecloudapps.com/graphstudio/,
            "machine-learning-user-management-url": https://<tenancy ID>-<database name>.<region>-1.oraclecloudapps.com/omlusers/,
            "sql-dev-web-url": https://<tenancy ID>-<database name>.<region>-1.oraclecloudapps.com/ords/sql-developer
          },
This completes the task of obtaining the Oracle Machine Learning User Management URL from OCI command line interface.

12.3 Manage OML Users

An administrator manages new user account and user credentials creation for Oracle Machine Learning in the User Management interface.

12.3.1 Create User

An administrator creates new user accounts and user credentials for Oracle Machine Learning in the User Management interface.

Note:

You must have the administrator role to access the Oracle Machine Learning User Management interface.

To create a user account:

  1. On the Autonomous Databases page, under the Display Name, select an Autonomous Database.
  2. On the Autonomous Database Details page, click Database Actions.
  3. On the Database Actions launchpad, under Administration, click Database Users.
  4. Click + Create User.
  5. In the User Name field, enter a username for the account. Using the username, the user will log in to an Oracle Machine Learning instance.
  6. (Optional) Select the option Password Expired (user must change). to required the user to change their password when they login for the first time.
  7. In the Password field, enter a password for the user.
  8. In the Confirm Password field, enter a password to confirm the value that you entered in the Password field.
  9. Select OML to enable Oracle Machine Learning for the user.
  10. Click Create User.

This creates a new database user and grants the required privileges to use Oracle Machine Learning.

Note:

With a new database user, an administrator needs to issue grant commands on the database to grant table access to the new user for the tables associated with the user's Oracle Machine Learning notebooks.

12.3.2 Add Existing Database User Account to Oracle Machine Learning Components

As the ADMIN user you can add an existing database user account for Oracle Machine Learning components.

Note:

You must have the ADMIN role to access the Oracle Machine Learning User Management interface.

To add an existing database user account:

  1. On the Autonomous Databases page, under the Display Name column, select an Autonomous Database.
  2. On the Autonomous Database Details page, click Database Actions.
  3. On the Database Actions Launchpad, under Development, click Oracle Machine Learning.
  4. Expand the navigator by clicking the navigation icon next to Oracle Machine Learning.
  5. Under Admin, select Manage OML Users to add Oracle Machine Learning Notebooks users.
  6. Click Show All Users to display the existing database users.

    Note:

    Initially, the Role field shows the role None for existing database users. After adding a user the role Developer is assigned to the user.
  7. Select a user. To select a user select a name in the User Name column. For example, select ANALYST1.
    Selecting the user shows the Oracle Machine Learning Edit User page.
  8. Enter a name in the First Name field. (Optional)
  9. Enter the last name of the user in the Last Name field. (Optional)
  10. In the Email Address field, enter the email ID of the user.
    Making any change on this page adds the existing database user with the required privileges as an Oracle Machine Learning component user.
  11. Click Save.

This grants the required privileges to use the Oracle Machine Learning application. In Oracle Machine Learning this user can then access any tables the user has privileges to access in the database.

12.4 About User Data

On the User Data page in Oracle Machine Learning, you can view existing user data, reassign, and delete it.

The User Data page lists details of the Oracle Machine Learning user such as the name, role, comments, last updated date. You can perform the following tasks:
  • Delete User Data: To delete a user, select the user to delete and click Delete User Data.

  • Reassign: To reassign workspace and templates from one user to another.

12.4.1 Reassign

The Reassign option allows you to reassign workspaces, along with templates, from one user to another.

To reassign workspaces:
  1. On the User Data page, select the user from whom you want to reassign workspace and click Reassign.
    The Reassign page opens.
  2. In the Target User field, select the user to whom you want to reassign workspace.
  3. Select All Templates if you want to reassign all the templates associated with the user selected in the User Data page.
  4. Select:
    • Reassign all workspaces: To reassign all the workspaces associated with the selected user.
    • Select workspaces to reassign: To reassign particular workspaces associated with the selected user.
  5. Click Reassign.
After the templates and workspaces are reassigned successfully, a notification message is displayed on the User Data page with the number of templates and workspaces reassigned.

12.5 About Compute Resource

The term Compute Resource refers to services such as a database, or any other backend service to which an interpreter connects.

Note:

You must have the Administrator role to access the Compute Resources page.

The Compute Resources page displays the list of compute resources along with the name of each resource, its type, comments, and last updated details. To view details of each Compute Resource, click the Compute Resource name. The connection details are displayed on the Oracle Resources page.

12.5.1 Oracle Resource

The Oracle Resource page displays the details of the selected compute resource on the Compute Resources page. You can configure the memory settings (in Gigabytes) for the Python interpreter for the selected compute resource.

Note:

You must have Administrator privilege to configure the memory settings.
To manage memory settings for the Python interpreter:
  1. Name: Displays the name of the selected resource.
  2. Comment: Displays comment, if any.
  3. Memory: You can configure memory settings (in Gigabytes) for Python interpreters in this field.
    • For the resource databasename_high, the memory settings (in Gigabytes) must be between 8 and 16
    • For the resource databasename_medium, the memory settings (in Gigabytes) must be between 4 and 8
    • For the resource databasename_low, the memory settings (in Gigabytes) must be between 2 and 4

    Note:

    The Memory setting is applicable only for the Python interpreter.
  4. Connection Type: Displays the database connection of the resource.
  5. Network Alias: Displays the alias of the network connection.
12.5.1.1 Resource Services and Notebooks

This topic lists the number of notebooks that you can run concurrently per PDB for each Resource service.

The Resource Services and Number of Notebooks table lists the Compute Resources assigned for running of Python scripts at different Resource Service levels - High, Medium and Low. The High level is assigned the maximum number of Compute Resources to run the Python script, which could result in faster running of the scripts. The Low level is assigned the least number of Resource Services, which results in slower running of the scripts.

Table 12-1 Resource Services and Number of Notebooks

Resource Service OCPUs (Oracle CPUs) Memory Number of Concurrent Notebooks
High Up to 8 OCPUs 8 GB (up to 16 GB) Up to 3
Medium Up to 4 (OCPUs) 4 GB (up to 8 GB) Up to max (1.25 × number of OCPUs)

Note:

The number of current notebook run is calculated by the formula 1.25 x (number of OCPUs) provisioned for the corresponding PDB. OCPU stands for Oracle CPU.

For example, if a PDB is provisioned with 4 OCPUs, then the maximum number of notebooks run would be 5 (1.25 x 4) in Medium level.

Low 1 2 GB (up to 4 GB) Up to 100

12.6 Get Started with Connection Groups

A connection group, also known as a Zeppelin interpreter set, is a collection of database connections.

12.6.1 About Connection Groups

On the Connection Group page, a user with Administrator role can manage your connections that constitute the connection group.

You can Edit, and Stop one or more connections that are listed under a connection group on this page.

Note:

Only an Administrator user can manage connection groups.
The following information about the connections are available:
  • Name: This is the name of the interpreter.

  • Default: A check mark indicates whether the connection is the default connection or not.

  • Scope: Indicates the scope of the connection.

  • Comment: Displays any comment related to the interpreter.

  • Owner: Displays the name of the user who created the connection.

  • Last Updated: Indicates the date and time when the connection was last updated.

You can perform the following tasks:
  • Edit: To edit the interpreter connection, select the connection and click Edit.

  • Stop: To stop the interpreter connection, select the connection and click Stop.

  • Refresh: Click the Refresh button in the following conditions:
    • If you rename the Pluggable Database (PDB).
    • If you do a Wallet rotation. Wallet rotation invalidates the current wallet. Hence, a new Wallet is needed for the database connection.

12.6.2 About Global Connection Group

The Global Connection Group is created automatically when a new database is provisioned.

The Global Connection Group comprises the following:
  • Compute Resource definition — A Compute Resource is associated with the Pluggable Database (PDB). After a new PDB is provisioned, a Compute Resource is added for the PDB. A tenant may provision more than one PDB, and for each PDB a Compute Resource is added. The settings in the Compute Resource are relevant to its own PDB. The Compute Resource is associated to an Oracle Wallet. The Oracle wallet contains the credentials to connect to the user PDB.

    Note:

    The Compute Resource definition can be edited by the Administrator only.
  • Connection Group definition — The Global Connection Group comprises a single connection of type Global. Only one Global Connection Group for each Compute Resource is allowed per PDB. No password is required for this connection as it uses the Wallet containing the credentials for the PDB. The Wallet is associated to the Compute Resource.

    Note:

    A Global Connection Group can be edited by the Administrator only.

    Reset: To reset the interpreter connection, click the connection group name. The connection group opens on a separate page, listing all the interpreter connections in the group. Select the connection you want to reset and click Reset. When you click Reset, then all connections supported by the interpreter are closed, and all notebooks using that connection are cancelled.

    Note:

    The Reset option is available only to the Administrator.

12.6.3 Edit Oracle Database Interpreter Connection

When defining an Oracle Database interpreter connection, a reference to a compute resource is created. This reference contains all connection-related information about the interpreter.

Compute Resources for an Oracle Database interpreter is defined by your service. You can edit the following:

Note:

You must have the Administrator role to edit these fields.
  1. Name: You can edit the name of the interpreter editor here. This is useful if you have several definitions of the same interpreter type in the same interpreter set. By specifying a name, you can turn on or turn off the specific binding to a notebook.
  2. Type: This is a non-editable field. It indicates the connection type
  3. Binding Mode: This is a non-editable field. It defines the behavior of the interpreter instance in memory, and how the resources are shared. By default, the Binding Mode of the Global Connection Group is set to Scoped. It ensures that each notebook creates a new interpreter instance in the same interpreter process.
  4. Row Render Limit: This determines the number of rows to be displayed in the paragraph results when fetching a data structure that can be presented as a table or graph using the Zeppelin built-in plotting service. You must consider the browser capabilities when modifying this setting. The default limit is 1000.

    Note:

    Zeppelin plotting service works with data that is fetched previously to the client-side for a snapper UI.
  5. Comments: Enter any information related to the interpreter not exceeding 1000 characters.

    Note:

    You must have Administrator role to edit this field.
  6. In the Compute Resource section, the Resources field indicates the priority of the compute resource. This is a non-editable field.
  7. In the Database section, you can specify additional settings related to PL/SQL DBMS output. Select Enabled to allow the PL/SQL interpreter to display the messages sent to the DBMS_OUTPUT in the paragraph results.
  8. Click Save.

12.7 Get Started with Notebook Sessions

The Notebook Sessions page provides you an overview of your notebooks, and allows you to manage notebook sessions from your workspace or in workspaces where you have collaboration rights.

On the Notebook Sessions page, you unload and cancel notebook sessions. You can perform the following tasks:
  • Stop: Select the notebook that is running, and click Stop. This stops the selected notebook in the server.

  • Unload: Select the notebook that is loaded, and click Unload. This removes the selected notebook from memory on the server.

The Notebook Sessions page displays the following information about your notebooks:
  • Notebook: The name of the notebook.

  • Project: The project in which the notebook resides.

  • Workspace: The workspace in which the project is available.

  • Connection: The connection name.

  • Owner: The owner of the notebook.

  • Status: The statuses of a notebook are:
    • Loaded: Indicates that the notebook is loaded but not tied to the websocket or running.

    • Active: Indicates that the notebook is tied to the websocket but is not running.

    • Running: Indicates that the notebook paragraph is queued to run or is running.