My use case is I am training machine learners in python to find which model is most performant. But once I have finished choosing a model, I need to recapitulate that model in C for the shippable product.
What we have been planning to do is pick apart the model in python, save all its parameters to a file, and load these in to a different model with the same structure in C. But this strikes me as unnecessarily complex if there is actually a way to save a trained model as some kind of black-box, compiled library with a predict() function.
So is there a way to compile an object with all its data to a machine-code library? All I find about saving python objects is pickling them, which is clearly not what I need.