Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

span_marker 1.6.0: Add missing sklearn (scikit-learn) dependency #69

Open
sanmai-NL opened this issue Dec 5, 2024 · 7 comments
Open

Comments

@sanmai-NL
Copy link

sanmai-NL commented Dec 5, 2024

================================================================================== test session starts ===================================================================================
platform darwin -- Python 3.12.6, pytest-8.3.4, pluggy-1.5.0
rootdir: /Users/myuser/devel/app
configfile: pyproject.toml
testpaths: tests
plugins: asyncio-0.24.0, time-machine-2.16.0, anyio-4.6.2.post1
asyncio: mode=Mode.STRICT, default_loop_scope=function
collected 1 item / 1 error                                                                                                                                                               

========================================================================================= ERRORS =========================================================================================
________________________________________________________________ ERROR collecting tests/dirty_data_dive/test_partners.py _________________________________________________________________
ImportError while importing test module '/Users/myuser/devel/app/tests/dirty_data_dive/test_partners.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/dirty_data_dive/test_partners.py:8: in <module>
    from app.dirty_data_dive import KnowledgePlatformDocument
src/main/dirty_data_dive/__init__.py:11: in <module>
    from span_marker import SpanMarkerModel
.venv/lib/python3.12/site-packages/span_marker/__init__.py:16: in <module>
    from span_marker.trainer import Trainer
.venv/lib/python3.12/site-packages/span_marker/trainer.py:19: in <module>
    from span_marker.evaluation import compute_f1_via_seqeval
.venv/lib/python3.12/site-packages/span_marker/evaluation.py:6: in <module>
    from sklearn.exceptions import UndefinedMetricWarning
E   ModuleNotFoundError: No module named 'sklearn'
@sanmai-NL sanmai-NL changed the title span_marker 1.6.0: Add missing sklearn dependency span_marker 1.6.0: Add missing sklearn (scikit-learn) dependency Dec 5, 2024
@tomaarsen
Copy link
Owner

Hmm, that's odd. I believe sklearn is an indirect required dependency due to seqeval: https://github.com/chakki-works/seqeval/blob/master/setup.py#L25
But I can add it directly as well.

  • Tom Aarsen

@sanmai-NL
Copy link
Author

@tomaarsen These are the dependencies my resolver (uv) finds:

