dyff-schema 0.6.0__tar.gz → 0.7.1__tar.gz
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-0.6.0 → dyff_schema-0.7.1}/.gitlab-ci.yml +1 -1
- {dyff_schema-0.6.0/dyff_schema.egg-info → dyff_schema-0.7.1}/PKG-INFO +1 -1
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff/schema/v0/r1/base.py +9 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff/schema/v0/r1/platform.py +10 -5
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff/schema/v0/r1/requests.py +14 -4
- {dyff_schema-0.6.0 → dyff_schema-0.7.1/dyff_schema.egg-info}/PKG-INFO +1 -1
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/.gitignore +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/.licenserc.yaml +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/.pre-commit-config.yaml +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/.prettierignore +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/.secrets.baseline +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/CODE_OF_CONDUCT.md +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/LICENSE +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/NOTICE +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/README.md +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff/schema/__init__.py +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff/schema/adapters.py +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff/schema/base.py +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff/schema/copydoc.py +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff/schema/dataset/__init__.py +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff/schema/dataset/arrow.py +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff/schema/dataset/binary.py +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff/schema/dataset/classification.py +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff/schema/dataset/text.py +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff/schema/dataset/vision.py +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff/schema/ids.py +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff/schema/io/__init__.py +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff/schema/io/vllm.py +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff/schema/platform.py +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff/schema/py.typed +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff/schema/quantity.py +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff/schema/requests.py +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff/schema/test.py +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff/schema/v0/__init__.py +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff/schema/v0/r1/__init__.py +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff/schema/v0/r1/adapters.py +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff/schema/v0/r1/dataset/__init__.py +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff/schema/v0/r1/dataset/arrow.py +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff/schema/v0/r1/dataset/binary.py +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff/schema/v0/r1/dataset/classification.py +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff/schema/v0/r1/dataset/text.py +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff/schema/v0/r1/dataset/vision.py +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff/schema/v0/r1/io/__init__.py +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff/schema/v0/r1/io/vllm.py +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff/schema/v0/r1/test.py +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff/schema/v0/r1/version.py +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff/schema/version.py +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff_schema.egg-info/SOURCES.txt +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff_schema.egg-info/dependency_links.txt +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff_schema.egg-info/requires.txt +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/dyff_schema.egg-info/top_level.txt +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/makefile +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/pyproject.toml +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/setup.cfg +0 -0
- {dyff_schema-0.6.0 → dyff_schema-0.7.1}/tests/test_import.py +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# SPDX-FileCopyrightText: 2024 UL Research Institutes
|
|
2
2
|
# SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
+
from datetime import datetime
|
|
4
5
|
from typing import Any, Generic, NamedTuple, Optional, Type, TypeVar
|
|
5
6
|
|
|
6
7
|
import pydantic
|
|
@@ -563,6 +564,14 @@ class DyffSchemaBaseModel(pydantic.BaseModel):
|
|
|
563
564
|
Python reserved words like 'bytes' as field names.
|
|
564
565
|
"""
|
|
565
566
|
|
|
567
|
+
@pydantic.root_validator
|
|
568
|
+
def _require_datetime_timezone_aware(cls, values):
|
|
569
|
+
for k, v in values.items():
|
|
570
|
+
if isinstance(v, datetime):
|
|
571
|
+
if v.tzinfo is None:
|
|
572
|
+
raise ValueError(f"{cls.__qualname__}.{k}: timezone not set")
|
|
573
|
+
return values
|
|
574
|
+
|
|
566
575
|
def dict(self, *, by_alias: bool = True, **kwargs) -> dict[str, Any]:
|
|
567
576
|
return super().dict(by_alias=by_alias, **kwargs)
|
|
568
577
|
|
|
@@ -298,7 +298,7 @@ class Status(DyffSchemaBaseModel):
|
|
|
298
298
|
)
|
|
299
299
|
|
|
300
300
|
|
|
301
|
-
class
|
|
301
|
+
class DocumentationBase(DyffSchemaBaseModel):
|
|
302
302
|
title: Optional[str] = pydantic.Field(
|
|
303
303
|
default=None,
|
|
304
304
|
description='A short plain string suitable as a title or "headline".',
|
|
@@ -318,9 +318,13 @@ class Documentation(DyffSchemaBaseModel):
|
|
|
318
318
|
)
|
|
319
319
|
|
|
320
320
|
|
|
321
|
+
class Documentation(SchemaVersion, DocumentationBase):
|
|
322
|
+
pass
|
|
323
|
+
|
|
324
|
+
|
|
321
325
|
class Documented(DyffSchemaBaseModel):
|
|
322
|
-
documentation:
|
|
323
|
-
default_factory=
|
|
326
|
+
documentation: DocumentationBase = pydantic.Field(
|
|
327
|
+
default_factory=DocumentationBase,
|
|
324
328
|
description="Documentation of the resource. The content is used to"
|
|
325
329
|
" populate various views in the web UI.",
|
|
326
330
|
)
|
|
@@ -380,8 +384,8 @@ class Family(Labeled, SchemaVersion, DyffModelWithID):
|
|
|
380
384
|
description="Tags mapping interpretable names to resource IDs.",
|
|
381
385
|
)
|
|
382
386
|
|
|
383
|
-
documentation:
|
|
384
|
-
default_factory=
|
|
387
|
+
documentation: DocumentationBase = pydantic.Field(
|
|
388
|
+
default_factory=DocumentationBase,
|
|
385
389
|
description="Documentation of the resource family. The content is used"
|
|
386
390
|
" to populate various views in the web UI.",
|
|
387
391
|
)
|
|
@@ -1861,6 +1865,7 @@ __all__ = [
|
|
|
1861
1865
|
"DataView",
|
|
1862
1866
|
"Digest",
|
|
1863
1867
|
"Documentation",
|
|
1868
|
+
"DocumentationBase",
|
|
1864
1869
|
"DyffDataSchema",
|
|
1865
1870
|
"DyffEntity",
|
|
1866
1871
|
"DyffModelWithID",
|
|
@@ -13,6 +13,7 @@ in response.
|
|
|
13
13
|
"""
|
|
14
14
|
|
|
15
15
|
|
|
16
|
+
from datetime import datetime
|
|
16
17
|
from typing import Any, Optional, Union
|
|
17
18
|
|
|
18
19
|
import pydantic
|
|
@@ -22,7 +23,7 @@ from .platform import (
|
|
|
22
23
|
AnalysisBase,
|
|
23
24
|
DatasetBase,
|
|
24
25
|
DataView,
|
|
25
|
-
|
|
26
|
+
DocumentationBase,
|
|
26
27
|
EvaluationBase,
|
|
27
28
|
InferenceServiceBase,
|
|
28
29
|
InferenceSessionBase,
|
|
@@ -51,7 +52,7 @@ class DatasetCreateRequest(DyffEntityCreateRequest, DatasetBase):
|
|
|
51
52
|
pass
|
|
52
53
|
|
|
53
54
|
|
|
54
|
-
class DocumentationEditRequest(
|
|
55
|
+
class DocumentationEditRequest(SchemaVersion, DocumentationBase):
|
|
55
56
|
pass
|
|
56
57
|
|
|
57
58
|
|
|
@@ -65,6 +66,14 @@ class InferenceSessionCreateRequest(DyffEntityCreateRequest, InferenceSessionBas
|
|
|
65
66
|
inferenceService: str = pydantic.Field(description="InferenceService ID")
|
|
66
67
|
|
|
67
68
|
|
|
69
|
+
class InferenceSessionTokenCreateRequest(SchemaVersion, DyffSchemaBaseModel):
|
|
70
|
+
expires: Optional[datetime] = pydantic.Field(
|
|
71
|
+
default=None,
|
|
72
|
+
description="Expiration time of the token. Must be <= expiration time"
|
|
73
|
+
" of session. Default: expiration time of session.",
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
|
|
68
77
|
class EvaluationInferenceSessionRequest(InferenceSessionBase):
|
|
69
78
|
inferenceService: str = pydantic.Field(description="InferenceService ID")
|
|
70
79
|
|
|
@@ -128,11 +137,11 @@ class ReportCreateRequest(DyffEntityCreateRequest, ReportBase):
|
|
|
128
137
|
)
|
|
129
138
|
|
|
130
139
|
|
|
131
|
-
class TagCreateRequest(TagBase):
|
|
140
|
+
class TagCreateRequest(SchemaVersion, TagBase):
|
|
132
141
|
pass
|
|
133
142
|
|
|
134
143
|
|
|
135
|
-
class LabelUpdateRequest(Labeled):
|
|
144
|
+
class LabelUpdateRequest(SchemaVersion, Labeled):
|
|
136
145
|
pass
|
|
137
146
|
|
|
138
147
|
|
|
@@ -241,6 +250,7 @@ __all__ = [
|
|
|
241
250
|
"InferenceServiceQueryRequest",
|
|
242
251
|
"InferenceSessionCreateRequest",
|
|
243
252
|
"InferenceSessionQueryRequest",
|
|
253
|
+
"InferenceSessionTokenCreateRequest",
|
|
244
254
|
"LabelUpdateRequest",
|
|
245
255
|
"MeasurementQueryRequest",
|
|
246
256
|
"MethodCreateRequest",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|