nucliadb 6.2.1.post2901__py3-none-any.whl → 6.2.1.post2907__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/orm/processor/data_augmentation.py +7 -29
- {nucliadb-6.2.1.post2901.dist-info → nucliadb-6.2.1.post2907.dist-info}/METADATA +5 -5
- {nucliadb-6.2.1.post2901.dist-info → nucliadb-6.2.1.post2907.dist-info}/RECORD +7 -7
- {nucliadb-6.2.1.post2901.dist-info → nucliadb-6.2.1.post2907.dist-info}/WHEEL +0 -0
- {nucliadb-6.2.1.post2901.dist-info → nucliadb-6.2.1.post2907.dist-info}/entry_points.txt +0 -0
- {nucliadb-6.2.1.post2901.dist-info → nucliadb-6.2.1.post2907.dist-info}/top_level.txt +0 -0
- {nucliadb-6.2.1.post2901.dist-info → nucliadb-6.2.1.post2907.dist-info}/zip-safe +0 -0
@@ -20,13 +20,13 @@
|
|
20
20
|
|
21
21
|
import logging
|
22
22
|
from dataclasses import dataclass, field
|
23
|
-
from typing import Optional
|
23
|
+
from typing import Optional
|
24
24
|
|
25
25
|
from nucliadb.ingest.orm.resource import Resource
|
26
26
|
from nucliadb.ingest.processing import ProcessingEngine, PushPayload, Source
|
27
27
|
from nucliadb_models.text import PushTextFormat, Text
|
28
28
|
from nucliadb_protos import resources_pb2, writer_pb2
|
29
|
-
from nucliadb_protos.resources_pb2 import
|
29
|
+
from nucliadb_protos.resources_pb2 import FieldType
|
30
30
|
from nucliadb_utils.utilities import Utility, get_partitioning, get_utility
|
31
31
|
|
32
32
|
logger = logging.getLogger("ingest-processor")
|
@@ -50,7 +50,7 @@ async def get_generated_fields(bm: writer_pb2.BrokerMessage, resource: Resource)
|
|
50
50
|
ingest the processed thing later).
|
51
51
|
|
52
52
|
Given a broker message and a resource, this function returns the list of
|
53
|
-
generated fields, that can be empty.
|
53
|
+
generated fields, that can be empty. It skips fields with errors.
|
54
54
|
|
55
55
|
"""
|
56
56
|
generated_fields = GeneratedFields()
|
@@ -60,34 +60,12 @@ async def get_generated_fields(bm: writer_pb2.BrokerMessage, resource: Resource)
|
|
60
60
|
return generated_fields
|
61
61
|
|
62
62
|
# search all fields
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
fields = []
|
68
|
-
else:
|
69
|
-
fields = all_fields.fields
|
70
|
-
|
71
|
-
for field_id in bm.texts:
|
72
|
-
field = FieldID(field_type=FieldType.TEXT, field=field_id)
|
73
|
-
if field not in fields:
|
63
|
+
for field_id, text in bm.texts.items():
|
64
|
+
errors = [e for e in bm.errors if e.field_type == FieldType.TEXT and e.field == field_id]
|
65
|
+
has_error = len(errors) > 0
|
66
|
+
if text.generated_by.WhichOneof("author") == "data_augmentation" and not has_error:
|
74
67
|
generated_fields.texts.append(field_id)
|
75
68
|
|
76
|
-
for field_id in bm.links:
|
77
|
-
field = FieldID(field_type=FieldType.LINK, field=field_id)
|
78
|
-
if field not in fields:
|
79
|
-
generated_fields.links.append(field_id)
|
80
|
-
|
81
|
-
for field_id in bm.files:
|
82
|
-
field = FieldID(field_type=FieldType.FILE, field=field_id)
|
83
|
-
if field not in fields:
|
84
|
-
generated_fields.files.append(field_id)
|
85
|
-
|
86
|
-
for field_id in bm.conversations:
|
87
|
-
field = FieldID(field_type=FieldType.CONVERSATION, field=field_id)
|
88
|
-
if field not in fields:
|
89
|
-
generated_fields.conversations.append(field_id)
|
90
|
-
|
91
69
|
return generated_fields
|
92
70
|
|
93
71
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: nucliadb
|
3
|
-
Version: 6.2.1.
|
3
|
+
Version: 6.2.1.post2907
|
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.post2907
|
26
|
+
Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.2.1.post2907
|
27
|
+
Requires-Dist: nucliadb-protos>=6.2.1.post2907
|
28
|
+
Requires-Dist: nucliadb-models>=6.2.1.post2907
|
29
29
|
Requires-Dist: nucliadb-admin-assets>=1.0.0.post1224
|
30
30
|
Requires-Dist: nucliadb-node-binding>=2.26.0
|
31
31
|
Requires-Dist: nuclia-models>=0.24.2
|
@@ -146,7 +146,7 @@ nucliadb/ingest/orm/resource.py,sha256=KDTEwZ6_5eLvLu1s30Pln4BFDOy9D7_ChT7kRmQ1J
|
|
146
146
|
nucliadb/ingest/orm/utils.py,sha256=vCe_9UxHu26JDFGLwQ0wH-XyzJIpQCTK-Ow9dtZR5Vg,2716
|
147
147
|
nucliadb/ingest/orm/processor/__init__.py,sha256=Aqd9wCNTvggkMkCY3WvoI8spdr94Jnqk-0iq9XpLs18,922
|
148
148
|
nucliadb/ingest/orm/processor/auditing.py,sha256=TeYhXGJRyQ7ROytbb2u8R0fIh_FYi3HgTu3S1ribY3U,4623
|
149
|
-
nucliadb/ingest/orm/processor/data_augmentation.py,sha256=
|
149
|
+
nucliadb/ingest/orm/processor/data_augmentation.py,sha256=HpSU9olDHcTfECDYCsmm4yA-Hu0mBrd_zTtx50XDGFE,5164
|
150
150
|
nucliadb/ingest/orm/processor/pgcatalog.py,sha256=f32PIEXWktWzGDws6Ffife37OAfrseP5IOti_Cb4ir8,3012
|
151
151
|
nucliadb/ingest/orm/processor/processor.py,sha256=2FxAetUvtHvg6l-24xYrmBdsyqc0RU1zmliel44581g,30945
|
152
152
|
nucliadb/ingest/orm/processor/sequence_manager.py,sha256=uqEphtI1Ir_yk9jRl2gPf7BlzzXWovbARY5MNZSBI_8,1704
|
@@ -340,9 +340,9 @@ nucliadb/writer/tus/local.py,sha256=7jYa_w9b-N90jWgN2sQKkNcomqn6JMVBOVeDOVYJHto,
|
|
340
340
|
nucliadb/writer/tus/s3.py,sha256=vF0NkFTXiXhXq3bCVXXVV-ED38ECVoUeeYViP8uMqcU,8357
|
341
341
|
nucliadb/writer/tus/storage.py,sha256=ToqwjoYnjI4oIcwzkhha_MPxi-k4Jk3Lt55zRwaC1SM,2903
|
342
342
|
nucliadb/writer/tus/utils.py,sha256=MSdVbRsRSZVdkaum69_0wku7X3p5wlZf4nr6E0GMKbw,2556
|
343
|
-
nucliadb-6.2.1.
|
344
|
-
nucliadb-6.2.1.
|
345
|
-
nucliadb-6.2.1.
|
346
|
-
nucliadb-6.2.1.
|
347
|
-
nucliadb-6.2.1.
|
348
|
-
nucliadb-6.2.1.
|
343
|
+
nucliadb-6.2.1.post2907.dist-info/METADATA,sha256=YGARv1GE9A7A4HDijyWKA0N0Rgv369hW5uprwt8lfoA,4689
|
344
|
+
nucliadb-6.2.1.post2907.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
345
|
+
nucliadb-6.2.1.post2907.dist-info/entry_points.txt,sha256=XqGfgFDuY3zXQc8ewXM2TRVjTModIq851zOsgrmaXx4,1268
|
346
|
+
nucliadb-6.2.1.post2907.dist-info/top_level.txt,sha256=hwYhTVnX7jkQ9gJCkVrbqEG1M4lT2F_iPQND1fCzF80,20
|
347
|
+
nucliadb-6.2.1.post2907.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
348
|
+
nucliadb-6.2.1.post2907.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|