HyperSched: Dynamic Resource Reallocation for Model Development on a Deadline

Richard Liaw, Romil Bhardwaj, Lisa Dunlap, Yitian Zou, Joseph E. Gonzalez, Ion Stoica, Alexey Tumanov

TL;DR

HyperSched is a deadline-aware, application-level scheduler for hyperparameter tuning that dynamically shifts compute resources from exploring new models to exploiting the best ones as a deadline approaches. By profiling scaling overheads and intelligently reallocating GPUs to top-performing trials, it ensures the best possible model is fully trained when time runs out, significantly outperforming state-of-the-art algorithms like ASHA.

What Problem Does This Paper Address?

Machine learning practitioners often operate under strict time and resource constraints—such as a nightly build cycle or a looming conference deadline. During this time, they must run a hyperparameter search to find the best model configuration and then train that specific model to completion.

Current state-of-the-art hyperparameter optimization (HPO) algorithms, like Successive Halving (SHA) or Asynchronous Successive Halving (ASHA), are great at identifying the best configuration, but they are deadline-unaware. They might start evaluating a brand-new model five minutes before a 10-hour deadline, wasting valuable compute. Furthermore, these algorithms use static resource allocations; they don't dynamically give more parallel resources (like extra GPUs) to the winning models to speed up their final training phase. HyperSched tackles the challenge of optimally balancing exploration (trying new configs) and exploitation (training the best config) under a hard deadline.

Methods

HyperSched is built on top of the Ray Tune distributed execution framework and extends the ASHA algorithm with several novel mechanisms:

  • Deadline-Aware Entrance Policy: HyperSched calculates whether a newly sampled trial actually has enough time to finish based on the impending deadline. If the time left is too short, it stops exploring new configurations entirely and focuses all resources on currently running trials.
  • Speculative Evaluation: To prevent "head-of-line blocking" (where a mediocre trial hogs resources just because it started first), HyperSched continuously compares running trials against the historical performance of all previously seen trials at that stage, pausing them early if they don't make the cut.
  • Dynamic Resource Allocation: As underperforming trials are killed off, the freed-up resources (termed "atoms," usually representing GPUs) are dynamically reallocated to the surviving, top-performing trials to accelerate their training.
  • Overhead and Scale Awareness: Resizing a distributed training job isn't free—it requires checkpointing the model, spinning down processes, and restoring them. HyperSched profiles these overheads and the model's scaling efficiency in real-time. It only resizes a job if the math guarantees the speedup will outweigh the overhead penalty.

Datasets

The authors evaluated HyperSched across a mix of synthetic and real-world workloads:

  • Synthetic Workloads: A parametric model used for ablation studies to isolate the effects of scaling overheads and scheduling policies.
  • CIFAR10: Used to train various vision models (ResNet18, ResNet50, ResNet101, ShuffleNet V2).
  • ImageNet: Used for large-scale, multi-node distributed training (ResNet50).
  • bAbI: A text reasoning and understanding dataset used to train a Memory Network (MemN2N) on CPUs, proving the scheduler works beyond vision/GPU workloads.

Key Insights and Ideas

  • Trial Disposability is a Feature: In HPO, 99% of the work is thrown away. Because only the single best model matters at the deadline, aggressively starving or killing mediocre trials to feed the best one is highly optimal.
  • The Diminishing Returns of Exploration: As a deadline approaches, the mathematical probability of randomly sampling a new hyperparameter config that beats the current best and has enough time to train drops to near zero. Schedulers must recognize this and pivot to pure exploitation.
  • Blind Scaling is Dangerous: Dynamically adding GPUs to a job can actually slow it down if the checkpoint/restore overheads or network communication costs outweigh the compute gains. Schedulers must profile these costs dynamically; otherwise, dynamic allocation backfires.

Key Results

HyperSched consistently outperformed ASHA across different models, cluster sizes, and deadlines:

  • CIFAR10 (ResNet50): Given a tight 15-minute (900s) deadline on an 8-GPU cluster, HyperSched trained a model to 87.9% accuracy, compared to ASHA's 83.3%.
  • ImageNet (ResNet50): On a 32-GPU cluster with a 2-hour deadline, HyperSched achieved 54.2% accuracy vs. ASHA's 36.7%—a massive relative improvement demonstrating its ability to handle large-scale distributed SGD.
  • Ablation Studies: The introduction of "speculative evaluation" alone improved performance in synthetic simulations by up to 50% by preventing slow, early trials from bottlenecking the cluster.

Limitations and Future Work

The authors note a few limitations in their current design:

  • Pessimistic Entrance Policy: The scheduler estimates a new job's completion time assuming it will only ever get one resource unit (atom). This might be overly conservative, as resources often free up later in the experiment.
  • Topology Ignorance: HyperSched does not manage physical worker placement. Colocating distributed workers on the same physical node significantly reduces network overhead, but HyperSched currently leaves this to the underlying framework.

Future work includes optimizing the placement of atom allocations and factoring cluster fragmentation into the exploration policy to further reduce distributed training inefficiencies.

Summary updated

BibTeX
@inproceedings{liaw2019hypersched,
  author = {Richard Liaw and Romil Bhardwaj and Lisa Dunlap and Yitian Zou and Joseph E. Gonzalez and Ion Stoica and Alexey Tumanov},
  title = {{HyperSched: Dynamic Resource Reallocation for Model Development on a Deadline}},
  booktitle = {SoCC},
  year = {2019},
  doi = {10.1145/3357223.3362719},
}
Figure