nucliadb 6.2.1.post3243__py3-none-any.whl → 6.2.1.post3244__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.
@@ -26,3 +26,4 @@ class IndexCounts:
26
26
  fields: int
27
27
  paragraphs: int
28
28
  sentences: int
29
+ size_bytes: int
@@ -707,11 +707,7 @@ class PineconeIndexManager(ExternalIndexManager):
707
707
  if self.kbid in COUNTERS_CACHE:
708
708
  # Cache hit
709
709
  return COUNTERS_CACHE[self.kbid]
710
- total = IndexCounts(
711
- fields=0,
712
- paragraphs=0,
713
- sentences=0,
714
- )
710
+ total = IndexCounts(fields=0, paragraphs=0, sentences=0, size_bytes=0)
715
711
  tasks = []
716
712
  vectorset_results: dict[str, IndexCounts] = {}
717
713
 
@@ -739,6 +735,7 @@ class PineconeIndexManager(ExternalIndexManager):
739
735
  fields=0,
740
736
  paragraphs=index_stats.totalVectorCount,
741
737
  sentences=index_stats.totalVectorCount,
738
+ size_bytes=0,
742
739
  )
743
740
  except Exception:
744
741
  logger.exception(
@@ -123,8 +123,9 @@ async def _kb_counters(
123
123
  counters.sentences = index_counts.sentences
124
124
  is_small_kb = index_counts.paragraphs < MAX_PARAGRAPHS_FOR_SMALL_KB
125
125
  resource_count = await get_resources_count(kbid, force_calculate=is_small_kb)
126
- # TODO: Find a way to query the fields count from the external index provider or use the catalog
126
+ # TODO: Find a way to query the fields count and size from the external index provider or use the catalog
127
127
  counters.resources = counters.fields = resource_count
128
+ counters.index_size = counters.paragraphs * AVG_PARAGRAPH_SIZE_BYTES
128
129
  else:
129
130
  node_index_counts, queried_shards = await get_node_index_counts(kbid)
130
131
  counters.fields = node_index_counts.fields
@@ -133,7 +134,7 @@ async def _kb_counters(
133
134
  is_small_kb = node_index_counts.paragraphs < MAX_PARAGRAPHS_FOR_SMALL_KB
134
135
  resource_count = await get_resources_count(kbid, force_calculate=is_small_kb)
135
136
  counters.resources = resource_count
136
- counters.index_size = counters.paragraphs * AVG_PARAGRAPH_SIZE_BYTES
137
+ counters.index_size = node_index_counts.size_bytes
137
138
  if debug and queried_shards is not None:
138
139
  counters.shards = queried_shards
139
140
  return counters
@@ -202,11 +203,7 @@ async def get_node_index_counts(kbid: str) -> tuple[IndexCounts, list[str]]:
202
203
  if results is None:
203
204
  raise HTTPException(status_code=503, detail=f"No shards found")
204
205
 
205
- counts = IndexCounts(
206
- fields=0,
207
- paragraphs=0,
208
- sentences=0,
209
- )
206
+ counts = IndexCounts(fields=0, paragraphs=0, sentences=0, size_bytes=0)
210
207
  for shard in results:
211
208
  if isinstance(shard, Exception):
212
209
  logger.error("Error getting shard info", exc_info=shard)
@@ -215,4 +212,5 @@ async def get_node_index_counts(kbid: str) -> tuple[IndexCounts, list[str]]:
215
212
  counts.fields += shard.fields
216
213
  counts.paragraphs += shard.paragraphs
217
214
  counts.sentences += shard.sentences
215
+ counts.size_bytes += shard.size_bytes
218
216
  return counts, queried_shards
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: nucliadb
3
- Version: 6.2.1.post3243
3
+ Version: 6.2.1.post3244
4
4
  Home-page: https://docs.nuclia.dev/docs/management/nucliadb/intro
5
5
  Author: NucliaDB Community
6
6
  Author-email: nucliadb@nuclia.com
@@ -22,10 +22,10 @@ Classifier: Programming Language :: Python :: 3.12
22
22
  Classifier: Programming Language :: Python :: 3 :: Only
23
23
  Requires-Python: >=3.9, <4
24
24
  Description-Content-Type: text/markdown
25
- Requires-Dist: nucliadb-telemetry[all]>=6.2.1.post3243
26
- Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.2.1.post3243
27
- Requires-Dist: nucliadb-protos>=6.2.1.post3243
28
- Requires-Dist: nucliadb-models>=6.2.1.post3243
25
+ Requires-Dist: nucliadb-telemetry[all]>=6.2.1.post3244
26
+ Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.2.1.post3244
27
+ Requires-Dist: nucliadb-protos>=6.2.1.post3244
28
+ Requires-Dist: nucliadb-models>=6.2.1.post3244
29
29
  Requires-Dist: nucliadb-admin-assets>=1.0.0.post1224
30
30
  Requires-Dist: nuclia-models>=0.24.2
31
31
  Requires-Dist: uvicorn
@@ -39,7 +39,7 @@ nucliadb/openapi.py,sha256=wDiw0dVEvTpJvbatkJ0JZLkKm9RItZT5PWRHjqRfqTA,2272
39
39
  nucliadb/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
40
40
  nucliadb/common/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
41
41
  nucliadb/common/constants.py,sha256=QpigxJh_CtD85Evy0PtV5cVq6x0U_f9xfIcXz1ymkUg,869
42
- nucliadb/common/counters.py,sha256=yhJEmmrglTSrDmB8OjaFLkZ__TwhTxayyQrtacnB55I,957
42
+ nucliadb/common/counters.py,sha256=8lOi3A2HeLDDlcNaS2QT1SfD3350VPBjiY3FkmHH1V8,977
43
43
  nucliadb/common/ids.py,sha256=HMb213Kz9HaY4IsBwaQJFhUErntKWV-29s0UHaGcf1E,8004
44
44
  nucliadb/common/locking.py,sha256=RL0CabZVPzxHZyUjYeUyLvsJTm7W3J9o4fEgsY_ufNc,5896
45
45
  nucliadb/common/nidx.py,sha256=_LoU8D4afEtlW0c3vGUCoatDZvMr0-2l_GtIGap7VxA,10185
@@ -75,7 +75,7 @@ nucliadb/common/external_index_providers/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A
75
75
  nucliadb/common/external_index_providers/base.py,sha256=yfPkCigT4unXFvAyzy1tXSy2UgWC481GcZAS9bdE4NI,8871
76
76
  nucliadb/common/external_index_providers/exceptions.py,sha256=nDhhOIkb66hjCrBk4Spvl2vN1SuW5gbwrMCDmrdjHHE,1209
77
77
  nucliadb/common/external_index_providers/manager.py,sha256=aFSrrKKYG1ydpTSyq4zYD0LOxFS7P-CO6rcKC0hiF4I,4267
78
- nucliadb/common/external_index_providers/pinecone.py,sha256=afglJq6FfifFNTONGrFBCe5yuEL2h3pDFwZkKiA4_6o,39802
78
+ nucliadb/common/external_index_providers/pinecone.py,sha256=SZKOkc-F6vdSmkQsEBK3VrV3omfEfMuhkkxhEsvd6_A,39799
79
79
  nucliadb/common/external_index_providers/settings.py,sha256=EGHnIkwxqe6aypwKegXTlKO3AgUxNa-6GeAZG25Njis,2002
80
80
  nucliadb/common/http_clients/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
81
81
  nucliadb/common/http_clients/auth.py,sha256=srfpgAbs2wmqA9u_l-HxsV4YoO77Tse4y3gm3q2YvYM,2112
@@ -192,7 +192,7 @@ nucliadb/search/api/v1/ask.py,sha256=F2dR3-swb3Xz8MfZPYL3G65KY2R_mgef4YVBbu8kLi4
192
192
  nucliadb/search/api/v1/catalog.py,sha256=ubYPS1wmPHzOgH9LR0qJmmV-9ELZPtHRSs5TYJ1pA9A,7117
193
193
  nucliadb/search/api/v1/feedback.py,sha256=kNLc4dHz2SXHzV0PwC1WiRAwY88fDptPcP-kO0q-FrQ,2620
194
194
  nucliadb/search/api/v1/find.py,sha256=DsnWkySu_cFajDWJIxN8DYvLL_Rm2yiCjHD8TsqPfRk,9304
195
- nucliadb/search/api/v1/knowledgebox.py,sha256=Hrt2h-28DDlwN3AdjMZPTYI6om0RMy9bmJvqVHvw8sE,8620
195
+ nucliadb/search/api/v1/knowledgebox.py,sha256=rWhx3PYWryingu19qwwFDbVvVYynq5Ky23FSlzmTutQ,8721
196
196
  nucliadb/search/api/v1/predict_proxy.py,sha256=QrGzo0hKjtmyGZ6pjlJHYAh4hxwVUIOTcVcerRCw7eE,3047
197
197
  nucliadb/search/api/v1/router.py,sha256=mtT07rBZcVfpa49doaw9b1tj3sdi3qLH0gn9Io6NYM0,988
198
198
  nucliadb/search/api/v1/search.py,sha256=aP_Iv9mi6PvmXNDX2v_t8Xhr7orD4peCY9NKo0oEnQg,13641
@@ -332,9 +332,9 @@ nucliadb/writer/tus/local.py,sha256=7jYa_w9b-N90jWgN2sQKkNcomqn6JMVBOVeDOVYJHto,
332
332
  nucliadb/writer/tus/s3.py,sha256=vF0NkFTXiXhXq3bCVXXVV-ED38ECVoUeeYViP8uMqcU,8357
333
333
  nucliadb/writer/tus/storage.py,sha256=ToqwjoYnjI4oIcwzkhha_MPxi-k4Jk3Lt55zRwaC1SM,2903
334
334
  nucliadb/writer/tus/utils.py,sha256=MSdVbRsRSZVdkaum69_0wku7X3p5wlZf4nr6E0GMKbw,2556
335
- nucliadb-6.2.1.post3243.dist-info/METADATA,sha256=U5WRw_ozdq7WlDXs5S6mgPoBZY9O-wvdj97InMm2KBM,4603
336
- nucliadb-6.2.1.post3243.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
337
- nucliadb-6.2.1.post3243.dist-info/entry_points.txt,sha256=XqGfgFDuY3zXQc8ewXM2TRVjTModIq851zOsgrmaXx4,1268
338
- nucliadb-6.2.1.post3243.dist-info/top_level.txt,sha256=hwYhTVnX7jkQ9gJCkVrbqEG1M4lT2F_iPQND1fCzF80,20
339
- nucliadb-6.2.1.post3243.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
340
- nucliadb-6.2.1.post3243.dist-info/RECORD,,
335
+ nucliadb-6.2.1.post3244.dist-info/METADATA,sha256=Y65ogs-l0ULwyshC8CWt2L7C4BNuZeDLA8WeweofHEo,4603
336
+ nucliadb-6.2.1.post3244.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
337
+ nucliadb-6.2.1.post3244.dist-info/entry_points.txt,sha256=XqGfgFDuY3zXQc8ewXM2TRVjTModIq851zOsgrmaXx4,1268
338
+ nucliadb-6.2.1.post3244.dist-info/top_level.txt,sha256=hwYhTVnX7jkQ9gJCkVrbqEG1M4lT2F_iPQND1fCzF80,20
339
+ nucliadb-6.2.1.post3244.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
340
+ nucliadb-6.2.1.post3244.dist-info/RECORD,,