ray-legacy
ray-legacy copied to clipboard
Pickling of functions imported by name doesn't work
Steps to reproduce:
- Install https://gym.openai.com/
- Execute the following code in the shell:
from gym.envs import make
@ray.remote([], [])
def f():
env = make("Pong-ram-v0")
return
f()
It fails with the following error message:
PicklingError: Cannot pickle files that are not opened for reading: a
This on the other hand works:
import gym
@ray.remote([], [])
def f():
env = gym.envs.make("Pong-ram-v0")
return
f()