How to train DeepPavlov FAQ iteratively

Hi

I am using

python3 -m deeppavlov train tfidf_logreg_en_faq

whereas I in the dataset_reader I have configured

“data_path”: “/home/foobar/faq_school_en.csv”

Instead updating the CSV and re-train DeepPavlov I would like to append new QUESTION:ANSWER tupples iteratively.

Is this possible somehow?

The most elegant would be if one could do this via the riseapi :slight_smile:
python3 -m deeppavlov riseapi tfidf_logreg_en_faq
http://0.0.0.0:5000/train?question=…&answer=…

Thanks

Michael

Hello!

Although Logistic Regression has warm_start parameter and could be retrained starting from custom initialization, it does not imply warm start with changing number of classes. Whereas when you add new question-answer pair, you add one more class. So, it’s not possible to iteratively add classes to the model now.
Anyway, logreg is fitted very fast, so, just add your own script to re-train model any time you add more question-answer pairs.

Hi @dilyararimovna, thanks very much for your reply!

I have created a REST interface to retrain and rebuild the model, whereas please see

In think this works well for a “small” set of questions/answers.