mirror of
https://github.com/wassname/ray.git
synced 2026-08-11 11:24:51 +08:00
Render tasks that are not schedulable on the dashboard. (#7034)
This commit is contained in:
@@ -72,6 +72,7 @@ message GetNodeStatsReply {
|
||||
repeated ViewData view_data = 2;
|
||||
uint32 num_workers = 3;
|
||||
repeated TaskSpec infeasible_tasks = 4;
|
||||
repeated TaskSpec ready_tasks = 5;
|
||||
}
|
||||
|
||||
// Service for inter-node-manager communication.
|
||||
|
||||
@@ -3132,9 +3132,24 @@ void NodeManager::HandleGetNodeStats(const rpc::GetNodeStatsRequest &request,
|
||||
worker_stats->set_pid(driver->Pid());
|
||||
worker_stats->set_is_driver(true);
|
||||
}
|
||||
// NOTE(sang): Currently reporting only infeasible/ready ActorCreationTask
|
||||
// because Ray dashboard only renders actorCreationTask as of Feb 3 2020.
|
||||
// TODO(sang): Support dashboard for non-ActorCreationTask.
|
||||
for (const auto task : local_queues_.GetTasks(TaskState::INFEASIBLE)) {
|
||||
auto infeasible_task = reply->add_infeasible_tasks();
|
||||
infeasible_task->ParseFromString(task.GetTaskSpecification().Serialize());
|
||||
if (task.GetTaskSpecification().IsActorCreationTask()) {
|
||||
auto infeasible_task = reply->add_infeasible_tasks();
|
||||
infeasible_task->ParseFromString(task.GetTaskSpecification().Serialize());
|
||||
}
|
||||
}
|
||||
// Report tasks that are not scheduled because
|
||||
// resources are occupied by other actors/tasks.
|
||||
// NOTE(sang): This solution is a workaround. It can be replaced by creating a new state
|
||||
// like PENDING_UNTIL_RESOURCE_AVAILABLE.
|
||||
for (const auto task : local_queues_.GetTasks(TaskState::READY)) {
|
||||
if (task.GetTaskSpecification().IsActorCreationTask()) {
|
||||
auto ready_task = reply->add_ready_tasks();
|
||||
ready_task->ParseFromString(task.GetTaskSpecification().Serialize());
|
||||
}
|
||||
}
|
||||
// Ensure we never report an empty set of metrics.
|
||||
if (!recorded_metrics_) {
|
||||
|
||||
Reference in New Issue
Block a user