AWS Sagemaker does not update the package

Viewed 1546

AWS Sagemaker's notebook comes with Scikit-Learn version 0.19.1

I would like to use version 0.20.2. To avoid updating it every time in the notebook code, I tried using the lifecycle configurations. I created one with the following code :

#!/bin/bash
set -e
/home/ec2-user/anaconda3/bin/conda install scikit-learn -y

When I run the attached notebook instance and go to the terminal, the version of scikit-learn found with conda list is correct (0.20.2). But when I run a notebook and import sklearn, the version is still 0.19.2.

import sklearn
print(sklearn.__version__)

Is there any virtual environment on the SageMaker instances where I should install the package ? How can I fix my notebook lifecycle configuration ?

1 Answers

Your conda update does not refer to a specific virtualenv, while your notebook probably does. Therefore you dont see an update on the notebook virtualenv.

Related