Skip to content
DeepForgeby svx
All problems

Hyperband Budget Calc

Problem

Compute the Hyperband bracket schedule for bracket index s.

For each round i from 0 to s, n_i = ceil((s + 1) / (i + 1) * eta^i) configurations run for r_i = R * eta^(-i) resources. Return a list of [n_i, r_i] pairs.

Hint

Early rounds run many configurations briefly; later rounds run few for long.

Test cases

case 1
in: [81,3,2]
expected: [[3,81],[5,27],[9,9]]
case 2
in: [16,2,3]
expected: [[4,16],[4,8],[6,4],[8,2]]
case 3
in: [10,2,0]
expected: [[1,10]]
Starter codePython
import math
def hyperband_schedule(R, eta, s):
    # Your code here
    pass

3 test cases · run your code against them in the editor