Automated discovery of machine learning optimizations