llm-join 0.2.4__tar.gz → 0.2.6__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.
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: llm-join
3
- Version: 0.2.4
3
+ Version: 0.2.6
4
4
  Summary: Fuzzy join DataFrames using LLM scoring and embedding retrieval
5
5
  License: MIT
6
6
  Keywords: entity-resolution,fuzzy-join,llm,nlp,pandas
7
7
  Requires-Python: >=3.9
8
- Requires-Dist: faiss-cpu>=1.8
9
- Requires-Dist: numpy>=1.23
8
+ Requires-Dist: faiss-cpu<1.14,>=1.8
9
+ Requires-Dist: numpy<2,>=1.23
10
10
  Requires-Dist: pandas>=1.5
11
11
  Provides-Extra: sentence-transformers
12
12
  Requires-Dist: sentence-transformers>=2.2; extra == 'sentence-transformers'
@@ -5,8 +5,11 @@ except ImportError as e:
5
5
  if "numpy._core" in str(e) or "numpy.core" in str(e):
6
6
  raise ImportError(
7
7
  "llm-join: numpy/faiss version mismatch detected.\n\n"
8
+ "faiss-cpu>=1.14 requires numpy>=2, which breaks numpy 1.x environments.\n\n"
8
9
  "Fix with:\n"
9
- " pip install 'faiss-cpu>=1.8' --force-reinstall\n\n"
10
+ " pip install \"faiss-cpu>=1.8,<1.14\" \"numpy>=1.23,<2\" --force-reinstall\n\n"
11
+ "On Databricks, run the above as %pip install ... then restart Python:\n"
12
+ " dbutils.library.restartPython()\n\n"
10
13
  f"Original error: {e}"
11
14
  ) from None
12
15
  raise
@@ -14,4 +17,4 @@ except ImportError as e:
14
17
  from llm_join.join import fuzzy_join
15
18
 
16
19
  __all__ = ["fuzzy_join"]
17
- __version__ = "0.2.4"
20
+ __version__ = "0.2.6"
@@ -106,6 +106,7 @@ def fuzzy_join(
106
106
  reasoning="LLM failed — embed rank-0 fallback used",
107
107
  embed_rank=0,
108
108
  match_method="embed_fallback",
109
+ candidates=candidates,
109
110
  ))
110
111
  elif results:
111
112
  matches.extend(results)
@@ -9,7 +9,8 @@ class MatchResult:
9
9
  score: float
10
10
  reasoning: str
11
11
  embed_rank: int = 0
12
- match_method: str = "llm" # "llm" or "embed_threshold"
12
+ match_method: str = "llm" # "llm", "embed_threshold", or "embed_fallback"
13
+ candidates: list = None # top-K candidates sent to LLM (None if LLM was not called)
13
14
 
14
15
 
15
16
  class Merger:
@@ -50,6 +51,7 @@ class Merger:
50
51
  "_llm_reasoning": [m.reasoning for m in matches],
51
52
  "_embed_rank": [m.embed_rank for m in matches],
52
53
  "_match_method": [m.match_method for m in matches],
54
+ "_llm_candidates": [m.candidates for m in matches],
53
55
  })
54
56
 
55
57
  df2_with_key = df2.merge(match_df, on=right_col, how="left")
@@ -57,7 +59,7 @@ class Merger:
57
59
 
58
60
  if not return_reasoning:
59
61
  result = result.drop(
60
- columns=["_llm_score", "_llm_reasoning", "_embed_rank", "_match_method"],
62
+ columns=["_llm_score", "_llm_reasoning", "_embed_rank", "_match_method", "_llm_candidates"],
61
63
  errors="ignore",
62
64
  )
63
65
 
@@ -154,6 +154,7 @@ class LLMScorer:
154
154
  score=best_score,
155
155
  reasoning=reasoning + tie_note,
156
156
  embed_rank=idx,
157
+ candidates=candidates,
157
158
  )
158
159
  for idx, reasoning in tied
159
160
  ]
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "llm-join"
7
- version = "0.2.4"
7
+ version = "0.2.6"
8
8
  description = "Fuzzy join DataFrames using LLM scoring and embedding retrieval"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -12,8 +12,8 @@ license = { text = "MIT" }
12
12
  keywords = ["fuzzy-join", "llm", "entity-resolution", "pandas", "nlp"]
13
13
  dependencies = [
14
14
  "pandas>=1.5",
15
- "numpy>=1.23",
16
- "faiss-cpu>=1.8",
15
+ "numpy>=1.23,<2",
16
+ "faiss-cpu>=1.8,<1.14",
17
17
  ]
18
18
 
19
19
  [project.optional-dependencies]
File without changes
File without changes
File without changes
File without changes
File without changes