JuliaPy / JuliaPy/PythonCall.jl

Pickle doesn't work on julia modules

オープン
#32 コメント 7 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
Julia
スター
1.1k
フォーク
86
平均マージ
1日 22時間
マージ済み PR(30日)
3

説明

Bit of a strange request, but there is a use case. A minimal example is:
```python
import pickle
from juliacall import Base
pickle.dumps(Base)
# Traceback (most recent call last):
# File "", line 1, in
# TypeError: cannot pickle 'juliacall.ModuleValue' object
```

This would be useful for defining functions that are passed around in Python. I initially ran into this when using ray, so a slightly more complex example that has the same behaviour:
```python
import ray
ray.init()
from juliacall import Base
@ray.remote
def v(x):
Base.println(x)
x = ray.get(v.remote(1))
```

I had a look at PyCall as well, but they've got a similar issue here https://github.com/JuliaPy/PyCall.jl/issues/863, with a few comments on how to fix it.

Any ideas? I'll try to have a look into this further, but any help getting this working would be appreciated.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。