diff --git a/sources/datasets/dataset-definition-schema.json b/sources/datasets/dataset-definition-schema.json new file mode 100644 index 0000000..faa98c2 --- /dev/null +++ b/sources/datasets/dataset-definition-schema.json @@ -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" +} diff --git a/sources/datasets/dataset-definition-template.json b/sources/datasets/dataset-definition-template.json deleted file mode 100644 index 582c756..0000000 --- a/sources/datasets/dataset-definition-template.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "dataset_type": "Name of the class that implements the dataset behavior", - "module_path": "Path to the file containing the dataset class implementation. It can be either an absolute path or a path relative to the location of this JSON file.", - "title": "Title of the dataset used for reference within this app", - "title_in_source": "Optional parameter to record the title of this dataset in its source", - "custom_param_1": "Optional parameter for customizing the dataset class initialization", - "custom_param_2": "Optional parameter for customizing the dataset class initialization" -} diff --git a/sources/models/model-definition-schema.json b/sources/models/model-definition-schema.json new file mode 100644 index 0000000..40aa14e --- /dev/null +++ b/sources/models/model-definition-schema.json @@ -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" +} diff --git a/sources/models/model-definition-template.json b/sources/models/model-definition-template.json deleted file mode 100644 index 9fdacfb..0000000 --- a/sources/models/model-definition-template.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "model_type": "Name of the class that implements the model behavior", - "module_path": "Path to the file containing the model class implementation. It can be either an absolute path or a path relative to the location of this JSON file.", - "title": "Title of the model used for reference within this app", - "title_in_source": "Optional parameter to record the title of this model in its source", - "custom_param_1": "Optional parameter for customizing the model class initialization", - "custom_param_2": "Optional parameter for customizing the model class initialization" -}