I need to save a model (e.g. linear regression learner) and then use it in a python script.
At the moment the model is saved with a ‘model writer’ node, but the format of the file ‘modelPolinRegr’ is not usable in a script:
Hi @gp_knime,
There is no common format for machine learning models in KNIME AP that can be reused in Python code. The different algorithms usually implement their own format (except for library integrations like TensorFlow, XGBoost, etc.). Therefore, I am afraid that there is no single complete solution to loading any KNIME model in Python.
Using ONNX would be a sound approach. However, currently, there is no converter (that I know of) from any machine learning model in KNIME to ONNX.
If you want to dive deeper into the details, the source of KNIME AP is open. The implementations of the basic ML nodes can be found at GitHub/knime/knime-base.