Hi all,
I am following the example given here, python calling java. But the script hangs, and when I check the dashboard, it shows that actor is in state DEPENDENCIES_UNREADY. My code-search path is set to a directory containing the jar and the python script. I’m using Ray 1.3. Java is 1.8. Python is 3.8.8.
The script is
import ray, logging
ray.init(job_config=ray.job_config.JobConfig(code_search_path="path-to-jar"),
logging_level=logging.DEBUG,
num_cpus=2)
# Define a Java class.
counter_class = ray.java_actor_class(
"io.ray.demo.Counter")
# Create a Java actor and call actor method.
counter = counter_class.remote()
obj_ref1 = counter.increment.remote()
assert ray.get(obj_ref1) == 1
obj_ref2 = counter.increment.remote()
assert ray.get(obj_ref2) == 2
ray.shutdown()
The traceback is
WARNING worker.py:1115 – A worker died or was killed while executing task ffffffffffffffff4850062fcfdab2e5e6ce0f7d01000000.
Traceback (most recent call last):
File “test.py”, line 8, in
print(ray.get(url_future))
File “/home/lzhi/.pyenv/versions/raydp/lib/python3.8/site-packages/ray/_private/client_mode_hook.py”, line 47, in wrapper
return func(*args, **kwargs)
File “/home/lzhi/.pyenv/versions/raydp/lib/python3.8/site-packages/ray/worker.py”, line 1473, in get
values, debugger_breakpoint = worker.get_objects(
File “/home/lzhi/.pyenv/versions/raydp/lib/python3.8/site-packages/ray/worker.py”, line 301, in get_objects
data_metadata_pairs = self.core_worker.get_objects(
KeyboardInterrupt