Managing Notebook Sessions

Learn how to work with your Data Science notebook sessions.

After you choose a project, the Project Details page is displayed and Notebook Sessions is the default view.

From the Notebook Sessions view, you can:

  • Select a notebook session to view all of its details and work with it.

  • Use the Actions icon (three dots) to view details, edit, move a notebook resource, or delete a notebook session.

  • For Created By: and OCID:, you can use Show to see the full name of the user that created the notebook session. Use Copy to copy the name to your clipboard to use elsewhere.

  • Use the List Scope filter to view notebook sessions associated with your selected project in another compartment.

  • Filter notebook sessions by status using the Notebook Session State drop-down list. The default is to view all status types.

  • When there are tags applied to notebook sessions, you can further filter notebook sessions by clicking add or clear next to Tag Filters.

Creating Notebook Sessions

You create a notebook session to access a JupyterLab environment which has pre-installed open source Python libraries and Oracle Accelerated Data Science (ADS) Python library, running on Oracle Cloud Infrastructure compute, storage, and networking.

Notebook sessions are serverless and managed by the Data Science service. All notebook sessions run in the Data Science service tenancy.

  1. Log into your tenancy with suitable policies.
  2. Open the navigation menu.
  3. Under Data and AI, click Data Sciences, and then click Projects.
  4. Click the name of the project to contain the notebook session.
  5. Click Create Notebook Session.
  6. Select the compartment that you want to contain the notebook session.
  7. (Optional, but recommended) Enter a unique name for the notebook session (limit of 255 characters). If you don't provide a name, a name is automatically generated for you. For example, datasciencenotebooksession20200108222435.
  8. Select one of the supported VM shapes.

    Data Science supports these shape families:

    • VM.Standard.E (with the exception of VM.Standard.E2.1)
    • VM.Standard2

    VM standard Compute shapes describes all of the available shapes.

  9. Enter the block volume size you want to use between 50 GB and 1,024 GB (1 TB). You can change the value by 1GB increments. The default value is 1024 GB.
  10. Select the VCN compartment that contains the VCN that you want to use.
  11. Select the VCN that you want to use.
  12. Select the subnet compartment that contains the subnet that you want to use.
  13. Select the subnet that you want to use.
  14. (Optional) Add tags to the notebook session by selecting a tag namespace, then entering the key and the value. You can add more tags to the compartment by clicking +Additional Tags, see Working with Resource Tags.
  15. (Optional) View the details for your notebook session immediately after creation by selecting Display notebook session details after creation.
Note

Because the notebook environment contains a comprehensive list of ML libraries, it can take several minutes to create a notebook session.

You are advanced to the notebook sessions page. When it is complete, the status turns to active, and you can open the notebook session.

The create notebook session action is asynchronous and initiates a work request. You can use the work request to track the status of an operation. For general information about using work requests in Oracle Cloud Infrastructure, see Work Requests and the Work Requests API.

Opening Notebook Sessions

You can either click the notebook session's name or the Actions icon (three dots), and click Open to open the notebook session’s JupyterLab interface in another tab. For more information on using JupyterLab, see JupyterLab Documentation.

Note

You can only open an active notebook session.

Viewing Notebook Session Details

To open a notebook session's detail page, you can either click the notebook session's name or the Actions icon (three dots), and select View Details.

Editing Notebook Sessions

You can either click the notebook session's name or the Actions icon (three dots), and click Edit. You can change the name of the notebook session and then save your changes.

Applying Tags to Notebook Sessions

You can either click the notebook session's name or the Actions icon (three dots), and click Add Tags or the Tags tab.

You can apply both defined and free form tags to notebook sessions using Working with Resource Tags.

Moving Notebook Session Resources

You can move a notebook session resource from its current compartment to a different one.

For example, you may want to move a notebook session to promote it from a development compartment to production compartment, or you could change the visibility of the notebook session.

You can either click the notebook session's name or the Actions icon (three dots), and click Move Resource. Select the destination compartment and click Move Resource.

Deactivating Notebook Sessions

Before you deactivate a notebook session, save your work to its attached block volume to retain your data.

You can either click the notebook session's name or the Actions icon (three dots), and click Deactivate to deactivate a notebook session after you provide confirmation. When you deactivate a notebook session, the underlying compute terminates, while the attached block volume is detached and preserved.

Caution

Any data or files stored on the compute local disk or held in memory are lost when you deactivate a notebook session. The data and files saved on the block volume are maintained while the notebook session is inactive. You can restore access to this block volume by activating the notebook session.

Activating Notebook Sessions

You can either click the notebook session's name or the Actions icon (three dots), and click Activate to activate a notebook session after you provide confirmation. When you activate a notebook session, a new compute shape is provisioned, and the block volume from the previous notebook session is restored and attached to the new compute shape.

When you activate a notebook session, any previously saved data or files on the block volume of that deactivated notebook session are available in the activated notebook session.

While activating a notebook session, you can change the previously configured compute shape, block volume size, VCN, and subnet.

Note

If you choose to change the block volume size, then you must specify a larger value than the current block volume size.

Terminating Notebook Sessions

You can either click the notebook session's name or the Actions icon (three dots), and click Terminate to terminate a notebook session after you provide confirmation. The notebook session’s underlying compute is terminated, and the block volume is deleted.

The terminate notebook session action is asynchronous and initiates a work request. You can use the work request to track the status of an operation. For general information about using work requests in Oracle Cloud Infrastructure, see Work Requests and the Work Requests API.

Caution

If you want to keep the file changes in a notebook session’s file system and attached block volume, you must back it up before you terminate the notebook session. For example, you can copy files to an object storage bucket, or commit and push changes to a Git repository outside the notebook session. Otherwise, all file changes in the notebook session’s file system and attached block volume are lost.

Using the API