nucliadb 6.4.2.post4345__py3-none-any.whl → 6.4.2.post4360__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.
@@ -20,6 +20,7 @@
20
20
  from __future__ import annotations
21
21
 
22
22
  import enum
23
+ import logging
23
24
  from datetime import datetime
24
25
  from typing import TYPE_CHECKING, Any, Generic, Optional, Type, TypeVar
25
26
 
@@ -43,8 +44,12 @@ from nucliadb_protos.resources_pb2 import (
43
44
  )
44
45
  from nucliadb_protos.utils_pb2 import ExtractedText, VectorObject
45
46
  from nucliadb_protos.writer_pb2 import Error, FieldStatus
47
+ from nucliadb_utils import const
46
48
  from nucliadb_utils.storages.exceptions import CouldNotCopyNotFound
47
49
  from nucliadb_utils.storages.storage import Storage, StorageField
50
+ from nucliadb_utils.utilities import has_feature
51
+
52
+ logger = logging.getLogger(__name__)
48
53
 
49
54
  if TYPE_CHECKING: # pragma: no cover
50
55
  from nucliadb.ingest.orm.resource import Resource
@@ -206,6 +211,21 @@ class Field(Generic[PbType]):
206
211
  ) -> None:
207
212
  # Try delete vectors
208
213
  sf = self._get_extracted_vectors_storage_field(vectorset, storage_key_kind)
214
+
215
+ if has_feature(const.Features.DEBUG_MISSING_VECTORS):
216
+ # This is a very chatty log. It is just a temporary hint while debugging an issue.
217
+ logger.info(
218
+ "Deleting vectors from storage",
219
+ extra={
220
+ "kbid": self.kbid,
221
+ "rid": self.resource.uuid,
222
+ "field": f"{self.type}/{self.id}",
223
+ "vectorset": vectorset,
224
+ "storage_key_kind": storage_key_kind,
225
+ "key": sf.key,
226
+ "bucket": sf.bucket,
227
+ },
228
+ )
209
229
  try:
210
230
  await self.storage.delete_upload(sf.key, sf.bucket)
211
231
  except KeyError:
@@ -721,6 +721,8 @@ def build_text_blocks_from_relations(
721
721
  )
722
722
  paragraph_count = 0
723
723
  for ent, subgraph in relations.entities.items():
724
+ if ent not in scores:
725
+ continue
724
726
  for rel, score in zip(subgraph.related_to, scores[ent]):
