MLI: An API for Distributed Machine Learning