How severe does this issue affect your experience of using Ray?
- High: It blocks me to complete my task.
Hi, I am meeting a weird issue Ray cross language support kwargs not support exception, but we are actually only pass args with only one argument to the Java actor not kwargs to the constructor. This seems to be a Ray issue? Or I misunderstand the code?
self._java_actor_ref = java_actor_class.remote(config_root_path)
File "/Users/Shared/Projects/my-dsl/build/my-runtime-ray/venv/lib/python3.10/site-packages/ray/actor.py", line 535, in remote
return self._remote(args=args, kwargs=kwargs, **self._default_options)
File "/Users/Shared/Projects/my-dsl/build/my-runtime-ray/venv/lib/python3.10/site-packages/ray/actor.py", line 885, in _remote
creation_args = cross_language._format_args(worker, args, kwargs)
File "/Users/Shared/Projects/my-dsl/build/my-runtime-ray/venv/lib/python3.10/site-packages/ray/cross_language.py", line 99, in _format_args
raise TypeError("Cross language remote functions does not support kwargs.")
TypeError: Cross language remote functions does not support kwargs.
The code snippet to init the ray server and job is
from ray import serve
my_actor_def = serve.deployment(MyExecutor, max_concurrent_queries=1,
num_replicas=num_replica)
my_actor_deployment = my_actor_def.bind(workflow, modules,
init_fence, gpu_id, app_name, config_root_path, start_as_service)
serve.run(my_driver_deployment, host='0.0.0.0')
The place how we are initiatize our Java actor code within the MyExecutor
match = re.search(r"^([a-zA-Z._0-9]+)(\[[a-zA-Z_0-9]+\])?$",
"com.myspace.operators.JavaOperatorActor")
java_actor_class = ray.cross_language.java_actor_class(match.group(1))
method = match.group(2)
self._java_method = method[1:-1] if method is not None else "exec"
self._java_actor_ref = java_actor_class.remote("/users/home/path")
The ray and ray serve version is 2.5.1 python is 3.10.