Open Injokerash opened 8 months ago
For the second example:
import ray
import pandas as pd
ray.init("ray://ray-head:10001")
@ray.remote(max_retries=3)
def ray_data_task():
p1 = pd.DataFrame({'a': [3,4] * 10, 'b': [5,6] * 10})
ds = ray.data.from_pandas(p1)
return ds.repartition(4).to_pandas()
print(ray.get(ray_data_task.remote()))
You only need to do one of the following:
@ray.remote
decoratorray_data_task.remote()
So if you keep the decorator, you can directly call ray.get(ray_data_task)
. See the docs for more usage - https://docs.ray.io/en/latest/ray-core/api/doc/ray.remote.html
What happened + What you expected to happen
I’m trying to test ray to see what it offers, so if it suits our case, deploy a ray cluster on Kubernetes. currently, I’m using a docker-compose to test it, before deploying kube-ray.
The problem is that I get “ray.exceptions.OwnerDiedError: Failed to retrieve object” sometimes. and it has some kind of decussate pattern in it, First time it runs pretty fine and the next time I run the same code throws this error and this pattern repeats.
Ray examples in the document are not working.
Versions / Dependencies
python 3.10 ray[all]==2.9.3
Reproduction script
Code
Dockerfile
Compose file
Error
Issue Severity
High: It blocks me from completing my task.