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

gev.ray.remote does not work on classes #53

Open
EkinKarabulut opened this issue Aug 2, 2023 · 0 comments
Open

gev.ray.remote does not work on classes #53

EkinKarabulut opened this issue Aug 2, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@EkinKarabulut
Copy link
Collaborator

@genv.ray.remote does not work on classes but only on methods.

When it is used before the functions, it works:

@genv.ray.remote(num_gpus=1)
def train(): 

But when it is used with classes;

@genv.ray.remote(num_gpus=1)
class Trainer:
    def train(self):

it throws the following error:

2023-07-21 08:44:38,183	INFO worker.py:1636 -- Started a local Ray instance.
Traceback (most recent call last):
  File "/home/ekinkarabulut/genv/ray_genv.py", line 105, in <module>
    main_task = trainer.train.remote()
                ^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ray._raylet.ObjectRef' object has no attribute 'train'
@EkinKarabulut EkinKarabulut added the bug Something isn't working label Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant