Dependency Injection (DI) is widely-used to construct complex objects. We present an embeddable Machine Learning (ML) framework that extends DI to optimise any measurable property of the constructed object. Unlike many modern ML approaches, the learned object is transparently represented by the types from which it is assembled. The embedded ML can be dynamically invoked in order to optimise running programs, in response to changes in operating environment. We illustrate with case studies including: fixing 451 Hadoop bugs; configuring Apache Storm and optimising Spark queries 10,000-fold.
voted / votable