Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot copy a copy of an actor #3166

Closed
llan-ml opened this issue Oct 30, 2018 · 1 comment
Closed

Cannot copy a copy of an actor #3166

llan-ml opened this issue Oct 30, 2018 · 1 comment
Labels
question Just a question :)

Comments

@llan-ml
Copy link
Contributor

llan-ml commented Oct 30, 2018

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 16.04
  • Ray installed from (source or binary): binary
  • Ray version: latest a221f55
  • Python version: 3.6.5
  • Exact command to reproduce:
import copy
import ray
from ray.rllib.utils import merge_dicts
ray.init()
@ray.remote
class Foo(object):
    def __init__(self):
        pass

foo = {"dummy": Foo.remote()}
foo_1 = merge_dicts(foo, {})
foo_2 = merge_dicts(foo_1, {})    # TypeError: a bytes-like object is required, not 'NoneType'
"""
or
"""
foo = Foo.remote()
foo_1 = copy.deepcopy(foo)
foo_2 = copy.deepcopy(foo_1)    # TypeError: a bytes-like object is required, not 'NoneType'

Is this expected?

@ericl
Copy link
Contributor

ericl commented Oct 30, 2018

I don't think actor handles are copyable via copy. You should be able to pickle and unpickle them to achieve the same thing though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Just a question :)
Projects
None yet
Development

No branches or pull requests

2 participants