ipyparallel and pymoo doesn't work
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 25/100
- Issue 類型
- 缺陷
- 描述清晰度
- 需要釐清
- 活躍度
- 停滯
- 技術堆疊
- python
研究方向
從使用 ipyparallel.Cluster、已連線的 DirectView,以及繼承自 pymoo 的 ElementwiseProblem 的 MyProblem 類別的簡化重現程式開始。使用所述相依性執行它,並檢查 dview["MyProblem"] = MyProblem 期間的失敗;完成的標準是找出遞迴原因,並記錄或修正傳輸此類別的支援方式。
由索引模型根據 Issue 內容生成。
描述
Hello all,
I am trying to use ipyparallel with a module for Genetic Algorithm (pymoo) and for that, I need to pass the class name 'MyProblem' to the clusters (don't know really why clusters are not aware but I have also the same problem with function defined in the main program). When I pass the name using 'dview["MyProblem"] = MyProblem' I am facing a recursing error.
This is the simplified code below which reproduce the error. Do you have any idea ?
import numpy as np
import ipyparallel as ipp
from pymoo.algorithms.moo.nsga2 import NSGA2
from pymoo.core.problem import ElementwiseProblem
from pymoo.optimize import minimize
# Very simplified problem
class MyProblem(ElementwiseProblem):
def __init__(self):
super().__init__(n_var = 1,
n_obj = 1,
n_constr = 0,
xl=np.array([0]),
xu=np.array([1]))
def _evaluate(self, x, out, *args, **kwargs):
# Fitness functions (values to minimize)
f1 = -x[0]
out["F"] = [f1]
# Start the clusters
nb_core = 16
rc = ipp.Cluster(n=nb_core).start_and_connect_sync()
rc.wait_for_engines(n=nb_core)
dview = rc[:]
# Send class def to all cluster for further use
dview["MyProblem"] = MyProblem
Thanks in advance for your help.
Patrick.
- 主要語言
- 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 則留言 ·
-
question
難度 5/5 一週以上 新手友好度 25/100
ipython/ipyparallel#897 · 12 則留言 ·
-
bug
難度 4/5 3-5 天 新手友好度 35/100
ipython/ipyparallel#882 ·
查看 ipython/ipyparallel 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 65/100
-
難度 2/5 1-3 小時 新手友好度 75/100
huggingface/pytorch-image-models#2800 · 1 則留言 ·
-
bug examples invalid iris
難度 2/5 1-3 小時 新手友好度 70/100
-
ai_reviewed
難度 2/5 1-3 小時 新手友好度 68/100
ydb-platform/ydb#53838 · 3 則留言 ·
-
難度 2/5 1-3 小時 新手友好度 82/100
NovaSky-AI/SkyRL#2263 ·