mirror of
https://github.com/wassname/ray.git
synced 2026-08-15 12:45:23 +08:00
[xray] push warning to driver for infeasible tasks (#2784)
This PR pushes a warning to the user for infeasible tasks to alert them to the fact that they can't currently be executed. Fixes #2780.
This commit is contained in:
committed by
Robert Nishihara
parent
4db196438b
commit
fdc9688226
@@ -842,6 +842,19 @@ void NodeManager::ScheduleTasks(
|
||||
for (const auto &task : local_queues_.GetPlaceableTasks()) {
|
||||
task_dependency_manager_.TaskPending(task);
|
||||
move_task_set.insert(task.GetTaskSpecification().TaskId());
|
||||
// Push a warning to the task's driver that this task is currently infeasible.
|
||||
{
|
||||
// TODO(rkn): Define this constant somewhere else.
|
||||
std::string type = "infeasible_task";
|
||||
std::ostringstream error_message;
|
||||
error_message << "The task with ID " << task.GetTaskSpecification().TaskId()
|
||||
<< " is infeasible and cannot currently be executed. "
|
||||
<< "It requested "
|
||||
<< task.GetTaskSpecification().GetRequiredResources().ToString();
|
||||
RAY_CHECK_OK(gcs_client_->error_table().PushErrorToDriver(
|
||||
task.GetTaskSpecification().DriverId(), type, error_message.str(),
|
||||
current_time_ms()));
|
||||
}
|
||||
// Assert that this placeable task is not feasible locally (necessary but not
|
||||
// sufficient).
|
||||
RAY_CHECK(!task.GetTaskSpecification().GetRequiredResources().IsSubset(
|
||||
|
||||
Reference in New Issue
Block a user