From 4f1f5588026e21247d30bb50e2a2374529e10987 Mon Sep 17 00:00:00 2001 From: Simon Mo Date: Wed, 27 Jan 2021 19:01:56 -0800 Subject: [PATCH] [Core] Hotfix Windows Compilation Error for ClusterTaskManager (#13754) * [Core] Hotfix Windows Compilation Error for ClusterTaskManager * fix --- src/ray/raylet/scheduling/cluster_task_manager.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/ray/raylet/scheduling/cluster_task_manager.cc b/src/ray/raylet/scheduling/cluster_task_manager.cc index 43c6ce1cc..a4dbff1f4 100644 --- a/src/ray/raylet/scheduling/cluster_task_manager.cc +++ b/src/ray/raylet/scheduling/cluster_task_manager.cc @@ -618,15 +618,15 @@ bool ClusterTaskManager::AnyPendingTasks(Task *exemplar, bool *any_pending, std::string ClusterTaskManager::DebugStr() const { // TODO(Shanly): This method will be replaced with `DebugString` once we remove the // legacy scheduler. - auto accumulator = [](int state, const std::pair> &pair) { + auto accumulator = [](size_t state, const std::pair> &pair) { return state + pair.second.size(); }; - int num_infeasible_tasks = - std::accumulate(infeasible_tasks_.begin(), infeasible_tasks_.end(), 0, accumulator); - int num_tasks_to_schedule = std::accumulate(tasks_to_schedule_.begin(), - tasks_to_schedule_.end(), 0, accumulator); - int num_tasks_to_dispatch = std::accumulate(tasks_to_dispatch_.begin(), - tasks_to_dispatch_.end(), 0, accumulator); + size_t num_infeasible_tasks = std::accumulate( + infeasible_tasks_.begin(), infeasible_tasks_.end(), (size_t)0, accumulator); + size_t num_tasks_to_schedule = std::accumulate( + tasks_to_schedule_.begin(), tasks_to_schedule_.end(), (size_t)0, accumulator); + size_t num_tasks_to_dispatch = std::accumulate( + tasks_to_dispatch_.begin(), tasks_to_dispatch_.end(), (size_t)0, accumulator); std::stringstream buffer; buffer << "========== Node: " << self_node_id_ << " =================\n"; buffer << "Infeasible queue length: " << num_infeasible_tasks << "\n";