What is the way to to set "Code Search Path" in the driver while doing Cross Language programming in K8 ray cluster?

As per the documentation, https://docs.ray.io/en/master/cross-language.html

python calling java usecase, first step to set the Code Search Path in your driver,

ray.init(job_config=ray.job_config.JobConfig(code_search_path="/path/to/code"))

This works perfectly fine when we run locally as a single node, but when we want to use the existing kubernetes cluster and want to attach to the existing address, something like below:

ray.client().connect(‘172.17.4.0:6359’)

there is no way to set this job_config or code_search_path, how can cross language programming using ray be acheived in cluster existing address?

Another way I have tried using below code:

job_config=ray.job_config.JobConfig(code_search_path=sys.path)
ray.util.connect(f"{head_service_ip}:{client_port}", job_config=job_config)

but didn’t work out, it fails to recognize the java class.
However, the same works fine when using single node locally.

@architkulkarni any help with this is appreaciated.

Is this similar to Issue in integrating Ray Serve with Ray's cross-language programming ?

Hi @Amit_Shil, thanks for bringing this up and sorry you ran into trouble! I’m not an expert on the cross-language feature but I would expect that to work. It’s possible that it’s related to the Serve issue, but that one doesn’t seem to depend on single-node vs multimode.

Would you mind creating an issue here? Sign in to GitHub · GitHub Then we can track it and have the relevant people take a look.

Hi @architkulkarni , thanks for the response, I have created the bug for this in the git hub repo.
Bug Link: Cross Language programming not being supported in Kubernetes cluster. No way to pass code_search_path in ray.client().connect() · Issue #16928 · ray-project/ray · GitHub

If someone can confirm this is a bug, that would be a great help for now.