Packages and definitions loaded in the regular kernel are not known by engines and vice versa
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- jupyter, jupyter-notebook, python
调研方向
首先使用 %%px 和常规 kernel 重现五单元格示例,然后检查 %%px 和 %autopx 的文档化行为。该 issue 没有指定实现文件或测试;要完成这项工作,需要一种达成共识的方法,使定义和导入能够在两个执行上下文之间可用,而不要求全局 %autopx。
由索引模型根据 Issue 内容生成。
描述
Importing modules or defining functions in regular cells (without the %%px magic) are not known in cells where the %%px macro is used.
The same is true for the other way around.
To reproduce this try
# Cell 1
import ipyparallel as ipp
from mpi4py import MPI
# Cell 2
cluster = ipp.Cluster(engines="mpi", n=4)
clients = cluster.start_and_connect_sync()
# Cell 3
%%px
import sys
def abc():
print('abc')
# Cell 4
import os
def cde():
print('cde')
# Cell 5:
%%px
os.getpid()
cde()
# Cell 6:
sys.getsizeof(0.0)
abc()
Cell 5 and Cell 6 will fail on both statements in each.
A global %autopx would ensure that everything runs on the engines, which makes development kind of inconvenient (e.g. prints are done on all engines and so on).
Defining different views and activating them according to how many engines are needed, e.g. one for development with a single engine, seems overkill.
What is the recommended approach to solve the outlined problem?
- 主要语言
- Jupyter Notebook
- 星标
- 2.6k
- 派生
- 1k
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ipython/ipyparallel 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 48/100
ipython/ipyparallel#1029 · 9 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 35/100
ipython/ipyparallel#984 ·
-
难度 4/5 3-5 天 新手友好度 35/100
ipython/ipyparallel#937 · 4 条评论 ·
-
bug
难度 4/5 3-5 天 新手友好度 35/100
ipython/ipyparallel#882 ·
-
难度 4/5 3-5 天 新手友好度 30/100
ipython/ipyparallel#851 · 1 条评论 ·
查看 ipython/ipyparallel 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
huggingface/accelerate#4306 ·
-
难度 2/5 1-3 小时 新手友好度 88/100
-
bug 🐞 distributed 🕸️
难度 2/5 1-3 小时 新手友好度 82/100
CliMA/Oceananigans.jl#6049 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
-
bug
难度 2/5 1-3 小时 新手友好度 85/100
tenstorrent/tt-metal#57220 ·