英特尔 Modin Jupyter 笔记本问题

时间:2021-06-04 15:11:48

标签: python jupyter-notebook conda modin intel-modin

modin 有两个问题

  1. 最近我无法使用以下命令创建 modin 环境:

    conda create -n aikit-modin intel-aikit-modin -c intel -c conda-forge

(如 AI Analytics 工具包 https://software.intel.com/content/www/us/en/develop/articles/installing-ai-kit-with-conda.html#gs.2irfv6 的文档链接中所述)

似乎需要更正文档。

  1. 我能够使用股票创建 modin 环境

    conda create -n stock-modin modin -c conda-forge

(引用-https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/distribution-of-modin.html#gs.2isi2d 和 Modin 大规模数据科学文档:

https://medium.com/intel-analytics-software/data-science-at-scale-with-modin-5319175e6b9a )

但是在英特尔 devcloud 的在线 JupyterLab 中尝试执行 modin 示例 NYC_Taxi.ipynb 时,我得到了一个

<块引用>

文件保存服务器错误 JupyterHub 服务器不再运行 /user/uXXXXX/api/contents/modin/examples/jupyter/NYC_Taxi.ipynb。 重启服务器在 http://jupyter.oneapi.devcloud.intel.com/hub/spawn/uXXXXX

如屏幕截图所示。我无法完成笔记本。尽管我从 stock-modin 环境创建了一个新内核,但这似乎是一个内核错误。

Screenshot

(纽约市样本来源:https://github.com/modin-project/modin/tree/master/examples

如何执行 Intel Distribution of Modin 的示例?有什么解决方法吗?

1 个答案:

答案 0 :(得分:0)

  1. conda create -n aikit-modin intel-aikit-modin -c intel -c conda-forge

这个命令需要时间来执行。由于您可以使用 stock 创建 modin 环境,因此您可以使用以下方法执行 notebook。

  1. 作为一种变通方法,devcloud 隧道是此内核错误的解决方案。打开终端,如 Cygwinvscodemobaxtermopenssh。在执行以下步骤之前,应完成 devcloud 连接的设置。请参考https://devcloud.intel.com/oneapi/documentation/shell-commands/
  2. 中的Connect to the Devcloud选项

如果您已使用上述任一终端连接到 devcloud,请按照以下步骤操作。

在第一个终端执行以下命令

ssh devcloud  //(To connect to devcloud)
qsub -I  //(to request compute node)
copy the compute node  //(it would be of this format sXXX-nXXX)
conda create -n stock-modin modin -c conda-forge  //(to create modin environment using stock)
source activate stock-modin  //(activate modin environment)
conda install pip
conda install ipykernel  //(package for creating kernels)
python -m ipykernel install --user --name myenv --display-name "Python (myenv)"  //(command to create kernels)
jupyter notebook --no-browser --port=<desired_port_number>  //(to launch Jupyter)
Copy any one of the URLs
“Or copy and paste one of these URLs:
http://localhost: <desired_port_number>/?token=2deea502bd258ed648f59eb11383bff4fd0edf5a4ce4f4f3or 
http://127.0.0.1: <desired_port_number>/?token=2deea502bd258ed648f59eb11383bff4fd0edf5a4ce4f4f3”

在另一个终端中运行以下命令:(保持第一个终端打开)

ssh -L <desired_port_number>:localhost: <desired_port_number> devcloud 
ssh -L <desired_port_number>:localhost: <desired_port_number> <compute node you copied> 
  1. 在浏览器中打开复制的 URL
  2. 您将获得 Jupyter,打开所需的笔记本。
  3. 选择您创建的内核
  4. 执行笔记本。