kgmodule-utils 0.2.2__tar.gz → 0.2.3__tar.gz
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.
- {kgmodule_utils-0.2.2 → kgmodule_utils-0.2.3}/PKG-INFO +1 -1
- {kgmodule_utils-0.2.2 → kgmodule_utils-0.2.3}/pyproject.toml +22 -1
- {kgmodule_utils-0.2.2 → kgmodule_utils-0.2.3}/src/kg_utils/__init__.py +1 -1
- {kgmodule_utils-0.2.2 → kgmodule_utils-0.2.3}/src/kg_utils/embedder.py +10 -1
- {kgmodule_utils-0.2.2 → kgmodule_utils-0.2.3}/LICENSE +0 -0
- {kgmodule_utils-0.2.2 → kgmodule_utils-0.2.3}/README.md +0 -0
- {kgmodule_utils-0.2.2 → kgmodule_utils-0.2.3}/src/kg_utils/embed.py +0 -0
- {kgmodule_utils-0.2.2 → kgmodule_utils-0.2.3}/src/kg_utils/py.typed +0 -0
- {kgmodule_utils-0.2.2 → kgmodule_utils-0.2.3}/src/kg_utils/snapshots/__init__.py +0 -0
- {kgmodule_utils-0.2.2 → kgmodule_utils-0.2.3}/src/kg_utils/snapshots/manager.py +0 -0
- {kgmodule_utils-0.2.2 → kgmodule_utils-0.2.3}/src/kg_utils/snapshots/models.py +0 -0
- {kgmodule_utils-0.2.2 → kgmodule_utils-0.2.3}/src/kg_utils/types/__init__.py +0 -0
- {kgmodule_utils-0.2.2 → kgmodule_utils-0.2.3}/src/kg_utils/types/extractor.py +0 -0
- {kgmodule_utils-0.2.2 → kgmodule_utils-0.2.3}/src/kg_utils/types/module.py +0 -0
- {kgmodule_utils-0.2.2 → kgmodule_utils-0.2.3}/src/kg_utils/types/specs.py +0 -0
|
@@ -10,7 +10,7 @@ build-backend = "poetry.core.masonry.api"
|
|
|
10
10
|
|
|
11
11
|
[project]
|
|
12
12
|
name = "kgmodule-utils"
|
|
13
|
-
version = "0.2.
|
|
13
|
+
version = "0.2.3"
|
|
14
14
|
description = "Shared types and snapshot infrastructure for the KGModule SDK"
|
|
15
15
|
readme = "README.md"
|
|
16
16
|
license = { text = "Elastic-2.0" }
|
|
@@ -52,8 +52,29 @@ target-version = ["py312", "py313"]
|
|
|
52
52
|
line-length = 100
|
|
53
53
|
target-version = "py312"
|
|
54
54
|
|
|
55
|
+
[tool.pylint.main]
|
|
56
|
+
source-roots = ["src"]
|
|
57
|
+
init-hook = "import sys; sys.path.insert(0, 'src')"
|
|
58
|
+
|
|
59
|
+
[tool.pylint."messages control"]
|
|
60
|
+
disable = [
|
|
61
|
+
"missing-module-docstring",
|
|
62
|
+
]
|
|
63
|
+
|
|
55
64
|
[tool.mypy]
|
|
56
65
|
python_version = "3.12"
|
|
57
66
|
strict = true
|
|
58
67
|
warn_unused_ignores = true
|
|
59
68
|
disallow_untyped_defs = true
|
|
69
|
+
|
|
70
|
+
[[tool.mypy.overrides]]
|
|
71
|
+
module = [
|
|
72
|
+
"sentence_transformers.*",
|
|
73
|
+
"transformers.*",
|
|
74
|
+
"numpy.*",
|
|
75
|
+
]
|
|
76
|
+
ignore_missing_imports = true
|
|
77
|
+
|
|
78
|
+
[[tool.mypy.overrides]]
|
|
79
|
+
module = "kg_utils.embedder"
|
|
80
|
+
disallow_untyped_calls = false
|
|
@@ -95,6 +95,15 @@ def load_sentence_transformer(model_name: str = DEFAULT_MODEL) -> Any:
|
|
|
95
95
|
"""
|
|
96
96
|
from sentence_transformers import SentenceTransformer # pylint: disable=import-outside-toplevel
|
|
97
97
|
|
|
98
|
+
try:
|
|
99
|
+
from transformers import logging as hf_logging # pylint: disable=import-outside-toplevel
|
|
100
|
+
|
|
101
|
+
hf_logging.set_verbosity_error()
|
|
102
|
+
except ImportError:
|
|
103
|
+
pass
|
|
104
|
+
|
|
105
|
+
os.environ["TQDM_DISABLE"] = "1"
|
|
106
|
+
|
|
98
107
|
resolved = KNOWN_MODELS.get(model_name, model_name)
|
|
99
108
|
trust_remote = "nomic-ai/" in resolved
|
|
100
109
|
local_path = resolve_model_path(resolved)
|
|
@@ -133,7 +142,7 @@ class SentenceTransformerEmbedder(Embedder):
|
|
|
133
142
|
try:
|
|
134
143
|
from transformers import logging as hf_logging # pylint: disable=import-outside-toplevel
|
|
135
144
|
|
|
136
|
-
hf_logging.set_verbosity_error()
|
|
145
|
+
hf_logging.set_verbosity_error()
|
|
137
146
|
except ImportError:
|
|
138
147
|
pass
|
|
139
148
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|