model2vec 0.3.1__py3-none-any.whl → 0.3.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- model2vec/utils.py +10 -8
- model2vec/version.py +1 -1
- {model2vec-0.3.1.dist-info → model2vec-0.3.2.dist-info}/METADATA +2 -1
- {model2vec-0.3.1.dist-info → model2vec-0.3.2.dist-info}/RECORD +7 -7
- {model2vec-0.3.1.dist-info → model2vec-0.3.2.dist-info}/LICENSE +0 -0
- {model2vec-0.3.1.dist-info → model2vec-0.3.2.dist-info}/WHEEL +0 -0
- {model2vec-0.3.1.dist-info → model2vec-0.3.2.dist-info}/top_level.txt +0 -0
model2vec/utils.py
CHANGED
|
@@ -26,17 +26,19 @@ _MODULE_MAP = (("scikit-learn", "sklearn"),)
|
|
|
26
26
|
|
|
27
27
|
def get_package_extras(package: str, extra: str) -> Iterator[str]:
|
|
28
28
|
"""Get the extras of the package."""
|
|
29
|
-
|
|
29
|
+
try:
|
|
30
|
+
message = metadata(package)
|
|
31
|
+
except Exception as e:
|
|
32
|
+
raise ImportError(f"Could not retrieve metadata for package '{package}': {e}")
|
|
33
|
+
|
|
30
34
|
all_packages = message.get_all("Requires-Dist") or []
|
|
31
35
|
for package in all_packages:
|
|
32
36
|
name, *rest = package.split(";", maxsplit=1)
|
|
33
|
-
if
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
if found_extra == extra:
|
|
39
|
-
yield name
|
|
37
|
+
if rest:
|
|
38
|
+
# Extract and clean the extra requirement
|
|
39
|
+
found_extra = rest[0].split("==")[-1].strip(" \"'")
|
|
40
|
+
if found_extra == extra:
|
|
41
|
+
yield name.strip()
|
|
40
42
|
|
|
41
43
|
|
|
42
44
|
def importable(module: str, extra: str) -> None:
|
model2vec/version.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
__version_triple__ = (0, 3,
|
|
1
|
+
__version_triple__ = (0, 3, 2)
|
|
2
2
|
__version__ = ".".join(map(str, __version_triple__))
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: model2vec
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2
|
|
4
4
|
Summary: Distill a Small Static Model from any Sentence Transformer
|
|
5
5
|
Author-email: Stéphan Tulkens <stephantul@gmail.com>, Thomas van Dongen <thomas123@live.nl>
|
|
6
6
|
License: MIT License
|
|
@@ -47,6 +47,7 @@ Requires-Dist: numpy
|
|
|
47
47
|
Requires-Dist: rich
|
|
48
48
|
Requires-Dist: tqdm
|
|
49
49
|
Requires-Dist: tokenizers >=0.20
|
|
50
|
+
Requires-Dist: safetensors
|
|
50
51
|
Requires-Dist: setuptools
|
|
51
52
|
Provides-Extra: dev
|
|
52
53
|
Requires-Dist: black ; extra == 'dev'
|
|
@@ -2,15 +2,15 @@ model2vec/__init__.py,sha256=osue7o8CuO_1T9opJAWfnbg4SspGKx0cHuyWv8Tedfs,124
|
|
|
2
2
|
model2vec/hf_utils.py,sha256=Z-_V2kYagBX7m9_--e2ZAGP4irfRpqIlBQgGwYswpoU,7772
|
|
3
3
|
model2vec/model.py,sha256=DuzsHaTBf0fTsp0ovVPzFs3EzDqGnFd5bGC94vumYuU,12031
|
|
4
4
|
model2vec/model_card_template.md,sha256=rQo4bE3VPXH3XB9OUCe7FCenhBc4wv6L1sNURVT4Sro,2747
|
|
5
|
-
model2vec/utils.py,sha256=
|
|
6
|
-
model2vec/version.py,sha256=
|
|
5
|
+
model2vec/utils.py,sha256=AyKPu7w7XO2DhJEBN8NrO53vZj5rZpbwWJNxjagCKIk,2684
|
|
6
|
+
model2vec/version.py,sha256=YUIpQDxUrCbh0vtQtU7z3qcWjcuAHAhcRI706SxPcGw,84
|
|
7
7
|
model2vec/distill/__init__.py,sha256=KpFRhafXVceM1xhorJhXbd8OnX8dwOGcWMbXglZxd4U,330
|
|
8
8
|
model2vec/distill/distillation.py,sha256=yDdIW4nqR5Vw4cUYL4p7hrJnIzZWO9fV9LiqZHe_z8s,11504
|
|
9
9
|
model2vec/distill/inference.py,sha256=QgHAEkLoeq-jPyKnFTB6p6Ry-ZGZqonkZaEg2S7VTOY,6123
|
|
10
10
|
model2vec/distill/tokenizer.py,sha256=xtVsMTxquqTufoP9z39C4Itg2LLcGViqeguz-M7y-u8,4293
|
|
11
11
|
model2vec/distill/utils.py,sha256=lzGyvFUO8mUcz63wnTRimGhQCsXzqnQfG5vRRKDGxic,721
|
|
12
|
-
model2vec-0.3.
|
|
13
|
-
model2vec-0.3.
|
|
14
|
-
model2vec-0.3.
|
|
15
|
-
model2vec-0.3.
|
|
16
|
-
model2vec-0.3.
|
|
12
|
+
model2vec-0.3.2.dist-info/LICENSE,sha256=sCFPFI7OrnOfkWIJ54z-FXEsS4EMi8nUS2wtHRYWqrY,1074
|
|
13
|
+
model2vec-0.3.2.dist-info/METADATA,sha256=mMDSZ9I2XhHGnXZhzO0TUtwuerJL3zD_yeVtjRp4clc,22641
|
|
14
|
+
model2vec-0.3.2.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
|
15
|
+
model2vec-0.3.2.dist-info/top_level.txt,sha256=cprhxJcbtkFiydp0BGvdCVNupTWg07-3p93jFStc78g,10
|
|
16
|
+
model2vec-0.3.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|