Im trying to use VowpalWabbit to predict on millions of examples using the python API.
For one example
features="| feat1:23 feat2:-0.3 feat3:4245"
model.predict(features)
and it works fine. I saw that there is predict_multi but somehow when I use a list of features I get
features_list = features * 2
model.predict(features_list)
TypeError: No registered converter was able to produce a C++ rvalue of type boost::shared_ptr<VW::example> from this Python object of type str
Assuming I have 1 million records I dont want to forloop over each of them while using model.predict()
I would like to use batch predict on them.
I already know the list of features can be saved in a file and I can use commandline to predict over the entire file. But doing this adds latency I want to use Python Vowpalwabbit API
VW is primarily targeted at as an online learning system. Therefore, predict is a single prediction and does not currently support batching. The best thing to do in this case is to loop over the examples and call predict.
This is actually why I renamed
predicttopredict_onein the new Python bindings. You can check them out if you are interested.