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][Streaming Generator] Fix a bug where each yield will create a new task name #37713 #37972

Merged
Merged
Show file tree
Hide file tree
Changes from 6 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
7 changes: 5 additions & 2 deletions cpp/src/ray/runtime/task/task_executor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ Status TaskExecutor::ExecuteTask(
const std::vector<ConcurrencyGroup> &defined_concurrency_groups,
const std::string name_of_concurrency_group_to_execute,
bool is_reattempt,
bool is_streaming_generator) {
bool is_streaming_generator,
bool retry_exception) {
RAY_LOG(DEBUG) << "Execute task type: " << TaskType_Name(task_type)
<< " name:" << task_name;
RAY_CHECK(ray_function.GetLanguage() == ray::Language::CPP);
Expand Down Expand Up @@ -251,6 +252,7 @@ Status TaskExecutor::ExecuteTask(
total,
meta_buffer,
std::vector<ray::ObjectID>(),
caller_address,
&task_output_inlined_bytes,
result_ptr));

Expand All @@ -277,7 +279,8 @@ Status TaskExecutor::ExecuteTask(
RAY_CHECK_OK(CoreWorkerProcess::GetCoreWorker().SealReturnObject(
result_id,
result,
/*generator_id=*/ObjectID::Nil()));
/*generator_id=*/ObjectID::Nil(),
caller_address));
} else {
if (!status.ok()) {
return ray::Status::CreationTaskError("");
Expand Down
3 changes: 2 additions & 1 deletion cpp/src/ray/runtime/task/task_executor.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ class TaskExecutor {
const std::vector<ConcurrencyGroup> &defined_concurrency_groups,
const std::string name_of_concurrency_group_to_execute,
bool is_reattempt,
bool is_streaming_generator);
bool is_streaming_generator,
bool retry_exception);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

had to pass these values because accessing worker_context_ from a async loop thread triggers the segfault. I think we should find a solution to deprecate worker_context since it doesn't work well with async actors.


virtual ~TaskExecutor(){};

Expand Down
3 changes: 2 additions & 1 deletion python/ray/_raylet.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ cdef class CoreWorker:
const CObjectID &return_id,
const CObjectID &generator_id,
size_t data_size, shared_ptr[CBuffer] &metadata, const c_vector[CObjectID]
&contained_id, int64_t *task_output_inlined_bytes,
&contained_id, const CAddress &caller_address,
int64_t *task_output_inlined_bytes,
shared_ptr[CRayObject] *return_ptr)
cdef store_task_outputs(
self,
Expand Down
Loading
Loading