Hi,
I am encountering an error during the hyperparameter optimization for Annif 1.4 with the MLLM backend:
[W 2025-10-27 20:51:04,722] Trial 0 failed with parameters: {'min_samples_leaf': 26, 'max_leaf_nodes': 703, 'max_samples': 0.6243407608424335} because of the following error: TypeError("'NoneType' object is not subscriptable").
Traceback (most recent call last):
File "/Users/captsolo/.../annif_dataset_fulltext_lv/.venv/lib/python3.12/site-packages/optuna/study/_optimize.py", line 201, in _run_trial
value_or_values = func(trial)
^^^^^^^^^^^
File "/Users/captsolo/.../annif_dataset_fulltext_lv/.venv/lib/python3.12/site-packages/annif/backend/hyperopt.py", line 67, in _objective_wrapper
return cls.objective(trial, cls.args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/captsolo/.../annif_dataset_fulltext_lv/.venv/lib/python3.12/site-packages/annif/backend/mllm.py", line 59, in objective
model.fit(args["train_x"], args["train_y"])
~~~~^^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable
I am getting this error for all trials.
Could anyone suggest how to fix it?
Best regards,
Uldis