Skip to content

Commit

Permalink
longest task first
Browse files Browse the repository at this point in the history
  • Loading branch information
JinZhou5042 committed Aug 22, 2024
1 parent 6ef5fef commit b88d261
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,11 @@ def _enqueue_dask_calls(self, dag, tag, rs, retries, enqueued_calls):

# each task has a category name
category = self.category_name(sexpr)
category_avg_execution_time = 0
if len(self.category_execution_time[category]):
category_avg_execution_time = sum(self.category_execution_time[category]) / len(self.category_execution_time[category])
else:
# if no tasks have been executed in this category, set a high priority so that we know more information about each category
category_avg_execution_time = 1e10

task_depth = dag.depth_of(k)
if self.scheduling_mode == 'random':
Expand Down

0 comments on commit b88d261

Please sign in to comment.