Amazon SageMaker

You can use Neptune to track runs that you made on Amazon SageMaker. 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.

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

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

3) 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.

set -e
sudo -u ec2-user -i <<'EOF'
# 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
# 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

3. Create a Notebook instance

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

2) Type in an instance name and click Additional configuration to add the lifecycle configuration you have just created.

3) Click Create notebook instance at the bottom to start your instance.

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.

5. Success

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