Reputation: 366
I was using sklearn2pmml
to export my model to .pmml
file.
How to read the PMML file back to python PMMLpipeline ?
I was checking the repo but could not find the solution in the documentation.
Upvotes: 0
Views: 611
Reputation: 4926
If you want to save a fitted Scikit-Learn pipeline so that it could be loaded back into Scikit-Learn/Python, then you need to use "native" Python serialization libraries and dataformats such as Pickle.
The conversion from Scikit-Learn to PMML should be regarded one-way operation. There is no easy way of getting PMML back into Scikit-Learn.
You can always save the fitted Scikit-Learn pipeline in multiple data formats. Save one copy in Pickle data format so that it could be loaded back into Scikit-Learn/Python, and save another copy in PMML data format so that it would be loaded in non-Python environments.
Upvotes: 3