You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Annif Users
Hi,
After installing Annif 1.4 and retraining the models, I am getting the following error when using MLLM-based models:
Nov 03 15:57:24 dc-annif gunicorn[2626]: File "/srv/Annif/venv/lib/python3.12/site-packages/annif/backend/mllm.py", line 191, in _suggest Nov 03 15:57:24 dc-annif gunicorn[2626]: return prediction_to_result(prediction, params, self.project.subjects) Nov 03 15:57:24 dc-annif gunicorn[2626]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Nov 03 15:57:24 dc-annif gunicorn[2626]: File "/srv/Annif/venv/lib/python3.12/site-packages/annif/backend/mllm.py", line 43, in prediction_to_result Nov 03 15:57:24 dc-annif gunicorn[2626]: vector[subject_id] = score Nov 03 15:57:24 dc-annif gunicorn[2626]: ~~~~~~^^^^^^^^^^^^ Nov 03 15:57:24 dc-annif gunicorn[2626]: IndexError: index 53111 is out of bounds for axis 0 with size 51964
The error appears both with the "suggest" command-line command and when using Annif's web interface.
Could you suggest how to fix it?
(Retrain the models again?)
Uldis
Osma Suominen
unread,
Nov 3, 2025, 10:12:58 AMNov 3
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to annif...@googlegroups.com
Hi Uldis!
I suspect that your model and vocabulary are out of sync. The model
suggests a subject with id 53111, but your vocabulary only has 51964
subjects so an IndexError is raised.
Maybe try retraining the model? Or if you know you have loaded a
different (smaller) version of the vocabulary than the one you trained
with, you might be able to fix the problem by loading the larger vocabulary.