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.
1
#!/bin/bash
2
3
set -e
4
5
sudo -u ec2-user -i <<'EOF'
6
7
# PARAMETERS
8
ENVS=(
9
python3
10
pytorch_p36
11
)
12
13
# Install Neptune client library
14
for env in $ENVS; do
15
source /home/ec2-user/anaconda3/bin/activate $env
16
pip install neptune-client
17
source /home/ec2-user/anaconda3/bin/deactivate
18
done
19
20
# Install jupyter extension
21
source /home/ec2-user/anaconda3/bin/activate JupyterSystemEnv
22
pip install neptune-notebooks
23
jupyter nbextension enable --py neptune-notebooks --sys-prefix
24
jupyter labextension install neptune-notebooks
25
source /home/ec2-user/anaconda3/bin/deactivate
26
EOF
Copied!

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!
Last modified 8mo ago