nucliadb-models 6.3.4.post3780__py3-none-any.whl → 6.3.4.post3796__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.
Potentially problematic release.
This version of nucliadb-models might be problematic. Click here for more details.
- nucliadb_models/graph/requests.py +27 -0
- {nucliadb_models-6.3.4.post3780.dist-info → nucliadb_models-6.3.4.post3796.dist-info}/METADATA +1 -1
- {nucliadb_models-6.3.4.post3780.dist-info → nucliadb_models-6.3.4.post3796.dist-info}/RECORD +5 -5
- {nucliadb_models-6.3.4.post3780.dist-info → nucliadb_models-6.3.4.post3796.dist-info}/WHEEL +1 -1
- {nucliadb_models-6.3.4.post3780.dist-info → nucliadb_models-6.3.4.post3796.dist-info}/top_level.txt +0 -0
|
@@ -87,6 +87,29 @@ class GraphPath(BaseModel, extra="forbid"):
|
|
|
87
87
|
undirected: bool = False
|
|
88
88
|
|
|
89
89
|
|
|
90
|
+
class Generator(str, Enum):
|
|
91
|
+
DATA_AUGMENTATION = "data-augmentation"
|
|
92
|
+
PROCESSOR = "processor"
|
|
93
|
+
USER = "user"
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
class Generated(BaseModel, extra="forbid"):
|
|
97
|
+
"""Matches if the relation was generated by the given source"""
|
|
98
|
+
|
|
99
|
+
prop: Literal["generated"]
|
|
100
|
+
by: Generator = Field(description="Generator for this field.")
|
|
101
|
+
da_task: Optional["str"] = Field(
|
|
102
|
+
default=None, description="Matches relations generated by an specific DA task, given its prefix"
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
@model_validator(mode="after")
|
|
106
|
+
def validate_fuzzy_usage(self) -> Self:
|
|
107
|
+
if self.by != Generator.DATA_AUGMENTATION and self.da_task is not None:
|
|
108
|
+
raise ValueError("da_task can only be specified if by=data-augmentation")
|
|
109
|
+
|
|
110
|
+
return self
|
|
111
|
+
|
|
112
|
+
|
|
90
113
|
## Requests models
|
|
91
114
|
|
|
92
115
|
|
|
@@ -113,6 +136,8 @@ GraphPathQuery = Annotated[
|
|
|
113
136
|
Annotated[AnyNode, Tag("node")],
|
|
114
137
|
# relations
|
|
115
138
|
Annotated[Relation, Tag("relation")],
|
|
139
|
+
# metadata
|
|
140
|
+
Annotated[Generated, Tag("generated")],
|
|
116
141
|
],
|
|
117
142
|
Discriminator(graph_query_discriminator),
|
|
118
143
|
]
|
|
@@ -148,6 +173,7 @@ GraphNodesQuery = Annotated[
|
|
|
148
173
|
Annotated[Or["GraphNodesQuery"], Tag("or")],
|
|
149
174
|
Annotated[Not["GraphNodesQuery"], Tag("not")],
|
|
150
175
|
Annotated[AnyNode, Tag("node")],
|
|
176
|
+
Annotated[Generated, Tag("generated")],
|
|
151
177
|
],
|
|
152
178
|
Discriminator(graph_query_discriminator),
|
|
153
179
|
]
|
|
@@ -175,6 +201,7 @@ GraphRelationsQuery = Annotated[
|
|
|
175
201
|
Annotated[Or["GraphRelationsQuery"], Tag("or")],
|
|
176
202
|
Annotated[Not["GraphRelationsQuery"], Tag("not")],
|
|
177
203
|
Annotated[Relation, Tag("relation")],
|
|
204
|
+
Annotated[Generated, Tag("generated")],
|
|
178
205
|
],
|
|
179
206
|
Discriminator(graph_query_discriminator),
|
|
180
207
|
]
|
{nucliadb_models-6.3.4.post3780.dist-info → nucliadb_models-6.3.4.post3796.dist-info}/RECORD
RENAMED
|
@@ -27,12 +27,12 @@ nucliadb_models/vectorsets.py,sha256=avxwO9JPX2k5sCniuNhh2MSsP7aRNvf1eB1-h3-Ju1o
|
|
|
27
27
|
nucliadb_models/writer.py,sha256=OLtCGmicpVf56pXi2_myTAvStpnaBKKOVNtZzHkKKtw,8472
|
|
28
28
|
nucliadb_models/agents/ingestion.py,sha256=mV7gV6VpYg4VNpc59K3275TMUJZbUzeUnp3SZzO5uxY,3137
|
|
29
29
|
nucliadb_models/graph/__init__.py,sha256=eu_1UK7GlBQRg5IRUqJkxVMcBxkXeqX4SZL6fuvwjDg,897
|
|
30
|
-
nucliadb_models/graph/requests.py,sha256=
|
|
30
|
+
nucliadb_models/graph/requests.py,sha256=vbfaGVlVmgrflIwr1yV4DJEteVHsbL8wJMQb-olLFSA,7528
|
|
31
31
|
nucliadb_models/graph/responses.py,sha256=3aimAHrd3YW1BXHU_ZXRoidlccRtkCcREkfCNotqgIQ,1651
|
|
32
32
|
nucliadb_models/internal/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
|
|
33
33
|
nucliadb_models/internal/predict.py,sha256=5rgUPrH_98gerySOZ-TR2PX_qzCGF1_8VxyOu3bGhis,2281
|
|
34
34
|
nucliadb_models/internal/shards.py,sha256=uZLsMkYWrJDHq3xy_w7snSeV2X3aDBuht9GC_MG3sKc,1976
|
|
35
|
-
nucliadb_models-6.3.4.
|
|
36
|
-
nucliadb_models-6.3.4.
|
|
37
|
-
nucliadb_models-6.3.4.
|
|
38
|
-
nucliadb_models-6.3.4.
|
|
35
|
+
nucliadb_models-6.3.4.post3796.dist-info/METADATA,sha256=DxGUjvj_VB5IJai0yjuyPkeX4ABkyprgxii-qDBzIqY,759
|
|
36
|
+
nucliadb_models-6.3.4.post3796.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
37
|
+
nucliadb_models-6.3.4.post3796.dist-info/top_level.txt,sha256=UrY1I8oeovIRwkXLYplssTrxQdUjhSEFDFbnwaIV3tA,16
|
|
38
|
+
nucliadb_models-6.3.4.post3796.dist-info/RECORD,,
|
{nucliadb_models-6.3.4.post3780.dist-info → nucliadb_models-6.3.4.post3796.dist-info}/top_level.txt
RENAMED
|
File without changes
|