JupyterLab versioning - Amazon SageMaker

JupyterLab versioning

Important

Custom IAM policies that allow Amazon SageMaker Studio or Amazon SageMaker Studio Classic to create Amazon SageMaker resources must also grant permissions to add tags to those resources. The permission to add tags to resources is required because Studio and Studio Classic automatically tag any resources they create. If an IAM policy allows Studio and Studio Classic to create resources but does not allow tagging, "AccessDenied" errors can occur when trying to create resources. For more information, see Provide Permissions for Tagging SageMaker Resources.

AWS Managed Policies for Amazon SageMaker that give permissions to create SageMaker resources already include permissions to add tags while creating those resources.

The Amazon SageMaker notebook instance interface is based on JupyterLab, which is a web-based interactive development environment for notebooks, code, and data. Notebooks now support using either JupyterLab 1 or JupyterLab 3. A single notebook instance can run a single instance of JupyterLab (at most). You can have multiple notebook instances with different JupyterLab versions.

You can configure your notebook to run your preferred JupyterLab version by selecting the appropriate platform identifier. Use either the AWS CLI or the SageMaker console when creating your notebook instance. For more information about platform identifiers, see Amazon Linux 2 vs Amazon Linux notebook instances. If you don’t explicitly configure a platform identifier, your notebook instance defaults to running JupyterLab 1.

JupyterLab 3

JupyterLab 3 support is available only on the Amazon Linux 2 operating system platform. JupyterLab 3 includes the following features that are not available in JupyterLab 1. For more information about these features, see JupyterLab 3.0 is released!.

  • Visual debugger when using the following kernels:

    • conda_pytorch_p38

    • conda_tensorflow2_p38

    • conda_amazonei_pytorch_latest_p37

  • File browser filter

  • Table of Contents (TOC)

  • Multi-language support

  • Simple mode

  • Single interface mode

  • Live editing SVG files with updated rendering

  • User interface for notebook cell tags

Important changes to JupyterLab 3

For information about important changes when using JupyterLab 3, see the following JupyterLab change logs:

Package version changes

JupyterLab 3 has the following package version changes from JupyterLab 1:

  • JupyterLab has been upgraded from 1.x to 3.x.

  • Jupyter notebook has been upgraded from 5.x to 6.x.

  • jupyterlab-git has been updated to version 0.37.1.

  • nbserverproxy 0.x (0.3.2) has been replaced with jupyter-server-proxy 3.x (3.2.1).

Creating a notebook with your JupyterLab version

You can select the JupyterLab version when creating your notebook instance from the console following the steps in Create an Amazon SageMaker notebook instance.

You can also select the JupyterLab version by passing the platform-identifier parameter when creating your notebook instance using the AWS CLI as follows:

create-notebook-instance --notebook-instance-name <NEW_NOTEBOOK_NAME> \ --instance-type <INSTANCE_TYPE> \ --role-arn <YOUR_ROLE_ARN> \ --platform-identifier <PLATFORM_TO_USE>

View the JupyterLab version of a notebook from the console

You can view the JupyterLab version of a notebook using the following procedure:

  1. Open the Amazon SageMaker console at https://console.aws.amazon.com/sagemaker/.

  2. From the left navigation, select Notebook.

  3. From the dropdown menu, select Notebook instances to navigate to the Notebook instances page.

  4. From the list of notebook instances, select your notebook instance name.

  5. On the Notebook instance settings page, view the Platform Identifier to see the JupyterLab version of the notebook.