I have code now that takes a list of jobs and divides it up to be worked on different job runners. The code simply takes a list of all of the jobs and divides it equally into some number of bins. The solution is based on a SO post:
How do I split a list into equally-sized chunks?
This is not a great approach though. Some jobs may take a few seconds while others may take a few hours. Given this, the work is not divided evenly across all runners, even though the total number of jobs is.
I would like to split the jobs across the runners so that the amount of work each runner gets is roughly equal. For the solution, I can format the data however it is convenient, but I imagine a list of tuples similar to:
[(job, estimate), (job, estimate), ...]
I can imagine an algorithm that would get me the behavior by looking at the average of all the estimates and the total number of jobs, but given the number of libraries available in Python, I wanted to know if there was a solution already out there before I reinvent this specific wheel.