segment-any-text / wtpsplit

Toolkit to segment text into sentences or other semantic units in a robust, efficient and adaptable way.
MIT License
695 stars 39 forks source link

Upgrade nnsplit for python 3.10 #75

Closed wallies closed 1 year ago

bminixhofer commented 1 year ago

Hi, thanks so much for this PR! I remember trying Py310 support (ed435c4) but there was some issue, I don't recall what. Maybe it was the onnxruntime version.

What's the status of this? Should it work? And do you know why CI isn't running on this PR? I saw you made some changes to ci.yml, but nothing that should make it skip running.

wallies commented 1 year ago

Hi, thanks so much for this PR! I remember trying Py310 support (ed435c4) but there was some issue, I don't recall what. Maybe it was the onnxruntime version.

What's the status of this? Should it work? And do you know why CI isn't running on this PR? I saw you made some changes to ci.yml, but nothing that should make it skip running.

Yes I suspect it was onnxruntime. Status: I need to add the final fix I made to my fork to this PR and should be good to go. We are running 3.10 with nnsplit working nicely. I think you need to approve the workflow runs as I am a first time contributor and you have that option ticked.

If you want to test the release I made they are here https://github.com/wallies/nnsplit/releases/tag/0.5.9

orasik commented 1 year ago

Great work @wallies I have tried to install on Mac OS using assets:

pip install nnsplit -f nnsplit-0.5.9_post0-cp310-cp310-macosx_10_7_x86_64.whl
pip install nnsplit -f nnsplit-0.5.9_post0-cp38-cp38-macosx_10_7_x86_64.whl
pip install nnsplit -f nnsplit-0.5.9_post0-cp39-cp39-macosx_10_7_x86_64.whl

But all returned the same error:

Looking in links: nnsplit-0.5.9_post0-cp39-cp39-macosx_10_7_x86_64.whl
ERROR: Could not find a version that satisfies the requirement nnsplit (from versions: 0.0.1, 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.2.0, 0.2.1, 0.2.2)
ERROR: No matching distribution found for nnsplit

I also tried to install directly from your github repo with the latest tag:

pip install git+https://github.com/wallies/nnsplit.git@0.5.9

The error was:

ERROR: git+https://github.com/wallies/nnsplit.git@0.5.9 does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.
wallies commented 1 year ago

Great work @wallies I have tried to install on Mac OS using assets:

pip install nnsplit -f nnsplit-0.5.9_post0-cp310-cp310-macosx_10_7_x86_64.whl
pip install nnsplit -f nnsplit-0.5.9_post0-cp38-cp38-macosx_10_7_x86_64.whl
pip install nnsplit -f nnsplit-0.5.9_post0-cp39-cp39-macosx_10_7_x86_64.whl

But all returned the same error:

Looking in links: nnsplit-0.5.9_post0-cp39-cp39-macosx_10_7_x86_64.whl
ERROR: Could not find a version that satisfies the requirement nnsplit (from versions: 0.0.1, 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.2.0, 0.2.1, 0.2.2)
ERROR: No matching distribution found for nnsplit

I also tried to install directly from your github repo with the latest tag:

pip install git+https://github.com/wallies/nnsplit.git@0.5.9

The error was:

ERROR: git+https://github.com/wallies/nnsplit.git@0.5.9 does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.

@bminixhofer Can you try again. They are got pushed again using the new publish workflow

orasik commented 1 year ago

Thanks @wallies

Same issue. I suppose it might be related to the Apple M1 chip?

I tried the Linux one on Google Colab and it is working fine.

pip install nnsplit-0.5.9_post0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl 
wallies commented 1 year ago

Thanks @wallies

Same issue. I suppose it might be related to the Apple M1 chip?

I tried the Linux one on Google Colab and it is working fine.

pip install nnsplit-0.5.9_post0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl 

Ah yep that makes sense, I can add that to the build workflow

miraclebakelaser commented 1 year ago

Great work @wallies I have tried to install on Mac OS using assets:

pip install nnsplit -f nnsplit-0.5.9_post0-cp310-cp310-macosx_10_7_x86_64.whl
pip install nnsplit -f nnsplit-0.5.9_post0-cp38-cp38-macosx_10_7_x86_64.whl
pip install nnsplit -f nnsplit-0.5.9_post0-cp39-cp39-macosx_10_7_x86_64.whl

But all returned the same error:

Looking in links: nnsplit-0.5.9_post0-cp39-cp39-macosx_10_7_x86_64.whl
ERROR: Could not find a version that satisfies the requirement nnsplit (from versions: 0.0.1, 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.2.0, 0.2.1, 0.2.2)
ERROR: No matching distribution found for nnsplit

I also tried to install directly from your github repo with the latest tag:

pip install git+https://github.com/wallies/nnsplit.git@0.5.9

The error was:

ERROR: git+https://github.com/wallies/nnsplit.git@0.5.9 does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.

Thanks @wallies for your work on this. I have the exact same issue as @orasik, also running an M1 Mac.

wallies commented 1 year ago

Hi @orasik @miraclebakelaser I've added wheels to 0.5.10 release for Mac arm64 https://github.com/wallies/nnsplit/releases/tag/0.5.10. Also added Linux arm64 as I need it for graviton experiments

bminixhofer commented 1 year ago

Thanks @wallies! I couldn't figure out why CI wasn't running on this branch, but everything works after the merge. As of Release 5.9, Python 3.10 is supported.