ray-legacy icon indicating copy to clipboard operation
ray-legacy copied to clipboard

Pickling of functions imported by name doesn't work

Open pcmoritz opened this issue 8 years ago • 0 comments

Steps to reproduce:

  1. Install https://gym.openai.com/
  2. 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()

pcmoritz avatar Jul 27 '16 23:07 pcmoritz