question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Class attribute in ray actor cannot be accessed/copied

See original GitHub issue

What is the problem?

Ray actor fails to access class attributes.

Ray version and other system information (Python version, TensorFlow version, OS): ray 1.0.0 Python 3.7.7

Reproduction (REQUIRED)

This code is modified from https://github.com/dask/distributed/issues/4233#issue-740152650

from module import Foo
import ray

@ray.remote
class ray_Foo:
    def __init__(self, Foo):
        self.Foo = Foo

    def show(self):
        return self.Foo.bar


ray.init()
foo = Foo()
foo.append(123)
print(foo.show())

ray_foo = ray_Foo.remote(foo)
print(ray.get(ray_foo.show.remote()))
$ cat module.py
class Foo:
    bar = []

    def append(self, value):
        self.bar.append(value)

    def show(self):
        return self.bar

$ python ray_issue_new.py
[123]
[]

If we cannot run your script, we cannot fix your issue.

  • I have verified my script runs in a clean environment and reproduces the issue.
  • I have verified the issue also occurs with the latest wheels.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:21 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
qmihaucommented, Sep 8, 2022

@rkooo567 Do you have a feel for when that might get into the work pipeline? Definitely don’t want to be pushy, but just trying to plan our work accordingly 😃

2reactions
JennyLeePMHcommented, Apr 18, 2021

Have this issues been resolved in latest version of Ray?

Read more comments on GitHub >

github_iconTop Results From Across the Web

ray.actor — Ray 2.2.0 - the Ray documentation
Attributes : _actor_ref: A weakref handle to the actor. ... actor # inherits from a class that has a method whose signature we...
Read more >
Prosecuting Intellectual Property Crimes - Department of Justice
A. Why Is Intellectual Property Enforcement Important? ... remedies, and does not have the force of law or a U.S. Department of Justice...
Read more >
Cannot innitialise superclass from Ray actor process
Moreover, I don't want to add the decorators to the Sampler class. Instead, I created a subclass of Sampler, RemoteSampler which decorates the ......
Read more >
Policies and Procedures by Department - Des Moines Area ...
AA606 - Class Size ... This policy does not apply to any certified law enforcement officer acting in the line of duty. This...
Read more >
CYBERSECURITY RISK MANAGEMENT AND BEST ...
authors noted that the “Framework is not a one-size-fits all approach to managing cybersecurity risk for critical infrastructure.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found