GPU environments (Jupyter notebooks with Python for GPU)

With GPU environments, you can reduce the training time needed for compute-intensive machine learning models you create in a notebook. With more compute power, you can run more training iterations while fine-tuning your machine learning models.

Service GPU environments are not available by default. An administrator must install the Jupyter notebooks with Python GPU service on the IBM Cloud Pak for Data platform. Although you can install the Jupyter notebooks with Python 3.6 GPU service, you should start using the Jupyter notebooks with Python 3.7 GPU service as Python 3.6 is deprecated. To determine whether the service is installed, open the Services catalog and check whether the service is enabled.

GPU environment definitions

Watson Studio doesn’t offer any default GPU environments. To use a GPU environment, you must create a new GPU environment definition.

You must have the Admin or Editor role within the project to create an environment definition.

To create a GPU environment definition:

  1. From the Environments tab in your project, click New environment definition.
  2. Enter a name and a description.
  3. Select the GPU environment configuration type.
  4. Select the hardware configuration dependent on the complexity of the model operations and the number of model training iterations you’d like to perform.
    • Specify the GPU, CPU and RAM sizes. The default size is 1 GPU and 1 vCPU and 2 GB RAM.
  5. Select the software version:
    • Default Python 3.7 or Default Python 3.6

The environment definition details are displayed. You can change your hardware settings by hovering over the setting.

The GPU environment definitions include a variety of pre-installed open source libraries. If you want to add your own custom libraries, you can create a customization. See Customizing environment definitions.

Using GPU environments in notebooks

After you have created a GPU environment definition, you can select to run your notebook in that environment at the time you create the notebook. GPU environments are available for the Python notebook language only.

In a project, you can create more than one notebook with the same GPU environment definition. Every notebook kernel runs in the same runtime instance in this case and the resources are shared.

You can edit an existing GPU environment definition after a notebook is created; however, to use the changed environment configuration, you must restart the runtime.

You can restart a GPU runtime from the Environment tab when you click the Notebook Info icon if the notebook is open in edit mode.

Next steps