kmkurn / pytorch-crf

(Linear-chain) Conditional random field in PyTorch.
https://pytorch-crf.readthedocs.io
MIT License
935 stars 151 forks source link

Github workflow fails for python 3.6 #117

Closed leejuyuu closed 4 weeks ago

leejuyuu commented 1 month ago

This is found in #116 and was also present in #113. Because the ubuntu-latest image was updated to 22.04, which does not have any installable python 3.6 tarballs, the setup-python will fail with an error message Error: Version 3.6 with arch x64 not found. This is because python 3.6 reached EOL in 2021. See https://github.com/actions/setup-python/issues/544 for more details.

We have two options to make CI work again:

  1. Test against the oldest supported (3.8) and the newest stable (3.12) releases. (See https://devguide.python.org/versions/)
  2. Pin the ubuntu test image version to 20.04.

I would suggest option 1 so people can update to the supported python versions.

kmkurn commented 1 month ago

Thank you for tracking down this issue and providing references and potential solutions. I really appreciate it! I agree that option 1 seems best. Would you be interested in creating a PR for that? I think ideally the PR should be merged before #116.

leejuyuu commented 1 month ago

Sure! I'm trying different version combinations. The minimum available torch for python 3.8 is 1.4.

Is there a reason to pin pytest and pytest-cov in the requirements? Pytest 3.2.5 gives some ModuleNotFound on python 3.12, so I would probably change that.