Skip to content

Commit

Permalink
fix: setfit workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
kod-kristoff committed Sep 16, 2024
1 parent ffdac55 commit e09d4a5
Show file tree
Hide file tree
Showing 5 changed files with 1,221 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ authors = [
{ name = "Språkbanken Text", email = "[email protected]" },
{ name = "Kristoffer Andersson", email = "[email protected]" },
]
dependencies = ["sparv-pipeline>=5.2.0"]
dependencies = [
"huggingface-hub>=0.13,<0.24", # workaround to https://github.com/huggingface/setfit/issues/544
"setfit>=1.0.3",
"sparv-pipeline>=5.2.0",
]
classifiers = [
"Development Status :: 3 - Alpha",
# "Development Status :: 4 - Beta",
Expand Down Expand Up @@ -47,6 +51,4 @@ build-backend = "hatchling.build"
packages = ["src/sbx_sentence_emotional_classification_kb_emoclass"]

[tool.uv]
dev-dependencies = [
"pytest>=8.3.3",
]
dev-dependencies = ["pytest-cov>=5.0.0", "pytest>=8.3.3"]
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from typing import Optional

from setfit import SetFitModel # type: ignore[import-not-found]
from setfit import SetFitModel # type: ignore[import-untyped]

MODEL_NAME = "KBLab/emotional-classification"
MODEL_REVISION = "73f1663770e79ff5c1aa12a38063a13537a02ce0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# This file was autogenerated via `uv export`.
-e packages/sparv-sbx-sentence-emotional-classification-kb-emoclass
aiohappyeyeballs==2.4.0
aiohttp==3.10.5
aiosignal==1.3.1
appdirs==1.4.4
argcomplete==3.1.6
async-timeout==4.0.3 ; python_full_version < '3.11'
attrs==24.2.0
certifi==2024.7.4
cffi==1.17.0 ; platform_python_implementation != 'PyPy'
Expand All @@ -10,18 +14,24 @@ click==8.1.7
colorama==0.4.6 ; sys_platform == 'win32' or platform_system == 'Windows'
configargparse==1.7
connection-pool==0.0.3
coverage==7.6.1
cryptography==43.0.0
datasets==3.0.0
datrie==0.8.2
dill==0.3.8
docutils==0.20.1
docx2python==1.27.1
dpath==2.2.0
emoji==2.12.1
evaluate==0.4.3
exceptiongroup==1.2.2 ; python_full_version < '3.11'
fastjsonschema==2.20.0
filelock==3.15.4
frozenlist==1.4.1
fsspec==2024.6.1
gitdb==4.0.11
gitpython==3.1.43
huggingface-hub==0.23.5
humanfriendly==10.0
idna==3.8
importlib-metadata==6.8.0
Expand All @@ -36,6 +46,8 @@ markdown-it-py==3.0.0
markupsafe==2.1.5
mdurl==0.1.2
mpmath==1.3.0
multidict==6.1.0
multiprocess==0.70.16
mypy-extensions==1.0.0
nbformat==5.10.4
networkx==3.1
Expand All @@ -54,6 +66,7 @@ nvidia-nccl-cu12==2.20.5 ; platform_machine == 'x86_64' and platform_system == '
nvidia-nvjitlink-cu12==12.6.20 ; platform_machine == 'x86_64' and platform_system == 'Linux'
nvidia-nvtx-cu12==12.1.105 ; platform_machine == 'x86_64' and platform_system == 'Linux'
packaging==24.1
pandas==2.0.3
pdfminer-six==20221105
pdfplumber==0.10.3
pillow==10.4.0
Expand All @@ -65,14 +78,17 @@ prompt-toolkit==3.0.47
protobuf==3.20.3
psutil==6.0.0
pulp==2.9.0
pyarrow==17.0.0
pycountry==22.3.5
pycparser==2.22 ; platform_python_implementation != 'PyPy'
pygments==2.18.0
pypdfium2==4.30.0
pyreadline3==3.4.1 ; sys_platform == 'win32'
pytest==8.3.3
pytest-cov==5.0.0
python-dateutil==2.8.2
python-json-logger==2.0.7
pytz==2024.2
pywin32==306 ; platform_python_implementation != 'PyPy' and sys_platform == 'win32'
pyyaml==6.0.1
questionary==1.10.0
Expand All @@ -82,6 +98,11 @@ requests==2.32.3
reretry==0.11.8
rich==13.7.0
rpds-py==0.20.0
safetensors==0.4.5
scikit-learn==1.3.2
scipy==1.10.1
sentence-transformers==3.1.0
setfit==1.0.3
setuptools==73.0.1
six==1.16.0
smart-open==7.0.4
Expand All @@ -92,17 +113,23 @@ stanza==1.5.1
stopit==1.1.2
sympy==1.13.2
tabulate==0.9.0
threadpoolctl==3.5.0
throttler==1.2.2
tomli==2.0.1 ; python_full_version < '3.11'
tokenizers==0.19.1
tomli==2.0.1 ; python_full_version <= '3.11'
toposort==1.10
torch==2.4.0
tqdm==4.66.5
traitlets==5.14.3
triton==3.0.0 ; python_full_version < '3.13' and platform_machine == 'x86_64' and platform_system == 'Linux'
transformers==4.44.2
triton==3.0.0 ; platform_machine == 'x86_64' and platform_system == 'Linux'
typing-extensions==4.12.2
typing-inspect==0.9.0
tzdata==2024.1
urllib3==2.2.2
wcwidth==0.2.13
wrapt==1.16.0
xxhash==3.5.0
yarl==1.11.1
yte==1.5.4
zipp==3.20.1
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ dev-dependencies = [
"pytest>=8.3.3",
"ruff>=0.6.4",
"mypy>=1.11.2",
"pytest-cov>=5.0.0",
]
[tool.uv.workspace]
members = ["packages/sparv-sbx-sentence-emotional-classification-kb-emoclass"]
Loading

0 comments on commit e09d4a5

Please sign in to comment.