Neptune-Amazon SageMaker Integration

You can use Neptune to track experiments that you run on Amazon SageMaker.

Amazon SageMaker neptune.ai integration

To set this up, perform the following steps:

  1. Register to AWS.

    Follow the instructions to create your AWS account.

  2. Create Lifecycle configuration.

    1. Go to SageMaker Lifecycle configurations and click Create configuration.

    image

    You can choose whatever name you want – just make sure to remember it.

    1. Modify the Create Notebook script to run it only once at the creation of your SageMaker Notebook instance.

    image

    1. Copy and paste the script below to your Create Notebook tab.

      In the PARAMETERS section, choose in which environments you want to install neptune-client.

    #!/bin/bash
    
    set -e
    
    sudo -u ec2-user -i <<'EOF'
    
    # PARAMETERS
    ENVS=(
    python3
    pytorch_p36
    )
    
    # Install Neptune client library
    for env in $ENVS; do
        source /home/ec2-user/anaconda3/bin/activate $env
        pip install neptune-client
        source /home/ec2-user/anaconda3/bin/deactivate
    done
    
    # Install jupyter extension
    source /home/ec2-user/anaconda3/bin/activate JupyterSystemEnv
    pip install neptune-notebooks
    jupyter nbextension enable --py neptune-notebooks --sys-prefix
    jupyter labextension install neptune-notebooks
    source /home/ec2-user/anaconda3/bin/deactivate
    EOF
    
  3. Create a Notebook instance.

    1. Go to SageMaker Notebook instances and click Create notebook instance.

    image

    1. Type in an instance name and click Additional configuration to add the Lifecycle configuration you have just created.

    image

    1. Click Create notebook instance at the bottom to start your instance.

    image
  4. Start Notebook.

    If everything went well, your Amazon SageMaker instance should have InService status and you can open a Jupyter Notebook or JupyterLab with Neptune Notebook versioning enabled.

    image

You can now version your Notebooks and track experiments in Amazon SageMaker with Neptune!

image