All problems
Straggler Step Time Impact
Problem
Given per-rank step times in milliseconds, a synchronous data-parallel step takes the slowest rank's time. Return [slowest_ms, slowdown], where slowdown = slowest / mean - 1 measures how much the straggler inflates the average.
The signature is straggler_step_time(rank_step_times_ms).
Hint
A single slow rank forces every other rank to wait at the synchronization barrier.
Test cases
case 1
in: [[100,100,100,120]]
expected: [120,0.1428571429]
case 2
in: [[50,50]]
expected: [50,0]
case 3
in: [[80,90,100]]
expected: [100,0.1111111111]
case 4
in: [[200]]
expected: [200,0]
case 5
in: [[10,20,30,40]]
expected: [40,0.6]
Starter codePython
def straggler_step_time(rank_step_times_ms):
# Your code here
pass5 test cases · run your code against them in the editor