dyff-schema 0.3.4__py3-none-any.whl → 0.3.7__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 +69 -42
- dyff/schema/v0/r1/requests.py +3 -7
- {dyff_schema-0.3.4.dist-info → dyff_schema-0.3.7.dist-info}/METADATA +1 -1
- {dyff_schema-0.3.4.dist-info → dyff_schema-0.3.7.dist-info}/RECORD +8 -8
- {dyff_schema-0.3.4.dist-info → dyff_schema-0.3.7.dist-info}/LICENSE +0 -0
- {dyff_schema-0.3.4.dist-info → dyff_schema-0.3.7.dist-info}/NOTICE +0 -0
- {dyff_schema-0.3.4.dist-info → dyff_schema-0.3.7.dist-info}/WHEEL +0 -0
- {dyff_schema-0.3.4.dist-info → dyff_schema-0.3.7.dist-info}/top_level.txt +0 -0
dyff/schema/v0/r1/platform.py
CHANGED
|
@@ -1114,27 +1114,18 @@ class MeasurementLevel(str, enum.Enum):
|
|
|
1114
1114
|
|
|
1115
1115
|
|
|
1116
1116
|
class AnalysisOutputQueryFields(DyffSchemaBaseModel):
|
|
1117
|
-
|
|
1118
|
-
description="Identifying information about the Method that was run to produce the output."
|
|
1119
|
-
)
|
|
1120
|
-
|
|
1121
|
-
dataset: Optional[QueryableDyffEntity] = pydantic.Field(
|
|
1117
|
+
analysis: str = pydantic.Field(
|
|
1122
1118
|
default=None,
|
|
1123
|
-
description="
|
|
1119
|
+
description="ID of the Analysis that produced the output.",
|
|
1124
1120
|
)
|
|
1125
1121
|
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
description="ID of the Evaluation being analyzed, if applicable.",
|
|
1122
|
+
method: QueryableDyffEntity = pydantic.Field(
|
|
1123
|
+
description="Identifying information about the Method that was run to produce the output."
|
|
1129
1124
|
)
|
|
1130
1125
|
|
|
1131
|
-
|
|
1126
|
+
inputs: list[str] = pydantic.Field(
|
|
1132
1127
|
default=None,
|
|
1133
|
-
description="
|
|
1134
|
-
)
|
|
1135
|
-
|
|
1136
|
-
model: Optional[QueryableDyffEntity] = pydantic.Field(
|
|
1137
|
-
description="Identifying information about the Model being analyzed, if applicable",
|
|
1128
|
+
description="IDs of resources that were inputs to the Analysis.",
|
|
1138
1129
|
)
|
|
1139
1130
|
|
|
1140
1131
|
|
|
@@ -1150,16 +1141,6 @@ class MeasurementSpec(DyffSchemaBaseModel):
|
|
|
1150
1141
|
)
|
|
1151
1142
|
|
|
1152
1143
|
|
|
1153
|
-
class Measurement(DyffEntity, MeasurementSpec, AnalysisOutputQueryFields):
|
|
1154
|
-
kind: Literal["Measurement"] = Entities.Measurement.value
|
|
1155
|
-
|
|
1156
|
-
def dependencies(self) -> list[str]:
|
|
1157
|
-
return []
|
|
1158
|
-
|
|
1159
|
-
def resource_allocation(self) -> Optional[ResourceAllocation]:
|
|
1160
|
-
return None
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
1144
|
class SafetyCaseSpec(DyffSchemaBaseModel):
|
|
1164
1145
|
name: str = pydantic.Field(description="Descriptive name of the SafetyCase.")
|
|
1165
1146
|
description: Optional[str] = pydantic.Field(
|
|
@@ -1167,16 +1148,6 @@ class SafetyCaseSpec(DyffSchemaBaseModel):
|
|
|
1167
1148
|
)
|
|
1168
1149
|
|
|
1169
1150
|
|
|
1170
|
-
class SafetyCase(DyffEntity, SafetyCaseSpec, AnalysisOutputQueryFields):
|
|
1171
|
-
kind: Literal["SafetyCase"] = Entities.SafetyCase.value
|
|
1172
|
-
|
|
1173
|
-
def dependencies(self) -> list[str]:
|
|
1174
|
-
return []
|
|
1175
|
-
|
|
1176
|
-
def resource_allocation(self) -> Optional[ResourceAllocation]:
|
|
1177
|
-
return None
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
1151
|
class MethodImplementationKind(str, enum.Enum):
|
|
1181
1152
|
JupyterNotebook = "JupyterNotebook"
|
|
1182
1153
|
PythonFunction = "PythonFunction"
|
|
@@ -1286,9 +1257,19 @@ class MethodOutput(DyffSchemaBaseModel):
|
|
|
1286
1257
|
)
|
|
1287
1258
|
|
|
1288
1259
|
|
|
1260
|
+
class MethodScope(str, enum.Enum):
|
|
1261
|
+
InferenceService = Entities.InferenceService.value
|
|
1262
|
+
Evaluation = Entities.Evaluation.value
|
|
1263
|
+
|
|
1264
|
+
|
|
1289
1265
|
class MethodBase(DyffSchemaBaseModel):
|
|
1290
1266
|
name: str = pydantic.Field(description="Descriptive name of the Method.")
|
|
1291
1267
|
|
|
1268
|
+
scope: MethodScope = pydantic.Field(
|
|
1269
|
+
description="The scope of the Method. The Method produces outputs that"
|
|
1270
|
+
" are specific to one entity of the type specified in the .scope field."
|
|
1271
|
+
)
|
|
1272
|
+
|
|
1292
1273
|
description: Optional[str] = pydantic.Field(
|
|
1293
1274
|
default=None, description="Long-form description, interpreted as Markdown."
|
|
1294
1275
|
)
|
|
@@ -1327,7 +1308,7 @@ class Method(DyffEntity, MethodBase):
|
|
|
1327
1308
|
return None
|
|
1328
1309
|
|
|
1329
1310
|
|
|
1330
|
-
class
|
|
1311
|
+
class AnalysisInput(DyffSchemaBaseModel):
|
|
1331
1312
|
keyword: str = pydantic.Field(
|
|
1332
1313
|
description="The 'keyword' specified for this input in the MethodSpec."
|
|
1333
1314
|
)
|
|
@@ -1350,24 +1331,48 @@ class ForeignMethod(DyffModelWithID, MethodBase):
|
|
|
1350
1331
|
pass
|
|
1351
1332
|
|
|
1352
1333
|
|
|
1334
|
+
class AnalysisScope(DyffSchemaBaseModel):
|
|
1335
|
+
dataset: Optional[str]
|
|
1336
|
+
inferenceService: Optional[str]
|
|
1337
|
+
evaluation: Optional[str]
|
|
1338
|
+
model: Optional[str]
|
|
1339
|
+
|
|
1340
|
+
|
|
1353
1341
|
class AnalysisBase(DyffSchemaBaseModel):
|
|
1342
|
+
scope: AnalysisScope = pydantic.Field(
|
|
1343
|
+
description="The specific entities to which the analysis results apply."
|
|
1344
|
+
" At a minimum, the field corresponding to method.scope must be set."
|
|
1345
|
+
)
|
|
1346
|
+
|
|
1354
1347
|
arguments: list[AnalysisArgument] = pydantic.Field(
|
|
1355
1348
|
default_factory=list,
|
|
1356
1349
|
description="Arguments to pass to the Method implementation.",
|
|
1357
1350
|
)
|
|
1358
1351
|
|
|
1359
|
-
inputs: list[
|
|
1352
|
+
inputs: list[AnalysisInput] = pydantic.Field(
|
|
1360
1353
|
default_factory=list, description="Mapping of keywords to data entities."
|
|
1361
1354
|
)
|
|
1362
1355
|
|
|
1363
1356
|
|
|
1364
|
-
class Analysis(
|
|
1365
|
-
kind: Literal["Analysis"] = Entities.Analysis.value
|
|
1366
|
-
|
|
1357
|
+
class Analysis(AnalysisBase):
|
|
1367
1358
|
method: ForeignMethod = pydantic.Field(
|
|
1368
1359
|
description="The analysis Method to run.",
|
|
1369
1360
|
)
|
|
1370
1361
|
|
|
1362
|
+
|
|
1363
|
+
class Measurement(DyffEntity, MeasurementSpec, Analysis):
|
|
1364
|
+
kind: Literal["Measurement"] = Entities.Measurement.value
|
|
1365
|
+
|
|
1366
|
+
def dependencies(self) -> list[str]:
|
|
1367
|
+
return [self.method.id] + [x.entity for x in self.inputs]
|
|
1368
|
+
|
|
1369
|
+
def resource_allocation(self) -> Optional[ResourceAllocation]:
|
|
1370
|
+
return None
|
|
1371
|
+
|
|
1372
|
+
|
|
1373
|
+
class SafetyCase(DyffEntity, SafetyCaseSpec, Analysis):
|
|
1374
|
+
kind: Literal["SafetyCase"] = Entities.SafetyCase.value
|
|
1375
|
+
|
|
1371
1376
|
def dependencies(self) -> list[str]:
|
|
1372
1377
|
return [self.method.id] + [x.entity for x in self.inputs]
|
|
1373
1378
|
|
|
@@ -1375,6 +1380,27 @@ class Analysis(DyffEntity, AnalysisBase):
|
|
|
1375
1380
|
return None
|
|
1376
1381
|
|
|
1377
1382
|
|
|
1383
|
+
# class Analysis(DyffEntity, AnalysisBase):
|
|
1384
|
+
# kind: Literal["Analysis"] = Entities.Analysis.value
|
|
1385
|
+
|
|
1386
|
+
# method: ForeignMethod = pydantic.Field(
|
|
1387
|
+
# description="The analysis Method to run.",
|
|
1388
|
+
# )
|
|
1389
|
+
|
|
1390
|
+
# def dependencies(self) -> list[str]:
|
|
1391
|
+
# return [self.method.id] + [x.entity for x in self.inputs]
|
|
1392
|
+
|
|
1393
|
+
# def resource_allocation(self) -> Optional[ResourceAllocation]:
|
|
1394
|
+
# return None
|
|
1395
|
+
|
|
1396
|
+
|
|
1397
|
+
# class AnalysisAndOutputs(DyffSchemaBaseModel):
|
|
1398
|
+
# analysis: Analysis = pydantic.Field(description="The Analysis entity")
|
|
1399
|
+
# outputs: list[AnalysisOutputType] = pydantic.Field(
|
|
1400
|
+
# description="Concrete outputs of the Analysis"
|
|
1401
|
+
# )
|
|
1402
|
+
|
|
1403
|
+
|
|
1378
1404
|
# ---------------------------------------------------------------------------
|
|
1379
1405
|
# Status enumerations
|
|
1380
1406
|
|
|
@@ -1638,7 +1664,6 @@ def entity_class(kind: Entities):
|
|
|
1638
1664
|
|
|
1639
1665
|
|
|
1640
1666
|
DyffEntityType = Union[
|
|
1641
|
-
Analysis,
|
|
1642
1667
|
Audit,
|
|
1643
1668
|
AuditProcedure,
|
|
1644
1669
|
DataSource,
|
|
@@ -1662,7 +1687,7 @@ __all__ = [
|
|
|
1662
1687
|
"Analysis",
|
|
1663
1688
|
"AnalysisArgument",
|
|
1664
1689
|
"AnalysisBase",
|
|
1665
|
-
"
|
|
1690
|
+
"AnalysisInput",
|
|
1666
1691
|
"AnalysisOutputQueryFields",
|
|
1667
1692
|
"Annotation",
|
|
1668
1693
|
"APIFunctions",
|
|
@@ -1689,6 +1714,7 @@ __all__ = [
|
|
|
1689
1714
|
"EvaluationBase",
|
|
1690
1715
|
"ExtractorStep",
|
|
1691
1716
|
"ForeignInferenceService",
|
|
1717
|
+
"ForeignMethod",
|
|
1692
1718
|
"ForeignModel",
|
|
1693
1719
|
"Frameworks",
|
|
1694
1720
|
"InferenceInterface",
|
|
@@ -1722,6 +1748,7 @@ __all__ = [
|
|
|
1722
1748
|
"MethodOutput",
|
|
1723
1749
|
"MethodOutputKind",
|
|
1724
1750
|
"MethodParameter",
|
|
1751
|
+
"MethodScope",
|
|
1725
1752
|
"Model",
|
|
1726
1753
|
"ModelArtifact",
|
|
1727
1754
|
"ModelArtifactHuggingFaceCache",
|
dyff/schema/v0/r1/requests.py
CHANGED
|
@@ -131,21 +131,17 @@ class DyffEntityQueryRequest(DyffSchemaBaseModel):
|
|
|
131
131
|
|
|
132
132
|
|
|
133
133
|
class _AnalysisProductQueryRequest(DyffEntityQueryRequest):
|
|
134
|
-
|
|
135
|
-
datasetName: Optional[str] = pydantic.Field(default=None)
|
|
136
|
-
evaluation: Optional[str] = pydantic.Field(default=None)
|
|
137
|
-
inferenceService: Optional[str] = pydantic.Field(default=None)
|
|
138
|
-
inferenceServiceName: Optional[str] = pydantic.Field(default=None)
|
|
134
|
+
analysis: Optional[str] = pydantic.Field(default=None)
|
|
139
135
|
method: Optional[str] = pydantic.Field(default=None)
|
|
140
136
|
methodName: Optional[str] = pydantic.Field(default=None)
|
|
141
|
-
|
|
142
|
-
modelName: Optional[str] = pydantic.Field(default=None)
|
|
137
|
+
inputsAnyOf: Optional[str] = pydantic.Field(default=None)
|
|
143
138
|
|
|
144
139
|
|
|
145
140
|
class AnalysisQueryRequest(DyffEntityQueryRequest):
|
|
146
141
|
method: Optional[str] = pydantic.Field(default=None)
|
|
147
142
|
methodName: Optional[str] = pydantic.Field(default=None)
|
|
148
143
|
methodOutputKind: Optional[str] = pydantic.Field(default=None)
|
|
144
|
+
inputsAnyOf: Optional[str] = pydantic.Field(default=None)
|
|
149
145
|
|
|
150
146
|
|
|
151
147
|
class AuditQueryRequest(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=IoonxCKyPTnVNCmiGIxT9xG3m06V8wRmf_iuzcocPm0,55462
|
|
25
|
+
dyff/schema/v0/r1/requests.py,sha256=ZD31iDNyJQFDzJlFrSsDBorS7TXyhRBk-R6oG7PI3kE,7762
|
|
26
26
|
dyff/schema/v0/r1/test.py,sha256=X6dUyVd5svcPCI-PBMOAqEfK9jv3bRDvkQTJzwS96c0,10720
|
|
27
27
|
dyff/schema/v0/r1/version.py,sha256=SG9ds8afHgdrqOA4CEY8-MM3lKfAE9G0rxsG4uyeglE,363
|
|
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.3.
|
|
37
|
-
dyff_schema-0.3.
|
|
38
|
-
dyff_schema-0.3.
|
|
39
|
-
dyff_schema-0.3.
|
|
40
|
-
dyff_schema-0.3.
|
|
41
|
-
dyff_schema-0.3.
|
|
36
|
+
dyff_schema-0.3.7.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
37
|
+
dyff_schema-0.3.7.dist-info/METADATA,sha256=FIKMxpdwwuY4OzJXANPAZmsiQF4OQmgaZJid44UqoMY,3459
|
|
38
|
+
dyff_schema-0.3.7.dist-info/NOTICE,sha256=YONACu0s_Ui6jNi-wtEsVQbTU1JIkh8wvLH6d1-Ni_w,43
|
|
39
|
+
dyff_schema-0.3.7.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
40
|
+
dyff_schema-0.3.7.dist-info/top_level.txt,sha256=9e3VVdeX73t_sUJOPQPCcGtYO1JhoErhHIi3WoWGcFI,5
|
|
41
|
+
dyff_schema-0.3.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|