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

查看:21
本文介绍了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).但是我跑个notebook导入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天全站免登陆