1

I have a question a bit similar to How to kill ray tasks when the driver is dead

ray.init(f"ray://{head_ip}:10001")

@ray.remote
def compute(compute_params):
    # do some long computation
    return some_result
    

# ==== driver part
ray_res = [compute.remote(cp) for cp in many_computations]

but I wish to get the task status even if the driver submited tasks are dead. I know I can do this if I use named Actor,since it can use a name to get actor in another driver connect to the same cluster in same namespace. but it seems doesn't work for task. I hope if there is any api that I can use some thing like task_name,or future id to get the task obj again in other driver. I found I can set name of task,but there is no api I can get it by name or id.

compute.options(name="foobar").remote(compute_params)
>> ObjectRef(c8ef45ccd0112571ffffffffffffffffffffffff0100000001000000)

like

ray.get_task_by_name('foobar')

or

ray.get_task_by_id("c8ef45ccd0112571ffffffffffffffffffffffff0100000001000000")

thx to ray community,they solve my problem now there is no way to achive this now (202212),you can only use Actor,or use alpha libray https://discuss.ray.io/t/how-to-get-ray-task-again-while-the-driver-submit-the-task-died/8636

Tarjintor
  • 585
  • 4
  • 15

1 Answers1

1

That is correct, currently it is only possible to retrieve the status of a dead actor, and not task. The ability to surface dead task through the state API is planned for next release, in Ray 2.3.

Current state API is in https://docs.ray.io/en/latest/ray-observability/state/state-api.html