725
727
  key = (
726
728
  (
@@ -796,6 +798,8 @@ def get_paragraph_info_from_relations(
796
798
 
797
799
  # Loop over each entity in the relation graph
798
800
  for ent, subgraph in relations.entities.items():
801
+ if ent not in scores:
802
+ continue
799
803
  for rel_score, rel in zip(scores[ent], subgraph.related_to):
800
804
  if rel.metadata and rel.metadata.paragraph_id:
801
805
  p_id = ParagraphId.from_string(rel.metadata.paragraph_id)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nucliadb
3
- Version: 6.4.2.post4345
3
+ Version: 6.4.2.post4360
4
4
  Summary: NucliaDB
5
5
  Author-email: Nuclia <nucliadb@nuclia.com>
6
6
  License-Expression: AGPL-3.0-or-later
@@ -19,11 +19,11 @@ Classifier: Programming Language :: Python :: 3.12
19
19
  Classifier: Programming Language :: Python :: 3 :: Only
20
20
  Requires-Python: <4,>=3.9
21
21
  Description-Content-Type: text/markdown
22
- Requires-Dist: nucliadb-telemetry[all]>=6.4.2.post4345
23
- Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.4.2.post4345
24
- Requires-Dist: nucliadb-protos>=6.4.2.post4345
25
- Requires-Dist: nucliadb-models>=6.4.2.post4345
26
- Requires-Dist: nidx-protos>=6.4.2.post4345
22
+ Requires-Dist: nucliadb-telemetry[all]>=6.4.2.post4360
23
+ Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.4.2.post4360
24
+ Requires-Dist: nucliadb-protos>=6.4.2.post4360
25
+ Requires-Dist: nucliadb-models>=6.4.2.post4360
26
+ Requires-Dist: nidx-protos>=6.4.2.post4360
27
27
  Requires-Dist: nucliadb-admin-assets>=1.0.0.post1224
28
28
  Requires-Dist: nuclia-models>=0.24.2
29
29
  Requires-Dist: uvicorn[standard]
@@ -138,7 +138,7 @@ nucliadb/ingest/consumer/service.py,sha256=8AD41mMN7EUeUtk4ZNy14zfvxzwmVjIX6Mwe0
138
138
  nucliadb/ingest/consumer/shard_creator.py,sha256=w0smEu01FU_2cjZnsfBRNqT_Ntho11X17zTMST-vKbc,4359
139
139
  nucliadb/ingest/consumer/utils.py,sha256=jpX8D4lKzuPCpArQLZeX_Zczq3pfen_zAf8sPJfOEZU,2642
140
140
  nucliadb/ingest/fields/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
141
- nucliadb/ingest/fields/base.py,sha256=DTXFu_g9vSU2h7S4PlYxd-hp4SDuM_EPf8y51ALgD8w,21654
141
+ nucliadb/ingest/fields/base.py,sha256=YMG1xjem9kilHrnUttyj1qFotKtWHqVKXWbnIsymWYE,22397
142
142
  nucliadb/ingest/fields/conversation.py,sha256=0tVpHLvi3UmuO98puimBJUpPXv3qEOpqlWVXVYvz9Vw,7082
143
143
  nucliadb/ingest/fields/exceptions.py,sha256=sZBk21BSrXFdOdo1qUdCAyD-9YMYakSLdn4_WdIPCIQ,1217
144
144
  nucliadb/ingest/fields/file.py,sha256=1v4jLg3balUua2VmSV8hHkAwPFShTUCOzufZvIUQcQw,4740
@@ -239,7 +239,7 @@ nucliadb/search/search/filters.py,sha256=1MkHlJjAQqoRCj7e5cEzK2HvBxGLE17I_omsjik
239
239
  nucliadb/search/search/find.py,sha256=ZocoQNN28OHOmMaroGVFCnce3YHPZbFb1-9jxLNHSFM,7805
240
240
  nucliadb/search/search/find_merge.py,sha256=c-7IlfjfdmWAvQOyM7IO3bKS1EQpnR4oi6pN6mwrQKw,19815
241
241
  nucliadb/search/search/graph_merge.py,sha256=y5V7X-BhjHsKDXE69tzQLIIKGm4XuaFrZXw0odcHVNM,3402
242
- nucliadb/search/search/graph_strategy.py,sha256=LtPWGVL0RzxUgDLjrYgoQdZFmPBbln1fUsmXM1z5krs,35941
242
+ nucliadb/search/search/graph_strategy.py,sha256=7ERzGLshrrpuu7m3PauPaK89fzyrT2oDNVhOMnCjka0,36043
243
243
  nucliadb/search/search/hydrator.py,sha256=-R37gCrGxkyaiHQalnTWHNG_FCx11Zucd7qA1vQCxuw,6985
244
244
  nucliadb/search/search/ingestion_agents.py,sha256=NeJr4EEX-bvFFMGvXOOwLv8uU7NuQ-ntJnnrhnKfMzY,3174
245
245
  nucliadb/search/search/merge.py,sha256=XiRBsxhYPshPV7lZXD-9E259KZOPIf4I2tKosY0lPo4,22470
@@ -367,8 +367,8 @@ nucliadb/writer/tus/local.py,sha256=7jYa_w9b-N90jWgN2sQKkNcomqn6JMVBOVeDOVYJHto,
367
367
  nucliadb/writer/tus/s3.py,sha256=vF0NkFTXiXhXq3bCVXXVV-ED38ECVoUeeYViP8uMqcU,8357
368
368
  nucliadb/writer/tus/storage.py,sha256=ToqwjoYnjI4oIcwzkhha_MPxi-k4Jk3Lt55zRwaC1SM,2903
369
369
  nucliadb/writer/tus/utils.py,sha256=MSdVbRsRSZVdkaum69_0wku7X3p5wlZf4nr6E0GMKbw,2556
370
- nucliadb-6.4.2.post4345.dist-info/METADATA,sha256=PmcHanJiYiTsXcGhJWX3tf2DpYxDRTgpUgMTpUfPio4,4152
371
- nucliadb-6.4.2.post4345.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
372
- nucliadb-6.4.2.post4345.dist-info/entry_points.txt,sha256=XqGfgFDuY3zXQc8ewXM2TRVjTModIq851zOsgrmaXx4,1268
373
- nucliadb-6.4.2.post4345.dist-info/top_level.txt,sha256=hwYhTVnX7jkQ9gJCkVrbqEG1M4lT2F_iPQND1fCzF80,20
374
- nucliadb-6.4.2.post4345.dist-info/RECORD,,
370
+ nucliadb-6.4.2.post4360.dist-info/METADATA,sha256=IdCzxP9kQ7Khr6yw7TX6W8OcvJS07AuvSqB2qwIy0ZE,4152
371
+ nucliadb-6.4.2.post4360.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
372
+ nucliadb-6.4.2.post4360.dist-info/entry_points.txt,sha256=XqGfgFDuY3zXQc8ewXM2TRVjTModIq851zOsgrmaXx4,1268
373
+ nucliadb-6.4.2.post4360.dist-info/top_level.txt,sha256=hwYhTVnX7jkQ9gJCkVrbqEG1M4lT2F_iPQND1fCzF80,20
374
+ nucliadb-6.4.2.post4360.dist-info/RECORD,,