NatLibFi / Annif

Annif is a multi-algorithm automated subject indexing tool for libraries, archives and museums.
https://annif.org
Other
188 stars 41 forks source link

Python 3.12 support #780

Closed juhoinkinen closed 2 months ago

juhoinkinen commented 3 months ago

Annif on Python 3.12 already works when the optional dependencies stwfsapy and tensorflow-cpu are not installed or even declared as dependecies.

~Closes #779.~ At the moment does not fully close #779 because stwfsapy and NN ensemble will not work on Python 3.12.

sonarcloud[bot] commented 3 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.65%. Comparing base (44b4734) to head (3d79b67). Report is 8 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #780 +/- ## ======================================= Coverage 99.65% 99.65% ======================================= Files 89 89 Lines 6405 6405 ======================================= Hits 6383 6383 Misses 22 22 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

juhoinkinen commented 2 months ago

While Poetry cannot install TensorFlow 2.16 because of its wrong package metadata, pip can, see branch python3.12-support-tf-via-pip. TF 2.16 also upgrades to Keras 3, which required a few changes.

So it could be an option to install TF with pip instead of Poetry; this would allow upgrading to TF 2.16 and thus use of NN ensemble on Python 3.12.