Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cpp/src/ray/runtime/task/task_executor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ Status TaskExecutor::ExecuteTask(
bool is_streaming_generator,
bool retry_exception,
int64_t generator_backpressure_num_objects,
int64_t num_objects_per_yield,
const std::optional<std::string> &tensor_transport) {
RAY_LOG(DEBUG) << "Execute task type: " << TaskType_Name(task_type)
<< " name:" << task_name;
Expand Down
1 change: 1 addition & 0 deletions cpp/src/ray/runtime/task/task_executor.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ class TaskExecutor {
bool is_streaming_generator,
bool retry_exception,
int64_t generator_backpressure_num_objects,
int64_t num_objects_per_yield,
/* This is used by the in-actor RDT object store. However, it is only supported in
* the Python frontend. */
const std::optional<std::string> &tensor_transport);
Expand Down
10 changes: 10 additions & 0 deletions python/ray/_common/ray_option_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,16 @@ def issubclass_safe(obj: Any, cls_: type) -> bool:
"whenever `next` is called). Use -1 to disable this feature. "
),
),
"_num_objects_per_yield": Option(
(int, type(None)),
lambda x: None
if (x is None or x > 0)
else (
"_num_objects_per_yield is a private streaming generator option "
"that must be set to a positive integer."
),
default_value=1,
),
}

_actor_only_options = {
Expand Down
Loading
Loading