dyff-schema 0.34.0__tar.gz → 0.35.0__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.

Files changed (68) hide show
  1. {dyff_schema-0.34.0/dyff_schema.egg-info → dyff_schema-0.35.0}/PKG-INFO +1 -1
  2. dyff_schema-0.35.0/dyff/schema/_version.py +2 -0
  3. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/v0/r1/platform.py +9 -17
  4. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/v0/r1/requests.py +9 -9
  5. {dyff_schema-0.34.0 → dyff_schema-0.35.0/dyff_schema.egg-info}/PKG-INFO +1 -1
  6. dyff_schema-0.34.0/dyff/schema/_version.py +0 -2
  7. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/.gitignore +0 -0
  8. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/.gitlab-ci.yml +0 -0
  9. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/.idea/dyff-schema.iml +0 -0
  10. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/.licenserc.yaml +0 -0
  11. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/.pre-commit-config.yaml +0 -0
  12. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/.prettierignore +0 -0
  13. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/.secrets.baseline +0 -0
  14. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/CODE_OF_CONDUCT.md +0 -0
  15. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/LICENSE +0 -0
  16. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/NOTICE +0 -0
  17. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/README.md +0 -0
  18. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/__init__.py +0 -0
  19. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/adapters.py +0 -0
  20. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/annotations.py +0 -0
  21. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/base.py +0 -0
  22. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/commands.py +0 -0
  23. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/copydoc.py +0 -0
  24. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/dataset/__init__.py +0 -0
  25. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/dataset/arrow.py +0 -0
  26. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/dataset/binary.py +0 -0
  27. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/dataset/classification.py +0 -0
  28. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/dataset/embedding.py +0 -0
  29. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/dataset/text.py +0 -0
  30. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/dataset/vision.py +0 -0
  31. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/errors.py +0 -0
  32. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/ids.py +0 -0
  33. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/io/__init__.py +0 -0
  34. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/io/vllm.py +0 -0
  35. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/platform.py +0 -0
  36. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/py.typed +0 -0
  37. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/quantity.py +0 -0
  38. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/requests.py +0 -0
  39. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/responses.py +0 -0
  40. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/test.py +0 -0
  41. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/v0/__init__.py +0 -0
  42. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/v0/r1/__init__.py +0 -0
  43. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/v0/r1/adapters.py +0 -0
  44. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/v0/r1/base.py +0 -0
  45. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/v0/r1/commands.py +0 -0
  46. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/v0/r1/dataset/__init__.py +0 -0
  47. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/v0/r1/dataset/arrow.py +0 -0
  48. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/v0/r1/dataset/binary.py +0 -0
  49. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/v0/r1/dataset/classification.py +0 -0
  50. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/v0/r1/dataset/embedding.py +0 -0
  51. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/v0/r1/dataset/text.py +0 -0
  52. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/v0/r1/dataset/vision.py +0 -0
  53. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/v0/r1/io/__init__.py +0 -0
  54. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/v0/r1/io/vllm.py +0 -0
  55. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/v0/r1/oci.py +0 -0
  56. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/v0/r1/responses.py +0 -0
  57. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/v0/r1/test.py +0 -0
  58. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/v0/r1/version.py +0 -0
  59. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff/schema/version.py +0 -0
  60. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff_schema.egg-info/SOURCES.txt +0 -0
  61. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff_schema.egg-info/dependency_links.txt +0 -0
  62. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff_schema.egg-info/requires.txt +0 -0
  63. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/dyff_schema.egg-info/top_level.txt +0 -0
  64. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/makefile +0 -0
  65. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/pyproject.toml +0 -0
  66. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/setup.cfg +0 -0
  67. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/tests/test_adapters.py +0 -0
  68. {dyff_schema-0.34.0 → dyff_schema-0.35.0}/tests/test_import.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dyff-schema
3
- Version: 0.34.0
3
+ Version: 0.35.0
4
4
  Summary: Data models for the Dyff AI auditing platform.
5
5
  Author-email: Digital Safety Research Institute <contact@dsri.org>
6
6
  License: Apache-2.0
