dyff-schema 0.5.1__py3-none-any.whl → 0.6.0__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 dyff-schema might be problematic. Click here for more details.
- dyff/schema/v0/r1/platform.py +22 -1
- dyff/schema/v0/r1/requests.py +22 -10
- {dyff_schema-0.5.1.dist-info → dyff_schema-0.6.0.dist-info}/METADATA +1 -1
- {dyff_schema-0.5.1.dist-info → dyff_schema-0.6.0.dist-info}/RECORD +8 -8
- {dyff_schema-0.5.1.dist-info → dyff_schema-0.6.0.dist-info}/LICENSE +0 -0
- {dyff_schema-0.5.1.dist-info → dyff_schema-0.6.0.dist-info}/NOTICE +0 -0
- {dyff_schema-0.5.1.dist-info → dyff_schema-0.6.0.dist-info}/WHEEL +0 -0
- {dyff_schema-0.5.1.dist-info → dyff_schema-0.6.0.dist-info}/top_level.txt +0 -0
dyff/schema/v0/r1/platform.py
CHANGED
|
@@ -1097,6 +1097,16 @@ class InferenceSessionAndToken(DyffSchemaBaseModel):
|
|
|
1097
1097
|
token: str
|
|
1098
1098
|
|
|
1099
1099
|
|
|
1100
|
+
class InferenceSessionReference(DyffSchemaBaseModel):
|
|
1101
|
+
session: str = pydantic.Field(
|
|
1102
|
+
description="The ID of a running inference session.",
|
|
1103
|
+
)
|
|
1104
|
+
|
|
1105
|
+
interface: InferenceInterface = pydantic.Field(
|
|
1106
|
+
description="How to move data in and out of the service."
|
|
1107
|
+
)
|
|
1108
|
+
|
|
1109
|
+
|
|
1100
1110
|
class DatasetFilter(DyffSchemaBaseModel):
|
|
1101
1111
|
"""A rule for restrcting which instances in a Dataset are returned."""
|
|
1102
1112
|
|
|
@@ -1134,10 +1144,20 @@ class Evaluation(DyffEntity, EvaluationBase):
|
|
|
1134
1144
|
kind: Literal["Evaluation"] = Entities.Evaluation.value
|
|
1135
1145
|
|
|
1136
1146
|
inferenceSession: InferenceSessionSpec = pydantic.Field(
|
|
1137
|
-
description="Specification of the InferenceSession that will perform
|
|
1147
|
+
description="Specification of the InferenceSession that will perform"
|
|
1148
|
+
" inference for the evaluation.",
|
|
1149
|
+
)
|
|
1150
|
+
|
|
1151
|
+
inferenceSessionReference: Optional[str] = pydantic.Field(
|
|
1152
|
+
default=None,
|
|
1153
|
+
description="ID of a running inference session that will be used"
|
|
1154
|
+
" for the evaluation instead of starting a new one.",
|
|
1138
1155
|
)
|
|
1139
1156
|
|
|
1140
1157
|
def dependencies(self) -> list[str]:
|
|
1158
|
+
# TODO: It would be nice if the session could be a dependency,
|
|
1159
|
+
# so that the client doesn't start until the session is ready, but
|
|
1160
|
+
# dyff-orchestrator can't handle dependencies on sessions currently.
|
|
1141
1161
|
return [self.dataset, self.inferenceSession.inferenceService.id]
|
|
1142
1162
|
|
|
1143
1163
|
def resource_allocation(self) -> Optional[ResourceAllocation]:
|
|
@@ -1867,6 +1887,7 @@ __all__ = [
|
|
|
1867
1887
|
"InferenceSession",
|
|
1868
1888
|
"InferenceSessionAndToken",
|
|
1869
1889
|
"InferenceSessionBase",
|
|
1890
|
+
"InferenceSessionReference",
|
|
1870
1891
|
"InferenceSessionSpec",
|
|
1871
1892
|
"Label",
|
|
1872
1893
|
"LabelKey",
|
dyff/schema/v0/r1/requests.py
CHANGED
|
@@ -73,10 +73,27 @@ class EvaluationCreateRequest(DyffEntityCreateRequest, EvaluationBase):
|
|
|
73
73
|
"""A description of how to run an InferenceService on a Dataset to obtain a set of
|
|
74
74
|
evaluation results."""
|
|
75
75
|
|
|
76
|
-
inferenceSession: EvaluationInferenceSessionRequest = pydantic.Field(
|
|
76
|
+
inferenceSession: Optional[EvaluationInferenceSessionRequest] = pydantic.Field(
|
|
77
|
+
default=None,
|
|
77
78
|
description="Specification of the InferenceSession that will perform inference for the evaluation.",
|
|
78
79
|
)
|
|
79
80
|
|
|
81
|
+
inferenceSessionReference: Optional[str] = pydantic.Field(
|
|
82
|
+
default=None,
|
|
83
|
+
description="The ID of a running inference session that will be used"
|
|
84
|
+
" for the evaluation, instead of starting a new one.",
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
@pydantic.root_validator
|
|
88
|
+
def check_session_exactly_one(cls, values):
|
|
89
|
+
session = values.get("inferenceSession") is not None
|
|
90
|
+
session_ref = values.get("inferenceSessionReference") is not None
|
|
91
|
+
if not (session ^ session_ref):
|
|
92
|
+
raise ValueError(
|
|
93
|
+
"must specify exactly one of {inferenceSession, inferenceSessionReference}"
|
|
94
|
+
)
|
|
95
|
+
return values
|
|
96
|
+
|
|
80
97
|
|
|
81
98
|
class MethodCreateRequest(DyffEntityCreateRequest, MethodBase):
|
|
82
99
|
pass
|
|
@@ -141,16 +158,12 @@ class DyffEntityQueryRequest(DyffSchemaBaseModel):
|
|
|
141
158
|
|
|
142
159
|
|
|
143
160
|
class _AnalysisProductQueryRequest(DyffEntityQueryRequest):
|
|
144
|
-
analysis: Optional[str] = pydantic.Field(default=None)
|
|
145
|
-
method: Optional[str] = pydantic.Field(default=None)
|
|
146
|
-
methodName: Optional[str] = pydantic.Field(default=None)
|
|
147
|
-
inputsAnyOf: Optional[str] = pydantic.Field(default=None)
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
class AnalysisQueryRequest(DyffEntityQueryRequest):
|
|
151
161
|
method: Optional[str] = pydantic.Field(default=None)
|
|
152
162
|
methodName: Optional[str] = pydantic.Field(default=None)
|
|
153
|
-
|
|
163
|
+
dataset: Optional[str] = pydantic.Field(default=None)
|
|
164
|
+
evaluation: Optional[str] = pydantic.Field(default=None)
|
|
165
|
+
inferenceService: Optional[str] = pydantic.Field(default=None)
|
|
166
|
+
model: Optional[str] = pydantic.Field(default=None)
|
|
154
167
|
inputsAnyOf: Optional[str] = pydantic.Field(default=None)
|
|
155
168
|
|
|
156
169
|
|
|
@@ -215,7 +228,6 @@ class SafetyCaseQueryRequest(_AnalysisProductQueryRequest):
|
|
|
215
228
|
|
|
216
229
|
__all__ = [
|
|
217
230
|
"AnalysisCreateRequest",
|
|
218
|
-
"AnalysisQueryRequest",
|
|
219
231
|
"AuditQueryRequest",
|
|
220
232
|
"DyffEntityCreateRequest",
|
|
221
233
|
"DyffEntityQueryRequest",
|
|
@@ -21,8 +21,8 @@ dyff/schema/v0/__init__.py,sha256=L5y8UhRnojerPYHumsxQJRcHCNz8Hj9NM8b47mewMNs,92
|
|
|
21
21
|
dyff/schema/v0/r1/__init__.py,sha256=L5y8UhRnojerPYHumsxQJRcHCNz8Hj9NM8b47mewMNs,92
|
|
22
22
|
dyff/schema/v0/r1/adapters.py,sha256=2t2oxsnGfSEDKKDIEYw4qqLXMH7qlFIwPVuLyUmbsHs,23552
|
|
23
23
|
dyff/schema/v0/r1/base.py,sha256=g_wqh4OU_9ftMHovVxPtdeup4O5MZi422v3eZH99ZQI,17139
|
|
24
|
-
dyff/schema/v0/r1/platform.py,sha256=
|
|
25
|
-
dyff/schema/v0/r1/requests.py,sha256=
|
|
24
|
+
dyff/schema/v0/r1/platform.py,sha256=2QcXlSxPZDLqbICoAvwebXcRf3ssvK_X6MJRqxx3AXI,60712
|
|
25
|
+
dyff/schema/v0/r1/requests.py,sha256=15MzY1l-RMH68SoihYRa9hX0McFadz9slcbIOQmdvuU,8490
|
|
26
26
|
dyff/schema/v0/r1/test.py,sha256=X6dUyVd5svcPCI-PBMOAqEfK9jv3bRDvkQTJzwS96c0,10720
|
|
27
27
|
dyff/schema/v0/r1/version.py,sha256=isKAGuGxsdru8vDaYmI4YiZdJOu_wNxXK7u6QzD6FE4,392
|
|
28
28
|
dyff/schema/v0/r1/dataset/__init__.py,sha256=LbVlkO2asyGYBKk2z49xjJYTM-pu9y9e4eQDXgTDLnM,2553
|
|
@@ -33,9 +33,9 @@ dyff/schema/v0/r1/dataset/text.py,sha256=nLIn91Zlt0tNdXUklSgjJ-kEDxoPX32ISLkiv2D
|
|
|
33
33
|
dyff/schema/v0/r1/dataset/vision.py,sha256=aIe0fbfM_g3DsrDTdg2K803YKLjZBpurM_VJcJFuZLc,369
|
|
34
34
|
dyff/schema/v0/r1/io/__init__.py,sha256=L5y8UhRnojerPYHumsxQJRcHCNz8Hj9NM8b47mewMNs,92
|
|
35
35
|
dyff/schema/v0/r1/io/vllm.py,sha256=CUE9y8KthtUI7sD49S875rDmPvKotSXVIRaBS79aBZs,5320
|
|
36
|
-
dyff_schema-0.
|
|
37
|
-
dyff_schema-0.
|
|
38
|
-
dyff_schema-0.
|
|
39
|
-
dyff_schema-0.
|
|
40
|
-
dyff_schema-0.
|
|
41
|
-
dyff_schema-0.
|
|
36
|
+
dyff_schema-0.6.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
37
|
+
dyff_schema-0.6.0.dist-info/METADATA,sha256=HLHebKirGXnxLtDAGD-lK6wUfxWG7JzPB8czgEqfG6s,3459
|
|
38
|
+
dyff_schema-0.6.0.dist-info/NOTICE,sha256=YONACu0s_Ui6jNi-wtEsVQbTU1JIkh8wvLH6d1-Ni_w,43
|
|
39
|
+
dyff_schema-0.6.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
40
|
+
dyff_schema-0.6.0.dist-info/top_level.txt,sha256=9e3VVdeX73t_sUJOPQPCcGtYO1JhoErhHIi3WoWGcFI,5
|
|
41
|
+
dyff_schema-0.6.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|