Ray doesn't allow "actor=" kwarg
See original GitHub issueRay v1.0
import ray
@ray.remote
class Hello:
    def __init__(self, actor):
        pass
ray.init()
hello = Hello.remote(10)  # works
hello = Hello.remote(actor=10)  # fails
Ray doesn’t allow “actor=” keyword argument. Error message: actor_method_executor() got multiple values for argument 'actor'.
I believe the internal variable “actor” should be renamed to _actor to avoid the conflict with user API.
- 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:
 - Created 3 years ago
 - Comments:5 (4 by maintainers)
 
Top Results From Across the Web
Remote functions and actors do not properly handle kwargs.
Currently, we have the following behavior. import ray ray.init() ... it looks like actor does not support default parameters value.
Read more >ray.actor — Ray 2.2.0 - the Ray documentation
The decorator must return a function that takes in two arguments ("args" and "kwargs"). In most cases, it should call the function that...
Read more >python - Remote ray call not detecting function arguments
In your example, compile_file seems to be the method of a class, but the class definition is not provided.
Read more >Ray Documentation - Read the Docs
ray.remote(*args, **kwargs). This decorator is used to define remote functions and to define actors. Parameters.
Read more >RayDemo - Databricks
If the cluster doesn't yet have Ray installed and running, ... Ray provides actors to allow you to parallelize an instance of a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

This should be fixed.
Created a patch https://github.com/ray-project/ray/issues/12181