8000 [Doc] [Core] Better docs for ObjectRefGenerator vs DynamicObjectRefGenerator · Issue #52765 · ray-project/ray · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[Doc] [Core] Better docs for ObjectRefGenerator vs DynamicObjectRefGenerator #52765
Open
@wingkitlee0

Description

@wingkitlee0

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    community-backlogdocsAn issue or change related to documentationtriageNeeds triage (eg: priority, bug/not-bug, and owning component)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0