I was trying Annif version 1.3.1 in Python 3.11 venv for a combined ddc+lcsh project.
All the constituent models are working fine individually (SVC, OmikujiB, FastText) including the Basic Ensemble. But the Neural Network model is throwing some warnings/errors like this:
echo "Against injustice : the new economics of Amartya Sen / edited by Reiko Gotoh, Paul Dumouchel. ## Introduction / Reiko Gotoh and Paul Dumouchel -- Economics, law, and ethics / Amartya Sen -- Neorepublicanism and Sen's economic, legal, and ethical desiderata / Philip Pettit -- The Prajâpati test : response to Amartya Sen / Marcel Hénaff -- The power of a democratic public / Philip Pettit -- The challenge of gender justice / Martha C. Nussbaum -- Gift, market, and social justice / Marcel Hénaff -- Justice and public reciprocity / Reiko Gotoh -- Reasoning with preferences? / John Broome -- Conceptions of individual rights and freedom in welfare economics : a re-examination / Prasanta K. Pattanaik and Yongsheng Xu -- On applying synthetic indices of multidimensional well-being : health and income inequalities in France, Germany, Italy, and the United Kingdom / Andrea Brandolini -- Assessing children's capabilities : operationalizing metrics for evaluating music programs with poor children in Brazilian primary schools / Flavio Comim -- The search for socially sustainable development : conceptual and methodological issues / Jean-Luc Dubois -- Response / Amartya Sen." |
annif suggest lcsh-ddc-svc<
http://dewey.info/class/170/e23/> Ethics. 170 0.3539
<
http://dewey.info/class/338.9/e23/> Development economics. 338.9 0.2878
<
http://dewey.info/class/302.13/e23/> Social choice. 302.13 0.2845
<
http://dewey.info/class/330.1556/e23/> Social choice. 330.1556 0.2833
<
http://dewey.info/class/792.0233/e23/> Motion pictures—Production and direction. 792.0233 0.2673
<
http://dewey.info/class/541.345/e23/> Colloids. 541.345 0.2668
<
http://dewey.info/class/572.88/e23/> RNA—Metabolism. 572.88 0.2668
<
http://dewey.info/class/343.08/7/e23/> Foreign trade regulation$vCongresses. 343.08/7 0.2668
<
http://dewey.info/class/820.9001/e23/> Epic literature, English. 820.9001 0.2662
<
http://dewey.info/class/539.7/21/e23/> Particles (Nuclear physics) -- Experiments. 539.7/21 0.2661
(annif-venv) psm@psm-dlisku:~/annif-v1_3$ echo "Against injustice : the new economics of Amartya Sen / edited by Reiko Gotoh, Paul Dumouchel. ## Introduction / Reiko Gotoh and Paul Dumouchel -- Economics, law, and ethics / Amartya Sen -- Neorepublicanism and Sen's economic, legal, and ethical desiderata / Philip Pettit -- The Prajâpati test : response to Amartya Sen / Marcel Hénaff -- The power of a democratic public / Philip Pettit -- The challenge of gender justice / Martha C. Nussbaum -- Gift, market, and social justice / Marcel Hénaff -- Justice and public reciprocity / Reiko Gotoh -- Reasoning with preferences? / John Broome -- Conceptions of individual rights and freedom in welfare economics : a re-examination / Prasanta K. Pattanaik and Yongsheng Xu -- On applying synthetic indices of multidimensional well-being : health and income inequalities in France, Germany, Italy, and the United Kingdom / Andrea Brandolini -- Assessing children's capabilities : operationalizing metrics for evaluating music programs with poor children in Brazilian primary schools / Flavio Comim -- The search for socially sustainable development : conceptual and methodological issues / Jean-Luc Dubois -- Response / Amartya Sen." |
annif suggest lcsh-ddc-nn2025-06-02 03:49:08.950989: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:477] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1748816348.960328 18520 cuda_dnn.cc:8310] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
E0000 00:00:1748816348.963070 18520 cuda_blas.cc:1418] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered2025-06-01T22:19:10.625Z INFO [omikuji::model] Loading model from data/projects/lcsh-ddc-omikujiB/omikuji-model...
2025-06-01T22:19:10.625Z INFO [omikuji::model] Loading model settings from data/projects/lcsh-ddc-omikujiB/omikuji-model/settings.json...
2025-06-01T22:19:10.625Z INFO [omikuji::model] Loaded model settings Settings { n_features: 340016, classifier_loss_type: Hinge }...
2025-06-01T22:19:10.625Z INFO [omikuji::model] Loading tree from data/projects/lcsh-ddc-omikujiB/omikuji-model/tree0.cbor...
2025-06-01T22:19:10.721Z INFO [omikuji::model] Loading tree from data/projects/lcsh-ddc-omikujiB/omikuji-model/tree1.cbor...
2025-06-01T22:19:10.821Z INFO [omikuji::model] Loading tree from data/projects/lcsh-ddc-omikujiB/omikuji-model/tree2.cbor...
2025-06-01T22:19:10.915Z INFO [omikuji::model] Loaded model with 3 trees; it took 0.29s
2025-06-02 03:49:16.821469:
E external/local_xla/xla/stream_executor/cuda/cuda_driver.cc:152] failed call to cuInit: INTERNAL: CUDA error: Failed call to cuInit: UNKNOWN ERROR (303)/home/psm/annif-v1_3/annif-venv/lib/python3.10/site-packages/keras/src/models/functional.py:241: UserWarning: The structure of `inputs` doesn't match the expected structure.
Expected: ['input_layer']
Received: inputs=Tensor(shape=(1, 213879, 3))
warnings.warn(msg)<
http://dewey.info/class/170/e23/> Ethics. 170 0.1648
<
http://dewey.info/class/338.9/e23/> Development economics. 338.9 0.1090
<
http://dewey.info/class/547.05/e23/> Organometallic chemistry . 547.05 0.0537
<
http://dewey.info/class/330.1556/e23/> Social choice. 330.1556 0.0082
CUDA driver errors are okay as this laptop has no GPU though I tried these two but no effect :
CUDA_VISIBLE_DEVICES=""
| export TF_CPP_MIN_LOG_LEVEL=2
But the input type mismatch appears to be serious though it is producing LCSH labels and DDC class numbers.
Am I missing something here (installation or training dataset structuring). I have deployed 200K records for all major models but so far only 5K for the NN model.
Thanks and regards