AWS Sagemaker不更新软件包 [英] AWS Sagemaker does not update the package

查看:84
本文介绍了AWS Sagemaker不更新软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

AWS Sagemaker的笔记本电脑附带了Scikit-Learn版本0.19.1

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

我想使用0.20.2版本.为了避免每次在笔记本代码中进行更新,我尝试使用生命周期配置.我用以下代码创建了一个:

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

当我运行附带的笔记本实例并转到终端时,在 conda list 中找到的scikit-learn的版本是正确的(0.20.2).但是当我运行笔记本并导入sklearn时,该版本仍为0.19.2.

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__)

我应该在SageMaker实例上安装软件包的任何虚拟环境吗?如何修复笔记本电脑的生命周期配置?

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

推荐答案

您的conda更新未引用特定的virtualenv,而笔记本可能会引用.因此,您在笔记本virtualenv上看不到更新.

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.

这篇关于AWS Sagemaker不更新软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