Glue + SageMaker Pip软件包

0

【以下的问题经过翻译处理】 我的客户想要在讲Glue Dev Endpoints和SageMaker notebook一同使用,我注意到在Glue中,这里的例子是scipy,版本是1.4.1,可能与您在SageMaker笔记本中获得的版本匹配或不匹配。 conda_python3:

!pip show scipy
Name: scipy
Version: 1.1.0
Summary: SciPy: Scientific Library for Python
Home-page: https://www.scipy.org
Author: None
Author-email: None
License: BSD
Location: /home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages
Requires: 
Required-by: seaborn, scikit-learn, sagemaker

conda_tensorflow_p36:

!pip show scipy
Name: scipy
Version: 1.4.1
Summary: SciPy: Scientific Library for Python
Home-page: https://www.scipy.org
Author: None
Author-email: None
License: BSD
Location: /home/ec2-user/anaconda3/envs/tensorflow_p36/lib/python3.6/site-packages
Requires: numpy
Required-by: seaborn, scikit-learn, sagemaker, Keras

有没有一些最佳实践来使用与Glue中安装版本直接对应的内核呢?

另一个问题是,我无法通过shell激活Jupyter笔记本使用的venv。它是否正在使用venv?我为什么找不到正确的激活脚本?

profile picture
EXPERTE
gefragt vor 5 Monaten48 Aufrufe
1 Antwort
0

【以下的回答经过翻译处理】 conda_python3和conda_tensorflow_p36是SageMaker Notebook Instance的本地内核,而Spark内核在Glue Spark环境中远程执行。

因此你看到不同的版本。Glue Spark环境附带1.4.1版的scipy。因此,当你使用PySpark (python) 或 Spark (scala)内核时,你将获得1.4.1版的scipy。

如果你使用Glue SageMaker笔记本已经配备的默认LifeCycle脚本,则应该已经建立了与Glue Dev Endpoint的连接。请注意,Glue SageMaker笔记本有一个名为“aws-glue-dev-endpoint”的标签,用于标识哪个Glue Dev Endpoint与特定的Notebook Instance通信。

Spark内核不能通过python shell复制。这些内核通过名为Sparkmagic的Jupyter模块通过Livy服务将Spark命令中继到Glue Dev端点上的Spark。

Ref: https://github.com/jupyter-incubator/sparkmagic

profile picture
EXPERTE
beantwortet vor 5 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen