Building a fully custom container for scikit-learn