├── span-marker 1.6.0 [ required: >=1.6.0 ]
│   ├── accelerate 1.1.1 [ required: Any ]
│   │   ├── huggingface-hub 0.26.3 [ required: >=0.21.0 ]
│   │   │   ├── filelock 3.16.1 [ required: Any ]
│   │   │   ├── fsspec 2024.9.0 [ required: >=2023.5.0 ]
│   │   │   ├── packaging 24.2 [ required: >=20.9 ]
│   │   │   ├── pyyaml 6.0.2 [ required: >=5.1 ]
│   │   │   ├── requests 2.32.3 [ required: Any ]
│   │   │   │   ├── certifi 2024.8.30 [ required: >=2017.4.17 ]
│   │   │   │   ├── charset-normalizer 3.4.0 [ required: <4,>=2 ]
│   │   │   │   ├── idna 3.10 [ required: <4,>=2.5 ]
│   │   │   │   └── urllib3 2.2.3 [ required: <3,>=1.21.1 ]
│   │   │   ├── tqdm 4.67.1 [ required: >=4.42.1 ]
│   │   │   └── typing-extensions 4.12.2 [ required: >=3.7.4.3 ]
│   │   ├── numpy 2.0.2 [ required: <3.0.0,>=1.17 ]
│   │   ├── packaging 24.2 [ required: >=20.0 ]
│   │   ├── psutil 6.1.0 [ required: Any ]
│   │   ├── pyyaml 6.0.2 [ required: Any ]
│   │   ├── safetensors 0.4.5 [ required: >=0.4.3 ]
│   │   └── torch 2.5.1 [ required: >=1.10.0 ]
│   │       ├── filelock 3.16.1 [ required: Any ]
│   │       ├── fsspec 2024.9.0 [ required: Any ]
│   │       ├── jinja2 3.1.4 [ required: Any ]
│   │       │   └── markupsafe 3.0.2 [ required: >=2.0 ]
│   │       ├── networkx 3.4.2 [ required: Any ]
│   │       ├── setuptools 75.6.0 [ required: Any ]
│   │       ├── sympy 1.13.1 [ required: ==1.13.1 ]
│   │       │   └── mpmath 1.3.0 [ required: <1.4,>=1.1.0 ]
│   │       └── typing-extensions 4.12.2 [ required: >=4.8.0 ]
│   ├── datasets 3.1.0 [ required: >=2.14.0 ]
│   │   ├── aiohttp 3.11.9 [ required: Any ]
│   │   │   ├── aiohappyeyeballs 2.4.4 [ required: >=2.3.0 ]
│   │   │   ├── aiosignal 1.3.1 [ required: >=1.1.2 ]
│   │   │   │   └── frozenlist 1.5.0 [ required: >=1.1.0 ]
│   │   │   ├── attrs 24.2.0 [ required: >=17.3.0 ]
│   │   │   ├── frozenlist 1.5.0 [ required: >=1.1.1 ]
│   │   │   ├── multidict 6.1.0 [ required: <7.0,>=4.5 ]
│   │   │   ├── propcache 0.2.1 [ required: >=0.2.0 ]
│   │   │   └── yarl 1.18.3 [ required: <2.0,>=1.17.0 ]
│   │   │       ├── idna 3.10 [ required: >=2.0 ]
│   │   │       ├── multidict 6.1.0 [ required: >=4.0 ]
│   │   │       └── propcache 0.2.1 [ required: >=0.2.0 ]
│   │   ├── dill 0.3.8 [ required: <0.3.9,>=0.3.0 ]
│   │   ├── filelock 3.16.1 [ required: Any ]
│   │   ├── fsspec[http] 2024.9.0 [ required: <=2024.9.0,>=2023.1.0 ]
│   │   │   └── aiohttp 3.11.9 [ required: !=4.0.0a0,!=4.0.0a1 ]
│   │   │       ├── aiohappyeyeballs 2.4.4 [ required: >=2.3.0 ]
│   │   │       ├── aiosignal 1.3.1 [ required: >=1.1.2 ]
│   │   │       │   └── frozenlist 1.5.0 [ required: >=1.1.0 ]
│   │   │       ├── attrs 24.2.0 [ required: >=17.3.0 ]
│   │   │       ├── frozenlist 1.5.0 [ required: >=1.1.1 ]
│   │   │       ├── multidict 6.1.0 [ required: <7.0,>=4.5 ]
│   │   │       ├── propcache 0.2.1 [ required: >=0.2.0 ]
│   │   │       └── yarl 1.18.3 [ required: <2.0,>=1.17.0 ]
│   │   │           ├── idna 3.10 [ required: >=2.0 ]
│   │   │           ├── multidict 6.1.0 [ required: >=4.0 ]
│   │   │           └── propcache 0.2.1 [ required: >=0.2.0 ]
│   │   ├── huggingface-hub 0.26.3 [ required: >=0.23.0 ]
│   │   │   ├── filelock 3.16.1 [ required: Any ]
│   │   │   ├── fsspec 2024.9.0 [ required: >=2023.5.0 ]
│   │   │   ├── packaging 24.2 [ required: >=20.9 ]
│   │   │   ├── pyyaml 6.0.2 [ required: >=5.1 ]
│   │   │   ├── requests 2.32.3 [ required: Any ]
│   │   │   │   ├── certifi 2024.8.30 [ required: >=2017.4.17 ]
│   │   │   │   ├── charset-normalizer 3.4.0 [ required: <4,>=2 ]
│   │   │   │   ├── idna 3.10 [ required: <4,>=2.5 ]
│   │   │   │   └── urllib3 2.2.3 [ required: <3,>=1.21.1 ]
│   │   │   ├── tqdm 4.67.1 [ required: >=4.42.1 ]
│   │   │   └── typing-extensions 4.12.2 [ required: >=3.7.4.3 ]
│   │   ├── multiprocess 0.70.16 [ required: <0.70.17 ]
│   │   │   └── dill 0.3.8 [ required: >=0.3.8 ]
│   │   ├── numpy 2.0.2 [ required: >=1.17 ]
│   │   ├── packaging 24.2 [ required: Any ]
│   │   ├── pandas 2.2.3 [ required: Any ]
│   │   │   ├── numpy 2.0.2 [ required: >=1.26.0 ]
│   │   │   ├── python-dateutil 2.9.0.post0 [ required: >=2.8.2 ]
│   │   │   │   └── six 1.17.0 [ required: >=1.5 ]
│   │   │   ├── pytz 2024.2 [ required: >=2020.1 ]
│   │   │   └── tzdata 2024.2 [ required: >=2022.7 ]
│   │   ├── pyarrow 18.1.0 [ required: >=15.0.0 ]
│   │   ├── pyyaml 6.0.2 [ required: >=5.1 ]
│   │   ├── requests 2.32.3 [ required: >=2.32.2 ]
│   │   │   ├── certifi 2024.8.30 [ required: >=2017.4.17 ]
│   │   │   ├── charset-normalizer 3.4.0 [ required: <4,>=2 ]
│   │   │   ├── idna 3.10 [ required: <4,>=2.5 ]
│   │   │   └── urllib3 2.2.3 [ required: <3,>=1.21.1 ]
│   │   ├── tqdm 4.67.1 [ required: >=4.66.3 ]
│   │   └── xxhash 3.5.0 [ required: Any ]
│   ├── evaluate 0.4.3 [ required: Any ]
│   │   ├── datasets 3.1.0 [ required: >=2.0.0 ]
│   │   │   ├── aiohttp 3.11.9 [ required: Any ]
│   │   │   │   ├── aiohappyeyeballs 2.4.4 [ required: >=2.3.0 ]
│   │   │   │   ├── aiosignal 1.3.1 [ required: >=1.1.2 ]
│   │   │   │   │   └── frozenlist 1.5.0 [ required: >=1.1.0 ]
│   │   │   │   ├── attrs 24.2.0 [ required: >=17.3.0 ]
│   │   │   │   ├── frozenlist 1.5.0 [ required: >=1.1.1 ]
│   │   │   │   ├── multidict 6.1.0 [ required: <7.0,>=4.5 ]
│   │   │   │   ├── propcache 0.2.1 [ required: >=0.2.0 ]
│   │   │   │   └── yarl 1.18.3 [ required: <2.0,>=1.17.0 ]
│   │   │   │       ├── idna 3.10 [ required: >=2.0 ]
│   │   │   │       ├── multidict 6.1.0 [ required: >=4.0 ]
│   │   │   │       └── propcache 0.2.1 [ required: >=0.2.0 ]
│   │   │   ├── dill 0.3.8 [ required: <0.3.9,>=0.3.0 ]
│   │   │   ├── filelock 3.16.1 [ required: Any ]
│   │   │   ├── fsspec[http] 2024.9.0 [ required: <=2024.9.0,>=2023.1.0 ]
│   │   │   │   └── aiohttp 3.11.9 [ required: !=4.0.0a0,!=4.0.0a1 ]
│   │   │   │       ├── aiohappyeyeballs 2.4.4 [ required: >=2.3.0 ]
│   │   │   │       ├── aiosignal 1.3.1 [ required: >=1.1.2 ]
│   │   │   │       │   └── frozenlist 1.5.0 [ required: >=1.1.0 ]
│   │   │   │       ├── attrs 24.2.0 [ required: >=17.3.0 ]
│   │   │   │       ├── frozenlist 1.5.0 [ required: >=1.1.1 ]
│   │   │   │       ├── multidict 6.1.0 [ required: <7.0,>=4.5 ]
│   │   │   │       ├── propcache 0.2.1 [ required: >=0.2.0 ]
│   │   │   │       └── yarl 1.18.3 [ required: <2.0,>=1.17.0 ]
│   │   │   │           ├── idna 3.10 [ required: >=2.0 ]
│   │   │   │           ├── multidict 6.1.0 [ required: >=4.0 ]
│   │   │   │           └── propcache 0.2.1 [ required: >=0.2.0 ]
│   │   │   ├── huggingface-hub 0.26.3 [ required: >=0.23.0 ]
│   │   │   │   ├── filelock 3.16.1 [ required: Any ]
│   │   │   │   ├── fsspec 2024.9.0 [ required: >=2023.5.0 ]
│   │   │   │   ├── packaging 24.2 [ required: >=20.9 ]
│   │   │   │   ├── pyyaml 6.0.2 [ required: >=5.1 ]
│   │   │   │   ├── requests 2.32.3 [ required: Any ]
│   │   │   │   │   ├── certifi 2024.8.30 [ required: >=2017.4.17 ]
│   │   │   │   │   ├── charset-normalizer 3.4.0 [ required: <4,>=2 ]
│   │   │   │   │   ├── idna 3.10 [ required: <4,>=2.5 ]
│   │   │   │   │   └── urllib3 2.2.3 [ required: <3,>=1.21.1 ]
│   │   │   │   ├── tqdm 4.67.1 [ required: >=4.42.1 ]
│   │   │   │   └── typing-extensions 4.12.2 [ required: >=3.7.4.3 ]
│   │   │   ├── multiprocess 0.70.16 [ required: <0.70.17 ]
│   │   │   │   └── dill 0.3.8 [ required: >=0.3.8 ]
│   │   │   ├── numpy 2.0.2 [ required: >=1.17 ]
│   │   │   ├── packaging 24.2 [ required: Any ]
│   │   │   ├── pandas 2.2.3 [ required: Any ]
│   │   │   │   ├── numpy 2.0.2 [ required: >=1.26.0 ]
│   │   │   │   ├── python-dateutil 2.9.0.post0 [ required: >=2.8.2 ]
│   │   │   │   │   └── six 1.17.0 [ required: >=1.5 ]
│   │   │   │   ├── pytz 2024.2 [ required: >=2020.1 ]
│   │   │   │   └── tzdata 2024.2 [ required: >=2022.7 ]
│   │   │   ├── pyarrow 18.1.0 [ required: >=15.0.0 ]
│   │   │   ├── pyyaml 6.0.2 [ required: >=5.1 ]
│   │   │   ├── requests 2.32.3 [ required: >=2.32.2 ]
│   │   │   │   ├── certifi 2024.8.30 [ required: >=2017.4.17 ]
│   │   │   │   ├── charset-normalizer 3.4.0 [ required: <4,>=2 ]
│   │   │   │   ├── idna 3.10 [ required: <4,>=2.5 ]
│   │   │   │   └── urllib3 2.2.3 [ required: <3,>=1.21.1 ]
│   │   │   ├── tqdm 4.67.1 [ required: >=4.66.3 ]
│   │   │   └── xxhash 3.5.0 [ required: Any ]
│   │   ├── dill 0.3.8 [ required: Any ]
│   │   ├── fsspec[http] 2024.9.0 [ required: >=2021.05.0 ]
│   │   │   └── aiohttp 3.11.9 [ required: !=4.0.0a0,!=4.0.0a1 ]
│   │   │       ├── aiohappyeyeballs 2.4.4 [ required: >=2.3.0 ]
│   │   │       ├── aiosignal 1.3.1 [ required: >=1.1.2 ]
│   │   │       │   └── frozenlist 1.5.0 [ required: >=1.1.0 ]
│   │   │       ├── attrs 24.2.0 [ required: >=17.3.0 ]
│   │   │       ├── frozenlist 1.5.0 [ required: >=1.1.1 ]
│   │   │       ├── multidict 6.1.0 [ required: <7.0,>=4.5 ]
│   │   │       ├── propcache 0.2.1 [ required: >=0.2.0 ]
│   │   │       └── yarl 1.18.3 [ required: <2.0,>=1.17.0 ]
│   │   │           ├── idna 3.10 [ required: >=2.0 ]
│   │   │           ├── multidict 6.1.0 [ required: >=4.0 ]
│   │   │           └── propcache 0.2.1 [ required: >=0.2.0 ]
│   │   ├── huggingface-hub 0.26.3 [ required: >=0.7.0 ]
│   │   │   ├── filelock 3.16.1 [ required: Any ]
│   │   │   ├── fsspec 2024.9.0 [ required: >=2023.5.0 ]
│   │   │   ├── packaging 24.2 [ required: >=20.9 ]
│   │   │   ├── pyyaml 6.0.2 [ required: >=5.1 ]
│   │   │   ├── requests 2.32.3 [ required: Any ]
│   │   │   │   ├── certifi 2024.8.30 [ required: >=2017.4.17 ]
│   │   │   │   ├── charset-normalizer 3.4.0 [ required: <4,>=2 ]
│   │   │   │   ├── idna 3.10 [ required: <4,>=2.5 ]
│   │   │   │   └── urllib3 2.2.3 [ required: <3,>=1.21.1 ]
│   │   │   ├── tqdm 4.67.1 [ required: >=4.42.1 ]
│   │   │   └── typing-extensions 4.12.2 [ required: >=3.7.4.3 ]
│   │   ├── multiprocess 0.70.16 [ required: Any ]
│   │   │   └── dill 0.3.8 [ required: >=0.3.8 ]
│   │   ├── numpy 2.0.2 [ required: >=1.17 ]
│   │   ├── packaging 24.2 [ required: Any ]
│   │   ├── pandas 2.2.3 [ required: Any ]
│   │   │   ├── numpy 2.0.2 [ required: >=1.26.0 ]
│   │   │   ├── python-dateutil 2.9.0.post0 [ required: >=2.8.2 ]
│   │   │   │   └── six 1.17.0 [ required: >=1.5 ]
│   │   │   ├── pytz 2024.2 [ required: >=2020.1 ]
│   │   │   └── tzdata 2024.2 [ required: >=2022.7 ]
│   │   ├── requests 2.32.3 [ required: >=2.19.0 ]
│   │   │   ├── certifi 2024.8.30 [ required: >=2017.4.17 ]
│   │   │   ├── charset-normalizer 3.4.0 [ required: <4,>=2 ]
│   │   │   ├── idna 3.10 [ required: <4,>=2.5 ]
│   │   │   └── urllib3 2.2.3 [ required: <3,>=1.21.1 ]
│   │   ├── tqdm 4.67.1 [ required: >=4.62.1 ]
│   │   └── xxhash 3.5.0 [ required: Any ]
│   ├── huggingface-hub 0.26.3 [ required: >=0.24.0 ]
│   │   ├── filelock 3.16.1 [ required: Any ]
│   │   ├── fsspec 2024.9.0 [ required: >=2023.5.0 ]
│   │   ├── packaging 24.2 [ required: >=20.9 ]
│   │   ├── pyyaml 6.0.2 [ required: >=5.1 ]
│   │   ├── requests 2.32.3 [ required: Any ]
│   │   │   ├── certifi 2024.8.30 [ required: >=2017.4.17 ]
│   │   │   ├── charset-normalizer 3.4.0 [ required: <4,>=2 ]
│   │   │   ├── idna 3.10 [ required: <4,>=2.5 ]
│   │   │   └── urllib3 2.2.3 [ required: <3,>=1.21.1 ]
│   │   ├── tqdm 4.67.1 [ required: >=4.42.1 ]
│   │   └── typing-extensions 4.12.2 [ required: >=3.7.4.3 ]
│   ├── jinja2 3.1.4 [ required: Any ]
│   │   └── markupsafe 3.0.2 [ required: >=2.0 ]
│   ├── packaging 24.2 [ required: >=20.0 ]
│   ├── seqeval 0.0.10 [ required: Any ]
│   │   ├── keras 3.7.0 [ required: >=2.2.4 ]
│   │   │   ├── absl-py 2.1.0 [ required: Any ]
│   │   │   ├── h5py 3.12.1 [ required: Any ]
│   │   │   │   └── numpy 2.0.2 [ required: >=1.19.3 ]
│   │   │   ├── ml-dtypes 0.5.0 [ required: Any ]
│   │   │   │   └── numpy 2.0.2 [ required: >=1.26.0 ]
│   │   │   ├── namex 0.0.8 [ required: Any ]
│   │   │   ├── numpy 2.0.2 [ required: Any ]
│   │   │   ├── optree 0.13.1 [ required: Any ]
│   │   │   │   └── typing-extensions 4.12.2 [ required: >=4.5.0 ]
│   │   │   ├── packaging 24.2 [ required: Any ]
│   │   │   └── rich 13.9.4 [ required: Any ]
│   │   │       ├── markdown-it-py 3.0.0 [ required: >=2.2.0 ]
│   │   │       │   └── mdurl 0.1.2 [ required: ~=0.1 ]
│   │   │       └── pygments 2.18.0 [ required: <3.0.0,>=2.13.0 ]
│   │   └── numpy 2.0.2 [ required: >=1.14.0 ]
│   ├── torch 2.5.1 [ required: Any ]
│   │   ├── filelock 3.16.1 [ required: Any ]
│   │   ├── fsspec 2024.9.0 [ required: Any ]
│   │   ├── jinja2 3.1.4 [ required: Any ]
│   │   │   └── markupsafe 3.0.2 [ required: >=2.0 ]
│   │   ├── networkx 3.4.2 [ required: Any ]
│   │   ├── setuptools 75.6.0 [ required: Any ]
│   │   ├── sympy 1.13.1 [ required: ==1.13.1 ]
│   │   │   └── mpmath 1.3.0 [ required: <1.4,>=1.1.0 ]
│   │   └── typing-extensions 4.12.2 [ required: >=4.8.0 ]
│   └── transformers 4.46.3 [ required: <5,>=4.19.0 ]
│       ├── filelock 3.16.1 [ required: Any ]
│       ├── huggingface-hub 0.26.3 [ required: <1.0,>=0.23.2 ]
│       │   ├── filelock 3.16.1 [ required: Any ]
│       │   ├── fsspec 2024.9.0 [ required: >=2023.5.0 ]
│       │   ├── packaging 24.2 [ required: >=20.9 ]
│       │   ├── pyyaml 6.0.2 [ required: >=5.1 ]
│       │   ├── requests 2.32.3 [ required: Any ]
│       │   │   ├── certifi 2024.8.30 [ required: >=2017.4.17 ]
│       │   │   ├── charset-normalizer 3.4.0 [ required: <4,>=2 ]
│       │   │   ├── idna 3.10 [ required: <4,>=2.5 ]
│       │   │   └── urllib3 2.2.3 [ required: <3,>=1.21.1 ]
│       │   ├── tqdm 4.67.1 [ required: >=4.42.1 ]
│       │   └── typing-extensions 4.12.2 [ required: >=3.7.4.3 ]
│       ├── numpy 2.0.2 [ required: >=1.17 ]
│       ├── packaging 24.2 [ required: >=20.0 ]
│       ├── pyyaml 6.0.2 [ required: >=5.1 ]
│       ├── regex 2024.11.6 [ required: !=2019.12.17 ]
│       ├── requests 2.32.3 [ required: Any ]
│       │   ├── certifi 2024.8.30 [ required: >=2017.4.17 ]
│       │   ├── charset-normalizer 3.4.0 [ required: <4,>=2 ]
│       │   ├── idna 3.10 [ required: <4,>=2.5 ]
│       │   └── urllib3 2.2.3 [ required: <3,>=1.21.1 ]
│       ├── safetensors 0.4.5 [ required: >=0.4.1 ]
│       ├── tokenizers 0.20.3 [ required: <0.21,>=0.20 ]
│       │   └── huggingface-hub 0.26.3 [ required: <1.0,>=0.16.4 ]
│       │       ├── filelock 3.16.1 [ required: Any ]
│       │       ├── fsspec 2024.9.0 [ required: >=2023.5.0 ]
│       │       ├── packaging 24.2 [ required: >=20.9 ]
│       │       ├── pyyaml 6.0.2 [ required: >=5.1 ]
│       │       ├── requests 2.32.3 [ required: Any ]
│       │       │   ├── certifi 2024.8.30 [ required: >=2017.4.17 ]
│       │       │   ├── charset-normalizer 3.4.0 [ required: <4,>=2 ]
│       │       │   ├── idna 3.10 [ required: <4,>=2.5 ]
│       │       │   └── urllib3 2.2.3 [ required: <3,>=1.21.1 ]
│       │       ├── tqdm 4.67.1 [ required: >=4.42.1 ]
│       │       └── typing-extensions 4.12.2 [ required: >=3.7.4.3 ]
│       └── tqdm 4.67.1 [ required: >=4.27 ]

