Annif 1.1
This release introduces CLI commands to share projects via Hugging Face Hub, takes care of various maintenance tasks and fixes minor bugs.
The 🤗 Hugging Face Hub intends to facilitate the sharing of AI models and datasets, and now Annif CLI includes upload
and download
commands, which can be used to push and pull a set of selected projects and vocabularies to and from a Hugging Face Hub repository. In this release these commands are regarded experimental; there can be changes in them in the future. See this Wiki page for more information about the commands. See also this Hugging Face Hub collection which contains the projects served at Finto AI.
Connexion dependency is upgraded to Connexion 3. From now on, when running Annif with Gunicorn, it is required to use Uvicorn workers; the workers can be set using the option --worker-class uvicorn.workers.UvicornWorker
, see Connexion 3 documentation for more details. However, Docker image users do not have to add this option because an enviroment variable in the Docker image sets the worker-class. Two changes due to the upgrade to Connexion 3 relate to the REST API:
- the header
Access-Control-Allow-Origin: *
is now included in the response only if there's an Origin header in the request, whereas before that header was sent if the Origin header was not present in the request, - the URL
/v1/projects/
used to give a 404 response, but now it redirects to the correct URL/v1/projects
.
Support for Python 3.8 is removed. Python 3.12 is supported except for NN-ensemble and STWFSA backends.
It is now possible to select the projects that Annif loads on startup using the environment variable ANNIF_PROJECTS_INIT
, which can be useful in container environments as this allows distributing resource demand across multiple Annif processes.
Supported Python versions
- 3.9, 3.10 and 3.11 are fully supported
- 3.12 is supported except NN-ensemble and STWFSA backends
Backward compatibility
- NN ensemble projects trained with Annif v1.0 or older need to be retrained; for other projects the warnings by SciKit-learn are harmless
- When using Annif with Gunicorn HTTP server the worker class needs to be set to Uvicorn with the option
--worker-class uvicorn.workers.UvicornWorker
Enhancements
#762/#760 Implement annif upload
and annif download
commands for Hugging Face Hub integration
#774/#733 Allow loading selected projects using environment variable
#736 Optimization: load a vocabulary only once even if used in different languages
#745 Show Annif version in WebUI
#751 Create SECURITY.md
Maintenance
#702/#689/#698 Upgrade to Connexion3
#780 Add partial Python 3.12 support
#770 Drop Python 3.8 support
#771/#786 Update dependencies for v1.1 release
#739 Harden GitHub Actions
#781 Make Dependabot group GitHub Actions updates into one PR
#740-#744/#750/#757/#758/#763-#766/#783 Upgrade GitHub Actions
Bug fixes
#784/#785 Add informational error message for failed loading of nn-ensemble model
#732 Fix: Add missing completion command to commands list in RTD
#773 Fix blocked http-request for version number on https site
#778 Fix project data files detection
#752 Fix tests error due to pinned Schemathesis version 3.19.* / Docker rebuild
#759 Fix installation on Python 3.8 due to missing Tensorflow-io wheel
#767 Fix tests and Docker rebuild due to defunct Schemathesis and pytest dependencies resolution
#768 Fix ReadTheDocs builds by upgrading docs build dependencies