{ "title": "dvc.yaml", "type": "object", "properties": { "vars": { "title": "Variables", "description": "List of values for substitution.\n\nMay include any dict or a path to a params file which may be a string or a dict to params in the file).\n\nUse elsewhere in `dvc.yaml` with the `${}` substitution expression.", "allOf": [ { "$ref": "#/definitions/Vars" } ] }, "stages": { "title": "Stages", "description": "List of stages that form a pipeline.", "type": "object", "additionalProperties": { "oneOf": [ { "$ref": "#/definitions/ForeachDo" }, { "$ref": "#/definitions/Matrix" }, { "$ref": "#/definitions/Stage" } ] } }, "plots": { "title": "Plots", "description": "Top level plots definition.", "oneOf": [ { "$ref": "#/definitions/TopLevelPlots" }, { "$ref": "#/definitions/TopLevelPlotsList" } ] }, "params": { "title": "Params", "description": "List of parameter files", "type": "array", "items": { "type": "string" }, "uniqueItems": true }, "metrics": { "title": "Metrics", "description": "List of metric files", "type": "array", "items": { "type": "string" }, "uniqueItems": true }, "artifacts": { "title": "Artifacts", "description": "Top level artifacts definition.", "allOf": [ { "$ref": "#/definitions/TopLevelArtifacts" } ] } }, "additionalProperties": false, "definitions": { "VarPath": { "title": "VarPath", "description": "Path to params file with values for substitution.", "type": "string" }, "VarDecl": { "title": "VarDecl", "description": "Dict of values for substitution.", "type": "object" }, "Vars": { "title": "Vars", "type": "array", "items": { "oneOf": [ { "$ref": "#/definitions/VarPath" }, { "$ref": "#/definitions/VarDecl" } ] } }, "DepModel": { "title": "DepModel", "description": "Path to a dependency (input) file or directory for the stage.", "type": "string" }, "Dependencies": { "title": "Dependencies", "type": "array", "items": { "$ref": "#/definitions/DepModel" }, "uniqueItems": true }, "ParamKey": { "title": "ParamKey", "desc": "Parameter name (dot-separated).", "type": "string" }, "CustomParamFileKeys": { "title": "CustomParamFileKeys", "desc": "Path to YAML/JSON/TOML/Python params file.", "type": "object", "additionalProperties": { "type": "array", "items": { "$ref": "#/definitions/ParamKey" }, "uniqueItems": true } }, "EmptyParamFileKeys": { "title": "EmptyParamFileKeys", "desc": "Path to YAML/JSON/TOML/Python params file.", "type": "object", "additionalProperties": { "type": "null" } }, "Param": { "title": "Param", "oneOf": [ { "$ref": "#/definitions/ParamKey" }, { "$ref": "#/definitions/CustomParamFileKeys" }, { "$ref": "#/definitions/EmptyParamFileKeys" } ] }, "Params": { "title": "Params", "type": "array", "items": { "$ref": "#/definitions/Param" }, "uniqueItems": true }, "OutFlags": { "title": "OutFlags", "type": "object", "properties": { "cache": { "title": "Cache", "description": "Cache output by DVC", "default": true, "type": "boolean" }, "persist": { "title": "Persist", "description": "Persist output between runs", "default": false, "type": "boolean" }, "checkpoint": { "title": "Checkpoint", "description": "Indicate that the output is associated with in-code checkpoints", "default": false, "type": "boolean" }, "desc": { "title": "Description", "description": "User description for the output", "type": "string" }, "type": { "title": "Type", "description": "User assigned type of the output", "type": "string" }, "labels": { "title": "Labels", "description": "User assigned labels of the output", "type": "array", "items": { "type": "string" }, "uniqueItems": true }, "meta": { "title": "Meta", "description": "Custom metadata of the output.", "type": "object" }, "remote": { "title": "Remote", "description": "Name of the remote to use for pushing/fetching", "type": "string" }, "push": { "title": "Push", "description": "Whether the output should be pushed to remote during `dvc push`", "default": true, "type": "boolean" } }, "additionalProperties": false }, "Out": { "title": "Out", "description": "Path to an output file or dir of the stage.", "oneOf": [ { "type": "string" }, { "type": "object", "additionalProperties": { "$ref": "#/definitions/OutFlags" } } ] }, "Outs": { "title": "Outs", "type": "array", "items": { "$ref": "#/definitions/Out" }, "uniqueItems": true }, "PlotFlags": { "title": "PlotFlags", "type": "object", "properties": { "cache": { "title": "Cache", "description": "Cache output by DVC", "default": true, "type": "boolean" }, "persist": { "title": "Persist", "description": "Persist output between runs", "default": false, "type": "boolean" }, "checkpoint": { "title": "Checkpoint", "description": "Indicate that the output is associated with in-code checkpoints", "default": false, "type": "boolean" }, "desc": { "title": "Description", "description": "User description for the output", "type": "string" }, "type": { "title": "Type", "description": "User assigned type of the output", "type": "string" }, "labels": { "title": "Labels", "description": "User assigned labels of the output", "type": "array", "items": { "type": "string" }, "uniqueItems": true }, "meta": { "title": "Meta", "description": "Custom metadata of the output.", "type": "object" }, "remote": { "title": "Remote", "description": "Name of the remote to use for pushing/fetching", "type": "string" }, "push": { "title": "Push", "description": "Whether the output should be pushed to remote during `dvc push`", "default": true, "type": "boolean" }, "x": { "title": "X", "description": "Default field name to use as x-axis data", "type": "string" }, "y": { "title": "Y", "description": "Default field name to use as y-axis data", "type": "string" }, "x_label": { "title": "X Label", "description": "Default label for the x-axis", "type": "string" }, "y_label": { "title": "Y Label", "description": "Default label for the y-axis", "type": "string" }, "title": { "title": "Title", "description": "Default plot title", "type": "string" }, "header": { "title": "Header", "description": "Whether the target CSV or TSV has a header or not", "default": false, "type": "boolean" }, "template": { "title": "Template", "description": "Default plot template", "type": "string" } }, "additionalProperties": false }, "Plot": { "title": "Plot", "description": "Path to plots file or dir of the stage.\n\nData files may be JSON/YAML/CSV/TSV.\n\nImage files may be JPEG/GIF/PNG.", "oneOf": [ { "type": "string" }, { "type": "object", "additionalProperties": { "$ref": "#/definitions/PlotFlags" } } ] }, "Plots": { "title": "Plots", "type": "array", "items": { "$ref": "#/definitions/Plot" }, "uniqueItems": true }, "Stage": { "title": "Stage", "description": "A named stage of a pipeline.", "type": "object", "properties": { "cmd": { "title": "Cmd", "description": "(Required) Command to run (anything your system terminal can run).\n\nCan be a string or a list of commands.", "oneOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ] }, "wdir": { "title": "Wdir", "description": "Working directory for the cmd, relative to `dvc.yaml`", "type": "string" }, "deps": { "title": "Deps", "description": "List of the dependencies for the stage.", "allOf": [ { "$ref": "#/definitions/Dependencies" } ] }, "params": { "title": "Params", "description": "List of dot-separated parameter dependency keys to track from `params.yaml`.\n\nMay contain other YAML/JSON/TOML/Python parameter file names, with a sub-list of the param names to track in them (leave empty to include all).", "allOf": [ { "$ref": "#/definitions/Params" } ] }, "outs": { "title": "Outs", "description": "List of the outputs of the stage.", "allOf": [ { "$ref": "#/definitions/Outs" } ] }, "metrics": { "title": "Metrics", "description": "List of metrics of the stage written to JSON/TOML/YAML.", "allOf": [ { "$ref": "#/definitions/Outs" } ] }, "plots": { "title": "Plots", "description": "List of plots of the stage for visualization.\n\nPlots may be written to JSON/YAML/CSV/TSV for data or JPEG/GIF/PNG for images.", "allOf": [ { "$ref": "#/definitions/Plots" } ] }, "frozen": { "title": "Frozen", "description": "Assume stage as unchanged", "default": false, "type": "boolean" }, "always_changed": { "title": "Always Changed", "description": "Assume stage as always changed", "default": false, "type": "boolean" }, "vars": { "title": "Vars", "description": "List of stage-specific values for substitution.\n\nMay include any dict or a path to a params file.\n\nUse in the stage with the `${}` substitution expression.", "allOf": [ { "$ref": "#/definitions/Vars" } ] }, "desc": { "title": "Desc", "description": "Description of the stage", "type": "string" }, "meta": { "title": "Meta", "description": "Additional information/metadata" } }, "required": [ "cmd" ], "additionalProperties": false }, "ForeachDo": { "title": "ForeachDo", "type": "object", "properties": { "foreach": { "title": "Foreach", "description": "Iterable to loop through in foreach. Can be a parametrized string, list or a dict.\n\nThe stages will be generated by iterating through this data, by substituting data in the `do` block.", "oneOf": [ { "type": "string", "pattern": "^\\$\\{.*?\\}$" }, { "type": "array", "items": {} }, { "type": "object" } ] }, "do": { "title": "Do", "description": "Parametrized stage definition that'll be substituted over for each of the value from the foreach data.", "allOf": [ { "$ref": "#/definitions/Stage" } ] } }, "required": [ "foreach", "do" ], "additionalProperties": false }, "Matrix": { "title": "Matrix", "description": "A named stage of a pipeline.", "type": "object", "properties": { "cmd": { "title": "Cmd", "description": "(Required) Command to run (anything your system terminal can run).\n\nCan be a string or a list of commands.", "oneOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ] }, "wdir": { "title": "Wdir", "description": "Working directory for the cmd, relative to `dvc.yaml`", "type": "string" }, "deps": { "title": "Deps", "description": "List of the dependencies for the stage.", "allOf": [ { "$ref": "#/definitions/Dependencies" } ] }, "params": { "title": "Params", "description": "List of dot-separated parameter dependency keys to track from `params.yaml`.\n\nMay contain other YAML/JSON/TOML/Python parameter file names, with a sub-list of the param names to track in them (leave empty to include all).", "allOf": [ { "$ref": "#/definitions/Params" } ] }, "outs": { "title": "Outs", "description": "List of the outputs of the stage.", "allOf": [ { "$ref": "#/definitions/Outs" } ] }, "metrics": { "title": "Metrics", "description": "List of metrics of the stage written to JSON/TOML/YAML.", "allOf": [ { "$ref": "#/definitions/Outs" } ] }, "plots": { "title": "Plots", "description": "List of plots of the stage for visualization.\n\nPlots may be written to JSON/YAML/CSV/TSV for data or JPEG/GIF/PNG for images.", "allOf": [ { "$ref": "#/definitions/Plots" } ] }, "frozen": { "title": "Frozen", "description": "Assume stage as unchanged", "default": false, "type": "boolean" }, "always_changed": { "title": "Always Changed", "description": "Assume stage as always changed", "default": false, "type": "boolean" }, "vars": { "title": "Vars", "description": "List of stage-specific values for substitution.\n\nMay include any dict or a path to a params file.\n\nUse in the stage with the `${}` substitution expression.", "allOf": [ { "$ref": "#/definitions/Vars" } ] }, "desc": { "title": "Desc", "description": "Description of the stage", "type": "string" }, "meta": { "title": "Meta", "description": "Additional information/metadata" }, "matrix": { "title": "Matrix", "description": "Generate stages based on combination of variables.\n\nThe variable can be a list of values, or a parametrized string referencing a list.", "type": "object", "additionalProperties": { "oneOf": [ { "type": "array", "items": {} }, { "type": "string", "pattern": "^\\$\\{.*?\\}$" } ] } } }, "required": [ "cmd", "matrix" ], "additionalProperties": false }, "X": { "title": "X", "type": "object", "additionalProperties": { "type": "string" } }, "Y": { "title": "Y", "type": "object", "additionalProperties": { "oneOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" }, "uniqueItems": true } ] } }, "TopLevelPlotFlags": { "title": "TopLevelPlotFlags", "type": "object", "properties": { "x": { "title": "X", "description": "A single column name, or a dictionary of data-source and column pair", "oneOf": [ { "type": "string" }, { "$ref": "#/definitions/X" } ] }, "y": { "title": "Y", "description": "A single column name, list of columns, or a dictionary of data-source and column pair", "oneOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" }, "uniqueItems": true }, { "$ref": "#/definitions/Y" } ] }, "x_label": { "title": "X Label", "description": "Default label for the x-axis", "type": "string" }, "y_label": { "title": "Y Label", "description": "Default label for the y-axis", "type": "string" }, "title": { "title": "Title", "description": "Default plot title", "type": "string" }, "template": { "title": "Template", "description": "Default plot template", "default": "linear", "type": "string" } }, "additionalProperties": false }, "EmptyTopLevelPlotFlags": { "title": "EmptyTopLevelPlotFlags", "type": "null" }, "TopLevelPlots": { "title": "TopLevelPlots", "type": "object", "additionalProperties": { "oneOf": [ { "$ref": "#/definitions/TopLevelPlotFlags" }, { "$ref": "#/definitions/EmptyTopLevelPlotFlags" } ] } }, "TopLevelPlotsList": { "title": "TopLevelPlotsList", "type": "array", "items": { "oneOf": [ { "type": "string" }, { "$ref": "#/definitions/TopLevelPlots" } ] } }, "TopLevelArtifactFlags": { "title": "TopLevelArtifactFlags", "type": "object", "properties": { "path": { "title": "Path", "description": "Path to the artifact", "type": "string" }, "type": { "title": "Type", "description": "Type of the artifact", "type": "string" }, "desc": { "title": "Desc", "description": "Description for the artifact", "type": "string" }, "meta": { "title": "Meta", "description": "Custom metadata for the artifact", "type": "object" }, "labels": { "title": "Labels", "description": "Labels for the artifact", "type": "array", "items": { "type": "string" }, "uniqueItems": true } }, "required": [ "path" ], "additionalProperties": false }, "TopLevelArtifacts": { "title": "TopLevelArtifacts", "type": "object", "patternProperties": { "^[a-z0-9]([a-z0-9-/]*[a-z0-9])?$": { "$ref": "#/definitions/TopLevelArtifactFlags" } }, "additionalProperties": { "$ref": "#/definitions/TopLevelArtifactFlags" } } } }