Open
Description
Description
There should be some documentation to highlight the differences between: ObjectRefGenerator
vs DynamicObjectRefGenerator
.
Their respective page did not mention each other (at least not explicitly). However, the only syntax difference is whether num_returns="dynamic"
is specified:
@ray.remote # or @ray.remote(num_returns="dynamic")
def g(n):
for i in range(n):
yield n + i
It will be great to highlight:
- their recommended use case
- limitations, e.g., ObjectRefGenerator is non-serializable and cannot be passed into other remote function; but a ref of DORG can be p 5BEA assed as arg.
Link
https://docs.ray.io/en/latest/ray-core/ray-generator.html
https://docs.ray.io/en/latest/ray-core/tasks/generators.html
^ this page mentions
Similarly, you can also pass an ObjectRefGenerator as a task argument.
which may be incorrect?