This is a really good example of putting ML Models into real world product engineering, nice use us adding the functions like 'which' etc in code. May I ask where did you get inspiration to do this and build this solution?
The inspiration comes from way back in the early 2000s. My team invented HTTP Live Streaming and there were a lot of performance sensitive places in the code where I was essentially making guesses on the values of buffer sizes, initial bitrates, etc and I wished that the variables could just auto-tune themselves in production.
I started working on this in earnest 7 years ago and this release is the result of countless hours of iteration and refinement. It means a lot that you feel like the API is good.