Skip to content

Commit

Permalink
fix: replace definition templates with the schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
eloy-encord committed Apr 12, 2024
1 parent f9cb8dd commit d1f5236
Show file tree
Hide file tree
Showing 4 changed files with 132 additions and 16 deletions.
70 changes: 70 additions & 0 deletions sources/datasets/dataset-definition-schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"$defs": {
"Split": {
"enum": [
"train",
"validation",
"test",
"all"
],
"title": "Split",
"type": "string"
}
},
"additionalProperties": true,
"properties": {
"dataset_type": {
"title": "Dataset Type",
"type": "string"
},
"module_path": {
"format": "path",
"title": "Module Path",
"type": "string"
},
"title": {
"title": "Title",
"type": "string"
},
"split": {
"allOf": [
{
"$ref": "#/$defs/Split"
}
],
"default": "all"
},
"title_in_source": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Title In Source"
},
"cache_dir": {
"anyOf": [
{
"format": "path",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Dir"
}
},
"required": [
"dataset_type",
"module_path",
"title"
],
"title": "DatasetDefinitionSpec",
"type": "object"
}
8 changes: 0 additions & 8 deletions sources/datasets/dataset-definition-template.json

This file was deleted.

62 changes: 62 additions & 0 deletions sources/models/model-definition-schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"additionalProperties": true,
"properties": {
"model_type": {
"title": "Model Type",
"type": "string"
},
"module_path": {
"format": "path",
"title": "Module Path",
"type": "string"
},
"title": {
"title": "Title",
"type": "string"
},
"device": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Device"
},
"title_in_source": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Title In Source"
},
"cache_dir": {
"anyOf": [
{
"format": "path",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Dir"
}
},
"required": [
"model_type",
"module_path",
"title"
],
"title": "ModelDefinitionSpec",
"type": "object"
}
8 changes: 0 additions & 8 deletions sources/models/model-definition-template.json

This file was deleted.

0 comments on commit d1f5236

Please sign in to comment.