dyff-schema 0.35.4__tar.gz → 0.35.5__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.35.4/dyff_schema.egg-info → dyff_schema-0.35.5}/PKG-INFO +1 -1
- dyff_schema-0.35.5/dyff/schema/_version.py +2 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/v0/r1/oci.py +5 -7
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/v0/r1/platform.py +7 -5
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/v0/r1/requests.py +15 -13
- {dyff_schema-0.35.4 → dyff_schema-0.35.5/dyff_schema.egg-info}/PKG-INFO +1 -1
- dyff_schema-0.35.4/dyff/schema/_version.py +0 -2
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/.gitignore +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/.gitlab-ci.yml +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/.idea/dyff-schema.iml +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/.licenserc.yaml +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/.pre-commit-config.yaml +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/.prettierignore +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/.secrets.baseline +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/CODE_OF_CONDUCT.md +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/LICENSE +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/NOTICE +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/README.md +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/__init__.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/adapters.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/annotations.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/base.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/commands.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/copydoc.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/dataset/__init__.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/dataset/arrow.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/dataset/binary.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/dataset/classification.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/dataset/embedding.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/dataset/text.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/dataset/vision.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/errors.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/ids.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/io/__init__.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/io/vllm.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/platform.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/py.typed +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/quantity.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/requests.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/responses.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/test.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/v0/__init__.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/v0/r1/__init__.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/v0/r1/adapters.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/v0/r1/base.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/v0/r1/commands.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/v0/r1/dataset/__init__.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/v0/r1/dataset/arrow.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/v0/r1/dataset/binary.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/v0/r1/dataset/classification.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/v0/r1/dataset/embedding.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/v0/r1/dataset/text.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/v0/r1/dataset/vision.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/v0/r1/io/__init__.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/v0/r1/io/vllm.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/v0/r1/responses.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/v0/r1/test.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/v0/r1/version.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff/schema/version.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff_schema.egg-info/SOURCES.txt +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff_schema.egg-info/dependency_links.txt +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff_schema.egg-info/requires.txt +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/dyff_schema.egg-info/top_level.txt +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/makefile +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/pyproject.toml +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/setup.cfg +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/tests/test_adapters.py +0 -0
- {dyff_schema-0.35.4 → dyff_schema-0.35.5}/tests/test_import.py +0 -0
|
@@ -53,18 +53,16 @@ class _OCISchemaBaseModel(pydantic.BaseModel):
|
|
|
53
53
|
)
|
|
54
54
|
|
|
55
55
|
@pydantic.model_validator(mode="after")
|
|
56
|
-
def _ensure_datetime_timezone_utc(
|
|
57
|
-
for field_name, field_value in
|
|
56
|
+
def _ensure_datetime_timezone_utc(self):
|
|
57
|
+
for field_name, field_value in self.__dict__.items():
|
|
58
58
|
if isinstance(field_value, datetime):
|
|
59
59
|
if field_value.tzinfo is None:
|
|
60
60
|
# Set UTC timezone for naive datetime
|
|
61
|
-
setattr(
|
|
62
|
-
values, field_name, field_value.replace(tzinfo=timezone.utc)
|
|
63
|
-
)
|
|
61
|
+
setattr(self, field_name, field_value.replace(tzinfo=timezone.utc))
|
|
64
62
|
elif field_value.tzinfo != timezone.utc:
|
|
65
63
|
# Convert to UTC timezone
|
|
66
|
-
setattr(
|
|
67
|
-
return
|
|
64
|
+
setattr(self, field_name, field_value.astimezone(timezone.utc))
|
|
65
|
+
return self
|
|
68
66
|
|
|
69
67
|
|
|
70
68
|
class _DigestMixin(pydantic.BaseModel):
|
|
@@ -730,7 +730,9 @@ class FamilyMemberBase(DyffSchemaBaseModel):
|
|
|
730
730
|
description="ID of the resource this member references.",
|
|
731
731
|
)
|
|
732
732
|
|
|
733
|
-
description: Optional[
|
|
733
|
+
description: Optional[
|
|
734
|
+
Annotated[str, StringConstraints(max_length=summary_maxlen())]
|
|
735
|
+
] = pydantic.Field( # type: ignore
|
|
734
736
|
default=None,
|
|
735
737
|
description="A short description of the member."
|
|
736
738
|
" This should describe how this version of the resource"
|
|
@@ -2003,12 +2005,12 @@ class ScoreSpec(DyffSchemaBaseModel):
|
|
|
2003
2005
|
return self.format_quantity(self.format, quantity, unit=self.unit)
|
|
2004
2006
|
|
|
2005
2007
|
@pydantic.model_validator(mode="after")
|
|
2006
|
-
def _validate_minimum_maximum(
|
|
2007
|
-
minimum =
|
|
2008
|
-
maximum =
|
|
2008
|
+
def _validate_minimum_maximum(self):
|
|
2009
|
+
minimum = self.minimum
|
|
2010
|
+
maximum = self.maximum
|
|
2009
2011
|
if minimum is not None and maximum is not None and minimum > maximum:
|
|
2010
2012
|
raise ValueError(f"minimum {minimum} is greater than maximum {maximum}")
|
|
2011
|
-
return
|
|
2013
|
+
return self
|
|
2012
2014
|
|
|
2013
2015
|
@pydantic.field_validator("format")
|
|
2014
2016
|
def _validate_format(cls, v):
|
|
@@ -60,12 +60,14 @@ class DyffRequestDefaultValidators(DyffBaseModel):
|
|
|
60
60
|
"""
|
|
61
61
|
|
|
62
62
|
@pydantic.model_validator(mode="after")
|
|
63
|
-
def _require_datetime_timezone_aware(
|
|
64
|
-
for k, v in
|
|
63
|
+
def _require_datetime_timezone_aware(self):
|
|
64
|
+
for k, v in self.__dict__.items():
|
|
65
65
|
if isinstance(v, datetime):
|
|
66
66
|
if v.tzinfo is None:
|
|
67
|
-
raise ValueError(
|
|
68
|
-
|
|
67
|
+
raise ValueError(
|
|
68
|
+
f"{self.__class__.__qualname__}.{k}: timezone not set"
|
|
69
|
+
)
|
|
70
|
+
return self
|
|
69
71
|
|
|
70
72
|
|
|
71
73
|
class DyffRequestBase(SchemaVersion, DyffRequestDefaultValidators):
|
|
@@ -171,14 +173,14 @@ class InferenceServiceCreateRequest(DyffEntityCreateRequest, InferenceServiceBas
|
|
|
171
173
|
)
|
|
172
174
|
|
|
173
175
|
@pydantic.model_validator(mode="after")
|
|
174
|
-
def check_runner_and_image_specified(
|
|
175
|
-
if
|
|
176
|
+
def check_runner_and_image_specified(self):
|
|
177
|
+
if self.runner is None:
|
|
176
178
|
raise ValueError("must specify .runner in new inference services")
|
|
177
|
-
image =
|
|
178
|
-
imageRef =
|
|
179
|
+
image = self.runner.image is not None
|
|
180
|
+
imageRef = self.runner.imageRef is not None
|
|
179
181
|
if sum([image, imageRef]) != 1:
|
|
180
182
|
raise ValueError("must specify exactly one of .runner.{image, imageRef}")
|
|
181
|
-
return
|
|
183
|
+
return self
|
|
182
184
|
|
|
183
185
|
|
|
184
186
|
class InferenceSessionCreateRequest(DyffEntityCreateRequest, InferenceSessionBase):
|
|
@@ -213,14 +215,14 @@ class EvaluationCreateRequest(DyffEntityCreateRequest, EvaluationBase):
|
|
|
213
215
|
)
|
|
214
216
|
|
|
215
217
|
@pydantic.model_validator(mode="after")
|
|
216
|
-
def check_session_exactly_one(
|
|
217
|
-
session =
|
|
218
|
-
session_ref =
|
|
218
|
+
def check_session_exactly_one(self):
|
|
219
|
+
session = self.inferenceSession is not None
|
|
220
|
+
session_ref = self.inferenceSessionReference is not None
|
|
219
221
|
if not (session ^ session_ref):
|
|
220
222
|
raise ValueError(
|
|
221
223
|
"must specify exactly one of {inferenceSession, inferenceSessionReference}"
|
|
222
224
|
)
|
|
223
|
-
return
|
|
225
|
+
return self
|
|
224
226
|
|
|
225
227
|
@staticmethod
|
|
226
228
|
def repeat_of(evaluation: Evaluation) -> EvaluationCreateRequest:
|
|
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
|
|
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
|