@@ -0,0 +1,2 @@
1
+ __version__ = version = "0.35.0"
2
+ __version_tuple__ = version_tuple = (0, 35, 0)
@@ -1440,20 +1440,17 @@ class Container(DyffSchemaBaseModel):
1440
1440
  " which might be configured in the container image.",
1441
1441
  )
1442
1442
 
1443
- @pydantic.model_validator(mode="after")
1444
- def check_image_exactly_one(cls, values):
1445
- image = values.image is not None
1446
- imageRef = values.imageRef is not None
1447
- if sum([image, imageRef]) != 1:
1448
- raise ValueError("must specify exactly one of {image, imageRef}")
1449
- return values
1450
-
1451
1443
 
1452
1444
  class InferenceServiceRunner(Container):
1453
- """Configuration of a managed runner to use to run an inference service.
1445
+ """Configuration of the runtime environment to use to run an inference service.
1454
1446
 
1455
- Using a managed runner simplifies the configuration of inference services backed by
1456
- models in common formats, such as HuggingFace models.
1447
+ You can run the service in an arbitrary Docker container by using
1448
+ ``.kind == "container" and setting ``.imageRef`` to a container image that
1449
+ has been uploaded to Dyff using the ``/artifacts/create`` API.
1450
+
1451
+ Other runner kinds are "managed" runners that are maintained as part of the
1452
+ Dyff project. Using a managed runner simplifies the configuration of
1453
+ inference services backed by models in common formats, such as HuggingFace models.
1457
1454
  """
1458
1455
 
1459
1456
  kind: InferenceServiceRunnerKind
@@ -1500,8 +1497,7 @@ class InferenceServiceBase(DyffSchemaBaseModel):
1500
1497
  # FIXME: (DYFF-261) .runner should be required
1501
1498
  runner: Optional[InferenceServiceRunner] = pydantic.Field(
1502
1499
  default=None,
1503
- description="Configuration of the managed runner used to run the service."
1504
- " Only one of .container or .runner may be specified.",
1500
+ description="Configuration of the managed runner used to run the service.",
1505
1501
  )
1506
1502
 
1507
1503
  interface: InferenceInterface = pydantic.Field(
@@ -2284,10 +2280,6 @@ class Score(ScoreData):
2284
2280
  class OCIArtifact(DyffEntity):
2285
2281
  kind: Literal["OCIArtifact"] = Entities.Artifact.value
2286
2282
 
2287
- manifest: oci.ImageManifest = pydantic.Field(
2288
- description="The OCI image manifest of the artifact"
2289
- )
2290
-
2291
2283
  def dependencies(self) -> list[str]:
2292
2284
  return []
2293
2285
 
@@ -170,15 +170,15 @@ class InferenceServiceCreateRequest(DyffEntityCreateRequest, InferenceServiceBas
170
170
  default=None, description="ID of Model backing the service, if applicable"
171
171
  )
172
172
 
173
- # TODO: (DYFF-421) Make .image required and remove this validator
174
- @pydantic.field_validator("image", check_fields=False)
175
- def validate_image_not_none(cls, v):
176
- if v is None:
177
- raise ValueError(
178
- ".image is required for new services; it is defined as Optional"
179
- " for schema backwards-compatibility only"
180
- )
181
- return v
173
+ @pydantic.model_validator(mode="after")
174
+ def check_runner_and_image_specified(cls, values):
175
+ if values.runner is None:
176
+ raise ValueError("must specify .runner in new inference services")
177
+ image = values.runner.image is not None
178
+ imageRef = values.runner.imageRef is not None
179
+ if sum([image, imageRef]) != 1:
180
+ raise ValueError("must specify exactly one of .runner.{image, imageRef}")
181
+ return values
182
182
 
183
183
 
184
184
  class InferenceSessionCreateRequest(DyffEntityCreateRequest, InferenceSessionBase):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dyff-schema
3
- Version: 0.34.0
3
+ Version: 0.35.0
4
4
  Summary: Data models for the Dyff AI auditing platform.
5
5
  Author-email: Digital Safety Research Institute <contact@dsri.org>
6
6
  License: Apache-2.0
@@ -1,2 +0,0 @@
1
- __version__ = version = "0.34.0"
2
- __version_tuple__ = version_tuple = (0, 34, 0)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes