-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Closed
Labels
enhancementRequest for new feature and/or capabilityRequest for new feature and/or capabilitygood-first-issueGreat starter issue for someone just starting to contribute to RayGreat starter issue for someone just starting to contribute to Ray
Description
Describe your feature request
The script
import ray
ray.init()
@ray.remote
async def f():
pass
ray.get(f.remote())outputs the following error:
(pid=86346) /Users/archit/ray/python/ray/worker.py:390: RuntimeWarning: coroutine 'f' was never awaited
(pid=86346) self.core_worker.run_task_loop()
2021-01-25 10:41:35,193 ERROR worker.py:1053 -- Possible unhandled error from worker: ray::f() (pid=86346, ip=192.168.1.4)
File "python/ray/_raylet.pyx", line 509, in ray._raylet.execute_task
File "python/ray/_raylet.pyx", line 510, in ray._raylet.execute_task
File "python/ray/_raylet.pyx", line 1466, in ray._raylet.CoreWorker.store_task_outputs
File "/Users/archit/ray/python/ray/serialization.py", line 319, in serialize
return self._serialize_to_msgpack(value)
File "/Users/archit/ray/python/ray/serialization.py", line 299, in _serialize_to_msgpack
self._serialize_to_pickle5(metadata, python_objects)
File "/Users/archit/ray/python/ray/serialization.py", line 259, in _serialize_to_pickle5
raise e
File "/Users/archit/ray/python/ray/serialization.py", line 256, in _serialize_to_pickle5
value, protocol=5, buffer_callback=writer.buffer_callback)
File "/Users/archit/ray/python/ray/cloudpickle/cloudpickle_fast.py", line 73, in dumps
cp.dump(obj)
File "/Users/archit/ray/python/ray/cloudpickle/cloudpickle_fast.py", line 574, in dump
return Pickler.dump(self, obj)
TypeError: can't pickle coroutine objectsThe error message could say not to use async def for remote tasks, and maybe it could also suggest wrapping the task in an async actor.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementRequest for new feature and/or capabilityRequest for new feature and/or capabilitygood-first-issueGreat starter issue for someone just starting to contribute to RayGreat starter issue for someone just starting to contribute to Ray