NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Scheduling conditional task graphs with deep reinforcement learning

Anton Debner, Maximilian Krahn, Vesa HirvisaloNLDL 2024

TL;DR

This paper introduces a Deep Reinforcement Learning (DRL) scheduler designed to handle conditional task graphs in heterogeneous computing environments. The proposed DRL agent learns to efficiently schedule tasks, outperforming traditional baselines by up to 30% in average job completion time, even with dynamic task probabilities, and achieves this with less than 15 minutes of training.

What Problem Does This Paper Address?

Modern industrial applications, especially those involving complex machine learning pipelines, often benefit from being structured as conditional task graphs (TGs). In these TGs, tasks are executed sequentially, but the path taken through the graph depends on the outcome of previous tasks. This conditional nature introduces significant scheduling complexity because the exact sequence of tasks is not known in advance, making traditional scheduling algorithms that rely on predictable task flows less effective. Furthermore, the probabilities governing these conditional transitions can change dynamically due to external factors, adding another layer of difficulty. The paper aims to address this challenge by developing an intelligent scheduler that can adapt to these dynamic and uncertain task dependencies in a heterogeneous computing environment (where different processing units have varying capabilities).

Methods

The core of the paper is the design of a Deep Reinforcement Learning (DRL) agent for scheduling. The problem is framed as a Markov Decision Process (MDP), where the agent learns to make scheduling decisions by interacting with a simulated environment.

  • DRL Agent: The agent uses a Feed-Forward Neural Network (FNN) trained with the Proximal Policy Optimization (PPO) algorithm.
  • Action Space: The agent decides which task to assign to each available execution unit. To improve efficiency, action masking is used to prevent invalid assignments (e.g., assigning a task to an already busy unit or a task that isn't available).
  • Observation Space: The agent receives a state representation that includes information about queued tasks (waiting times, counts) and, crucially, an estimate of the current conditional transition probabilities within the TG. This latter feature is key to handling the dynamic nature of the problem.
  • Reward Signal: The reward is designed to minimize the average Job Completion Time (JCT). It's computed based on the change in the number of jobs in the system, making it easy to calculate and aligning with the overall goal.
  • Handling Dynamic Probabilities: Two key strategies are employed:
  • Randomized Training: Training the agent with randomized transition probabilities helps it generalize better.
  • Running Average Estimation: Including a running average of the transition probabilities in the agent's observation allows it to adapt to changing conditions during runtime.

Datasets

The paper does not use pre-existing datasets. Instead, it introduces a simulated environment and a synthetic workload.

  • Simulated Environment: A discrete-event simulator was developed to model a computing cluster with heterogeneous accelerators (CPUs and GPUs with different properties like speed and batch size).
  • Synthetic Workload: A conditional task graph (TG) was designed to represent a realistic scenario where longer, computationally intensive tasks occur rarely. The transition probabilities within this TG were varied during training and evaluation.

Key Insights and Ideas

  • Conditional TGs are a significant challenge: The inherent uncertainty in conditional task graphs makes them difficult for traditional schedulers, and this difficulty scales with dynamic transition probabilities.
  • DRL can adapt to uncertainty: The DRL agent, particularly when trained with randomized probabilities and provided with an estimate of current probabilities, demonstrates a strong ability to generalize and perform well across various dynamic scenarios.
  • Simple reward signals can be effective: A reward based on the change in the number of queued jobs, while simple to compute, effectively guides the agent towards minimizing average JCT.
  • Fast training is a major advantage: The ability to train a high-performing scheduler in under 15 minutes is a significant practical benefit, enabling rapid adaptation to changing system conditions compared to manual tuning.
  • Observation space design matters: Including an estimate of dynamic transition probabilities in the observation space significantly improves performance, especially in edge cases.

Key Results

  • Performance Improvement: The proposed DRL scheduler (policy π4) achieved up to a 30% improvement in average Job Completion Time (JCT) compared to traditional baselines (FIFO, MRU, Depth-First).
  • Fast Training: The DRL agent achieved this performance with less than 15 minutes of training on five million samples.
  • Generalization: Policies trained with randomized transition probabilities (π3 and π4) showed better generalization across different values of p(c) (the probability of a specific transition).
  • Impact of Probability Observation: Including the running average of transition probabilities (policy π4) consistently outperformed the policy without it (π3), showing a difference of over 10% at some p(c) values.
  • Low Inference Overhead: The neural network inference time was measured at less than 20 microseconds, indicating minimal overhead during operation.

Limitations and Future Work

  • Limitations:
    • The comparison with baselines is noted as "not entirely fair" because the baselines were not optimized for the heterogeneous environment.
  • While policy π4 generalizes well, other policies trained with fixed probabilities sometimes performed slightly better in specific scenarios, suggesting room for further optimization.
  • The current work uses a relatively small and simple DAG; scaling to larger or more complex DAGs might require further architectural enhancements.
  • Future Work:
    • Evaluate the scheduler in more complex environments with more dynamic transition probabilities.
  • Compare against more sophisticated, hand-tuned baselines.
  • Explore incorporating Graph Neural Networks (GNNs) into the agent's architecture to better handle larger or multiple different DAGs.
  • Investigate more advanced training strategies, such as importance sampling, to further improve policy optimization.

Summary updated

BibTeX
@inproceedings{debner2024scheduling,
  author = {Anton Debner and Maximilian Krahn and Vesa Hirvisalo},
  title = {{Scheduling conditional task graphs with deep reinforcement learning}},
  booktitle = {NLDL},
  year = {2024},
  url = {https://openreview.net/forum?id=WZSyFb5xLJ},
}
Figure