Because of the current limitation regarding the publish of scikit-learn models on Watson ML service, which does not allow any custom transformer etc (https://datascience.ibm.com/docs/content/analyze-data/ml-scikit-learn.html) in the pipeline, I ended up deploying a pipeline that only contains the SVC classifier, and not the TfidfVectorizer as well.
Which means, I need to "transform" my raw test data with the TfidfVectorizer before invoking the model on Watson ML.
This is working fine as long as I don't try the online deployment approach (which I need, since I want an app to POST a request to my model).
How should I serialise my sparse matrix from the TfidfVectorizer.transform and pass it as a json payload to the WML service ?
Thanks !