nucliadb 6.2.1.post3025__py3-none-any.whl → 6.2.1.post3032__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.
- nucliadb/ingest/fields/base.py +20 -2
- {nucliadb-6.2.1.post3025.dist-info → nucliadb-6.2.1.post3032.dist-info}/METADATA +5 -5
- {nucliadb-6.2.1.post3025.dist-info → nucliadb-6.2.1.post3032.dist-info}/RECORD +7 -7
- {nucliadb-6.2.1.post3025.dist-info → nucliadb-6.2.1.post3032.dist-info}/WHEEL +0 -0
- {nucliadb-6.2.1.post3025.dist-info → nucliadb-6.2.1.post3032.dist-info}/entry_points.txt +0 -0
- {nucliadb-6.2.1.post3025.dist-info → nucliadb-6.2.1.post3032.dist-info}/top_level.txt +0 -0
- {nucliadb-6.2.1.post3025.dist-info → nucliadb-6.2.1.post3032.dist-info}/zip-safe +0 -0
nucliadb/ingest/fields/base.py
CHANGED
@@ -43,6 +43,7 @@ from nucliadb_protos.resources_pb2 import (
|
|
43
43
|
)
|
44
44
|
from nucliadb_protos.utils_pb2 import ExtractedText, VectorObject
|
45
45
|
from nucliadb_protos.writer_pb2 import Error, FieldStatus
|
46
|
+
from nucliadb_utils.storages.exceptions import CouldNotCopyNotFound
|
46
47
|
from nucliadb_utils.storages.storage import Storage, StorageField
|
47
48
|
|
48
49
|
if TYPE_CHECKING: # pragma: no cover
|
@@ -370,9 +371,26 @@ class Field(Generic[PbType]):
|
|
370
371
|
sf = self._get_extracted_vectors_storage_field(vectorset, storage_key_kind)
|
371
372
|
vo: Optional[VectorObject] = None
|
372
373
|
if actual_payload is None:
|
373
|
-
# Its first extracted
|
374
|
+
# Its first extracted vectors
|
374
375
|
if payload.HasField("file"):
|
375
|
-
|
376
|
+
# When we receive vectors in a cloud file, it points to our
|
377
|
+
# storage but paths are different, we may want to move it. This
|
378
|
+
# can happen, for example, with LEGACY KBs where processing
|
379
|
+
# sends us the extracted vectors prefixed by vectorset but, to
|
380
|
+
# maintain bw/c, we move those to the original not prefixed
|
381
|
+
# path.
|
382
|
+
try:
|
383
|
+
await self.storage.normalize_binary(payload.file, sf)
|
384
|
+
except CouldNotCopyNotFound:
|
385
|
+
# A failure here could mean the payload has already been
|
386
|
+
# moved and we're retrying due to a redelivery or another
|
387
|
+
# retry mechanism
|
388
|
+
already_moved = await sf.exists()
|
389
|
+
if already_moved:
|
390
|
+
# We assume is the correct one and do nothing else
|
391
|
+
pass
|
392
|
+
else:
|
393
|
+
raise
|
376
394
|
vo = await self.storage.download_pb(sf, VectorObject)
|
377
395
|
else:
|
378
396
|
await self.storage.upload_pb(sf, payload.vectors)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: nucliadb
|
3
|
-
Version: 6.2.1.
|
3
|
+
Version: 6.2.1.post3032
|
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.
|
26
|
-
Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.2.1.
|
27
|
-
Requires-Dist: nucliadb-protos>=6.2.1.
|
28
|
-
Requires-Dist: nucliadb-models>=6.2.1.
|
25
|
+
Requires-Dist: nucliadb-telemetry[all]>=6.2.1.post3032
|
26
|
+
Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.2.1.post3032
|
27
|
+
Requires-Dist: nucliadb-protos>=6.2.1.post3032
|
28
|
+
Requires-Dist: nucliadb-models>=6.2.1.post3032
|
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
|
@@ -118,7 +118,7 @@ nucliadb/ingest/consumer/service.py,sha256=EZM1sABW_7bj6j2UgKUHUuK-EGIEYnLdtPAn8
|
|
118
118
|
nucliadb/ingest/consumer/shard_creator.py,sha256=8SotMc-o_G8XZU52gR4Aay7tcigTdIXgz8YtxqHmJ1Q,4309
|
119
119
|
nucliadb/ingest/consumer/utils.py,sha256=jpX8D4lKzuPCpArQLZeX_Zczq3pfen_zAf8sPJfOEZU,2642
|
120
120
|
nucliadb/ingest/fields/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
|
121
|
-
nucliadb/ingest/fields/base.py,sha256=
|
121
|
+
nucliadb/ingest/fields/base.py,sha256=DTXFu_g9vSU2h7S4PlYxd-hp4SDuM_EPf8y51ALgD8w,21654
|
122
122
|
nucliadb/ingest/fields/conversation.py,sha256=OcQOHvi72Pm0OyNGwxLo9gONo8f1NhwASq0_gS-E64A,7021
|
123
123
|
nucliadb/ingest/fields/exceptions.py,sha256=LBZ-lw11f42Pk-ck-NSN9mSJ2kOw-NeRwb-UE31ILTQ,1171
|
124
124
|
nucliadb/ingest/fields/file.py,sha256=1v4jLg3balUua2VmSV8hHkAwPFShTUCOzufZvIUQcQw,4740
|
@@ -330,9 +330,9 @@ nucliadb/writer/tus/local.py,sha256=7jYa_w9b-N90jWgN2sQKkNcomqn6JMVBOVeDOVYJHto,
|
|
330
330
|
nucliadb/writer/tus/s3.py,sha256=vF0NkFTXiXhXq3bCVXXVV-ED38ECVoUeeYViP8uMqcU,8357
|
331
331
|
nucliadb/writer/tus/storage.py,sha256=ToqwjoYnjI4oIcwzkhha_MPxi-k4Jk3Lt55zRwaC1SM,2903
|
332
332
|
nucliadb/writer/tus/utils.py,sha256=MSdVbRsRSZVdkaum69_0wku7X3p5wlZf4nr6E0GMKbw,2556
|
333
|
-
nucliadb-6.2.1.
|
334
|
-
nucliadb-6.2.1.
|
335
|
-
nucliadb-6.2.1.
|
336
|
-
nucliadb-6.2.1.
|
337
|
-
nucliadb-6.2.1.
|
338
|
-
nucliadb-6.2.1.
|
333
|
+
nucliadb-6.2.1.post3032.dist-info/METADATA,sha256=8N9zThu09c4WL6Rzwf3r9O6V93ahj_bZtgZT8OZTU7A,4603
|
334
|
+
nucliadb-6.2.1.post3032.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
335
|
+
nucliadb-6.2.1.post3032.dist-info/entry_points.txt,sha256=XqGfgFDuY3zXQc8ewXM2TRVjTModIq851zOsgrmaXx4,1268
|
336
|
+
nucliadb-6.2.1.post3032.dist-info/top_level.txt,sha256=hwYhTVnX7jkQ9gJCkVrbqEG1M4lT2F_iPQND1fCzF80,20
|
337
|
+
nucliadb-6.2.1.post3032.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
338
|
+
nucliadb-6.2.1.post3032.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|