-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Open
Labels
P2Important issue, but not time-criticalImportant issue, but not time-criticalcoreIssues that should be addressed in Ray CoreIssues that should be addressed in Ray Corecore-apidocsAn issue or change related to documentationAn issue or change related to documentation
Description
What happened + What you expected to happen
If a task is sleeping, ray.cancel
on the task doesn't cancel the task.
Also, the documentation at https://docs.ray.io/en/latest/ray-core/api/doc/ray.cancel.html#ray.cancel could be improved on the force=False
description, i.e. what will get canceled when not forced, rather than on implementation details.
Versions / Dependencies
NA
Reproduction script
import ray
import time
@ray.remote
def sleep():
time.sleep(999)
t = sleep.remote()
# Make sure the task `sleep` gets running on the worker.
time.sleep(3)
ray.cancel(t)
ray.get(t) # Should raise task cancelled errors.
Issue Severity
None
Metadata
Metadata
Assignees
Labels
P2Important issue, but not time-criticalImportant issue, but not time-criticalcoreIssues that should be addressed in Ray CoreIssues that should be addressed in Ray Corecore-apidocsAn issue or change related to documentationAn issue or change related to documentation