diff --git a/taskvine/src/bindings/python3/ndcctools/taskvine/dask_executor.py b/taskvine/src/bindings/python3/ndcctools/taskvine/dask_executor.py index d9b21a4cd8..6f7249966e 100644 --- a/taskvine/src/bindings/python3/ndcctools/taskvine/dask_executor.py +++ b/taskvine/src/bindings/python3/ndcctools/taskvine/dask_executor.py @@ -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':