I'm working at building a decision tree model that will be used in production.
In documentation here pickle is used to serialize the model however the concerns about this technique make me think there's maybe a better solution to export a model to production.
pickle (and joblib by extension), has some issues regarding maintainability and security. Because of this,
- Never unpickle untrusted data as it could lead to malicious code being executed upon loading.
- While models saved using one version of scikit-learn might load in other versions, this is entirely unsupported and inadvisable. It should also be kept in mind that operations performed on such data could give different and unexpected results.
So my question is : Using scikit-learn, is there a safe and convenient technique to export the model into production.
PS: Converting the dot data to a python function can be a solution but i'm surprised there's no built-in solution for this.