Viewing the Conda Environments

Use the Environment Explorer to list all conda environments in a notebook session.

The Data Science service offers a series of prebuilt Data Science conda environments, and you can access them in the JupyterLab Launcher tab by clicking Environment Explorer to:

Start using the Environment Explorer by browsing through these categories of conda environments by clicking each button. Notice that each environment category has a different tab color. Each environment is displayed in a separate environment card. Each version of an environment has its own separate card.

The Environment Explorer allows you to filter conda environments by architecture, deprecation, and source type. Enabling a filter restricts the listed conda environments. By default, deprecated conda environments aren't displayed. Select the Show Deprecated to include these environments in the search results.

Enabling multiple source type filters, note the x at the end of the button, has an additive effect. Use Data Science Conda Environments to filter on conda environments that are provided by the Data Science service. Use Published Conda Environments to filter on environments that you have published. Use Installed Conda Environments to display conda environments that have been installed in the notebook session.

Within each source type filter, there are two numbers in parentheses. The first number indicates the number of conda environments that are selected. The second number indicates the total possible number of conda environments that are available in that filter source type.

You can use search to further filter the listed conda environments. It dynamically filters out conda environments that don't match your search criteria. The matched text is highlighted in each conda environment's details. By default, the search does fuzzy matching. However, it supports a powerful search language. As you type in the search field, the results are shown instantly and the matching conda environments that are relevant to the search query are displayed. The text is highlighted in yellow so that you easily can find it. You can search in these ways:

  • <Token> returns items that are a fuzzy match of <Token>

  • <Example> <Token> returns items that are a fuzzy match of <Example> and <Token>

  • <Example> | <Token> returns items that are a fuzzy match of <Example> or <Token>

  • ="<Example> <Token>"returns items that are an exact match of <Example> <Token>

  • <Token> returns items that include <Token>

  • !<Token> returns items that don't include <Token>

  • ^<Token> returns items that start with <Token>

  • !^<Token> returns items that don't start with <Token>

  • <Token>$ returns items that end with <Token>

  • !<Token>$ returns items that don't end with <Token>

The list of conda environments is cached after the Environment Explorer is opened. You can refresh the list of available environments.

The Environment Explorer provides list and card views. The button on the left side of the search bar controls the view. Both views provide information such as the title, environment version, language version, architecture, creation date, size, human-readable name, description, key libraries, and source location. It also has commands to install, uninstall, publish, and clone the environment.

The card view has each conda environment on a separate card. This view shows most of the information about a conda environment. It's convenient to use when you are only looking at a few conda environments.

The list view has a summary of each conda environment on a single line, which is ideal when you want to look at many environments. Toggling the arrow of a row shows or hide the details about the environment. You can use the column headings sort the results. Clicking a column name multiple times toggles the sorting order. All the versions of an environment are represented on a single line. If there are multiple versions of the environment, then a drop-down is available to switch between versions.

New conda environments are listed first and marked NEW at the top of the card. While deprecated environments are marked Deprecated next to the version number.

You can filter the cards using the buttons. For example, click Published Conda Environments to only view the published environments. By default, deprecated environments aren't displayed so you have to select Show Deprecated to see them. You can also filter by shape by clicking CPU or GPU. The environment buttons and Show Deprecated check box show the number of environments based on what's being filtered.

Tip

The bottom left shows the Python conda kernel and the state of the notebook next to the icons. You can change the conda environment by clicking this name or the name in the upper right corner of a notebook.

Data Science Conda Environments

The Data Science Conda Environments filter, in the Environment Explorer tab, lists the conda environments that are offered in the Data Science service. These environments are curated by the Data Science service team. The environments are focused on providing specific tools and a framework (for example, PySpark) to do machine learning work (for example, General Machine Learning for GPUs). Or providing a comprehensive environment to solve business use cases.

You can use the odsc conda CLI to list Data Science conda environments directly from a terminal window with:

odsc conda list

You can use the optional arguments -o to list the published conda environments or -l to list the Installed Conda Environments.

Each Data Science conda environment comes with its own set of notebook examples, which help you get started with the libraries installed in the environment. These environments are updated regularly, and new ones are periodically added to the list, see Data Science Environments.

Note

Older versions of a given Data Science conda environment remain available for installation. To use a Data Science conda environment, you must install it in your notebook session.
Caution

To access the Data Science conda environment in your notebook session, you must configure your VCN and subnet so that traffic is routed through either the service or the NAT gateway. Otherwise, your notebook session can't read the Data Science Environments.

Installed Conda Environments

The Installed Conda Environments tab in the Environment Explorer tab lists the conda environments that are currently installed and available to use in your notebook session.

Important

All new notebook sessions have no conda environments installed so you have to install one of the Data Science conda environments, see Installing Conda Environments in a Notebook Session.

You can also create a conda environment in your notebook session. All created conda environments are in the Installed Conda Environments category.

You can install either Data Science or published conda environments. All Installed Conda Environments are stored in your Block Volume in the /home/datascience/conda directory.

When a notebook session is deactivated and reactivated, all previously installed conda environments are available to use again. Reactivation ensures that you don't have to reinstall Python dependencies after activating a notebook session.

Published Conda Environments

Click Published Conda Environments in the Environment Explorer tab to list all the published conda environments that are available in your designated Object Storage bucket.
Important

Before being able to list a published conda environment, you need to run odsc conda init specifying your bucket name and namespace, see Publishing a Conda Environment to an Object Storage Bucket in a Tenancy.

Alternatively, you can use the odsc conda CLI to list published conda environments directly from a terminal window by executing:

odsc conda list -o

If you haven't published any conda environments, then an informational message appears.

After a conda environment is installed in a notebook session, you can run notebooks, install additional Python libraries, and modify the versions of libraries inside that conda environment. Publishing a conda environment allows you to save or archive the conda environment to an Object Storage bucket that you manage.

Following are some of the benefits to publishing a conda environment:

Ability to share with a team:

Once a conda environment is published, it becomes available to other team members who have access to the same Object Storage bucket. You can install previously Published Conda Environments in your notebook session in the same way that you can install pre-built Data Science Environments. This lets data scientists manage and share environments across teams. You can share conda environments across notebook sessions, which was not possible previously.

Model reproducibility:

Whenever a model is saved to the model catalog, ADS allows you to publish the conda environment that the model was trained in. ADS keeps a reference of that environment in the runtime.yaml file, which is part of the model artifact. If you need to audit a model, you retrieve the exact conda environment that the model was trained in by reinstalling the training conda environment that is referred to in your runtime.yaml file.

Important

Before you can publish environments, you need to specify the namespace and the bucket that you want to use to store the conda environments. You do this with the odsc conda init command. Make sure that you use either resource principals, or that you have setup the proper configuration and key files to let odsc conda read and write to the Object Storage bucket.