@sanmai-NL
Copy link
Author

@tomaarsen So apparently, some old version of seqeval gets selected.

https://pypi.org/project/seqeval/#history

@sanmai-NL
Copy link
Author

sanmai-NL commented Dec 6, 2024

@tomaarsen I see you don't have version constraints set in your pyproject.toml.

The proper fix is to remove all transitive dependencies like scikit-learn from your distribution package's pyproject.toml, since this confuses and leads to inefficiency, and to set lower bound version constraints to all your true dependencies, like seqeval.

You can simply run pip freeze and change all the == into >=, and put those package names plus version constraint as dependencies in your pyproject.toml. And then lower the bounds further if required for compatibility.

@sanmai-NL
Copy link
Author

@tomaarsen BTW, using Creosote you can detect unused dependencies (not used directly by your own package).

@tomaarsen
Copy link
Owner

I indeed don't have lower bounds for all dependencies - I didn't have time to look into from which versions my features started working. This is indeed not ideal.

Having said that, although sklearn is an indirect dependency according to my pyproject.toml setup, it should be a required dependency as I directly import from it in SpanMarker.
I'd like to avoid the pip freeze strategy as it will be unnecessarily constrictive. The proper fix is to set "true" minimum requirements, but as mentioned, I'm struggling to justify the time investment for that.

  • Tom Aarsen

@sanmai-NL
Copy link
Author

@tomaarsen The Python Zen: it's better to ask forgiveness than permission. Why not just require modern versions as a lower bound, and then relaxing the bound as issues are filed on this? Chances are, you will have to make minimal adjustments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants