JuliaPy / JuliaPy/PythonCall.jl

Pickle doesn't work on julia modules

Abierto
#32 7 comentarios 0 reacciones 0 asignados Ver en GitHub
bug
Lenguaje dominante
Julia
Estrellas
1.1k
Forks
86
Merge medio
1 d 22 h
PR fusionados (30 d)
3

Descripción

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.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.