AWS Sagemaker does not update the package

核能气质少年 提交于 2021-01-27 07:12:26

问题


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:


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.



来源:https://stackoverflow.com/questions/54184145/aws-sagemaker-does-not-update-the-package

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!