Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Core][1/3] Make streaming generator public API #38784

Merged
merged 17 commits into from
Nov 27, 2023
7 changes: 4 additions & 3 deletions python/ray/_private/ray_option_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,10 @@ def issubclass_safe(obj: Any, cls_: type) -> bool:
(int, str, type(None)),
lambda x: None
if (x is None or x == "dynamic" or x == "streaming" or x >= 0)
else "The keyword 'num_returns' only accepts None, a non-negative integer, or "
'"dynamic" (for generators)',
default_value=1,
else "Default None. The keyword 'num_returns' only accepts None, "
"a non-negative integer, or "
'"dynamic" (for generators). "dynamic" is deprecated from Ray 2.7.',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'"dynamic" (for generators). "dynamic" is deprecated from Ray 2.7.',
'"streaming" (for generators). "dynamic" is deprecated from Ray 2.7.',

?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why the default value is not 1 but None, what does None mean here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me update the comment. None basically means default.

Default behavior is 1 for regular task, and streaming for a generator task

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated the comment. Please take a look and lmk what you think

default_value=None,
rkooo567 marked this conversation as resolved.
Show resolved Hide resolved
),
"object_store_memory": Option( # override "_common_options"
(int, type(None)),
Expand Down
Loading
Loading