textcat-multilabel not compatible with textcat.correct


I have trained a textcat multilabel model using textcat.train. I now want to set up a textcat.correct instance to further improve the model.

Even though the model is multilabel, the textcat.correct inteface only allows for one choice. When several are above the threshold, all options are highlighted but only one can be chosen.

The model is trained using:
prodigy train tpb_labeller --textcat-multilabel tpb_contextcat

The textcat.correct instance is started using:
prodigy textcat.correct tpb_contextcat_correct ./tpb_model/model-last
"./input-data.json" --threshold 0.8 --component textcat_multilabel

I find this a bit odd as the example for textcat-correct (https://prodi.gy/docs/recipes#textcat-correct) shows the possibility of multilabelling (however the example code seems to be wrong).

Hi @caldissKjelmann , welcome to Prodigy!

Thanks for pointing out the error in the documentation, we'll update the example in a few (textcat.manual -> textcat.correct). I can also replicate your issue, so I'll get back to you later to give an update :slight_smile:

Hi @caldissKjelmann , just an update. I can replicate your issue and confirmed that is a bug. We'll push a fix for the next update. In the meantime, you can override the recipe in your local prodigy installation as a temporary fix.

  1. First, find the Location of your Prodigy installation by running prodigy stats . It's usually in the .local/lib/python3.X/site-packages/prodigy directory on Linux.
  2. Head to that directory, then go inside the recipes folder.
  3. Open the textcat.py file
  4. Look for the textcat.correct recipe. If you're using v1.11 version of Prodigy then you'll find it in the correct() function.
  5. In the return command, inside the "config" dictionary, replace the value of "choice_style" to "multiple". This forces Prodigy to use checkboxes instead of radio buttons so you can choose multiple options in the UI.