boilercv_pipeline.sync_dvc.dvc

Contents

boilercv_pipeline.sync_dvc.dvc#

Model for dvc.yaml.

Adapted from iterative/dvcyaml-schema.

Notes#

The original license is reproduced below.

Copyright 2020-2021 Iterative, Inc.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Module Contents#

Classes#

Data#

API#

boilercv_pipeline.sync_dvc.dvc.FilePath: TypeAlias#

None

boilercv_pipeline.sync_dvc.dvc.VarKey: TypeAlias#

None

boilercv_pipeline.sync_dvc.dvc.StageName: TypeAlias#

None

boilercv_pipeline.sync_dvc.dvc.PlotIdOrFilePath: TypeAlias#

None

boilercv_pipeline.sync_dvc.dvc.PlotColumn: TypeAlias#

None

boilercv_pipeline.sync_dvc.dvc.PlotColumns: TypeAlias#

None

boilercv_pipeline.sync_dvc.dvc.PlotTemplateName: TypeAlias#

None

class boilercv_pipeline.sync_dvc.dvc.DvcBaseModel(
/,
**data: typing.Any,
)#

Bases: pydantic.BaseModel

class boilercv_pipeline.sync_dvc.dvc.OutFlags(
/,
**data: typing.Any,
)#

Bases: boilercv_pipeline.sync_dvc.dvc.DvcBaseModel

model_config#

‘ConfigDict(…)’

cache: bool | None#

True

Cache output by DVC

persist: bool | None#

False

Persist output between runs

checkpoint: bool | None#

False

Indicate that the output is associated with in-code checkpoints

desc: str | None#

‘Field(…)’

User description for the output

type: str | None#

None

User assigned type of the output

labels: list[str]#

‘Field(…)’

User assigned labels of the output

meta: dict[str, Any]#

‘Field(…)’

Custom metadata of the output.

remote: str | None#

None

Name of the remote to use for pushing/fetching

push: bool | None#

True

Whether the output should be pushed to remote during dvc push

class boilercv_pipeline.sync_dvc.dvc.PlotFlags(
/,
**data: typing.Any,
)#

Bases: boilercv_pipeline.sync_dvc.dvc.OutFlags

x: boilercv_pipeline.sync_dvc.dvc.PlotColumn | None#

None

Default field name to use as x-axis data

y: boilercv_pipeline.sync_dvc.dvc.PlotColumn | None#

None

Default field name to use as y-axis data

x_label: str | None#

None

Default label for the x-axis

y_label: str | None#

None

Default label for the y-axis

title: str | None#

None

Default plot title

header: bool#

False

Whether the target CSV or TSV has a header or not

template: boilercv_pipeline.sync_dvc.dvc.FilePath | None#

None

Default plot template

boilercv_pipeline.sync_dvc.dvc.X: TypeAlias#

None

boilercv_pipeline.sync_dvc.dvc.Y: TypeAlias#

None

class boilercv_pipeline.sync_dvc.dvc.TopLevelPlotFlags(
/,
**data: typing.Any,
)#

Bases: boilercv_pipeline.sync_dvc.dvc.DvcBaseModel

model_config#

‘ConfigDict(…)’

x: boilercv_pipeline.sync_dvc.dvc.PlotColumn | boilercv_pipeline.sync_dvc.dvc.X#

None

A single column name, or a dictionary of data-source and column pair

y: boilercv_pipeline.sync_dvc.dvc.PlotColumns | boilercv_pipeline.sync_dvc.dvc.Y#

None

A single column name, list of columns, or a dictionary of data-source and column pair

x_label: str | None#

None

Default label for the x-axis

y_label: str | None#

None

Default label for the y-axis

title: str | None#

None

Default plot title

template: str#

‘linear’

Default plot template

boilercv_pipeline.sync_dvc.dvc.EmptyTopLevelPlotFlags: TypeAlias#

None

class boilercv_pipeline.sync_dvc.dvc.TopLevelArtifactFlags(
/,
**data: typing.Any,
)#

Bases: boilercv_pipeline.sync_dvc.dvc.DvcBaseModel

model_config#

‘ConfigDict(…)’

path: str#

None

Path to the artifact

type: str | None#

None

Type of the artifact

desc: str | None#

None

Description for the artifact

meta: dict[str, Any]#

‘Field(…)’

Custom metadata for the artifact

labels: list[str]#

‘Field(…)’

Labels for the artifact

boilercv_pipeline.sync_dvc.dvc.DepModel: TypeAlias#

None

boilercv_pipeline.sync_dvc.dvc.Dependencies: TypeAlias#

None

boilercv_pipeline.sync_dvc.dvc.ParamKey: TypeAlias#

None

boilercv_pipeline.sync_dvc.dvc.CustomParamFileKeys: TypeAlias#

None

boilercv_pipeline.sync_dvc.dvc.EmptyParamFileKeys: TypeAlias#

None

boilercv_pipeline.sync_dvc.dvc.Param#

None

boilercv_pipeline.sync_dvc.dvc.Params#

None

boilercv_pipeline.sync_dvc.dvc.Out: TypeAlias#

None

boilercv_pipeline.sync_dvc.dvc.Outs#

None

boilercv_pipeline.sync_dvc.dvc.Metric: TypeAlias#

None

boilercv_pipeline.sync_dvc.dvc.Plot: TypeAlias#

None

boilercv_pipeline.sync_dvc.dvc.Plots#

None

boilercv_pipeline.sync_dvc.dvc.VarPath: TypeAlias#

None

boilercv_pipeline.sync_dvc.dvc.VarDecl: TypeAlias#

None

boilercv_pipeline.sync_dvc.dvc.Vars#

None

class boilercv_pipeline.sync_dvc.dvc.Stage(
/,
**data: typing.Any,
)#

Bases: boilercv_pipeline.sync_dvc.dvc.DvcBaseModel

A named stage of a pipeline.

Initialization

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

model_config#

‘ConfigDict(…)’

cmd: str | list[str]#

None

(Required) Command to run (anything your system terminal can run).

Can be a string or a list of commands.

wdir: str | None#

None

Working directory for the cmd, relative to dvc.yaml

deps: boilercv_pipeline.sync_dvc.dvc.Dependencies#

‘Field(…)’

List of the dependencies for the stage.

params: boilercv_pipeline.sync_dvc.dvc.Params#

‘Field(…)’

List of dot-separated parameter dependency keys to track from params.yaml.

May 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).

outs: boilercv_pipeline.sync_dvc.dvc.Outs#

‘Field(…)’

List of the outputs of the stage.

metrics: boilercv_pipeline.sync_dvc.dvc.Outs#

‘Field(…)’

List of metrics of the stage written to JSON/TOML/YAML.

plots: boilercv_pipeline.sync_dvc.dvc.Plots#

‘Field(…)’

List of plots of the stage for visualization.

Plots may be written to JSON/YAML/CSV/TSV for data or JPEG/GIF/PNG for images.

frozen: bool | None#

False

Assume stage as unchanged

always_changed: bool | None#

False

Assume stage as always changed

vars: boilercv_pipeline.sync_dvc.dvc.Vars#

‘Field(…)’

List of stage-specific values for substitution.

May include any dict or a path to a params file.

Use in the stage with the ${} substitution expression.

desc: str | None#

None

Description of the stage

meta: Any#

None

Additional information/metadata

boilercv_pipeline.sync_dvc.dvc.ParametrizedString: TypeAlias#

None

class boilercv_pipeline.sync_dvc.dvc.ForeachDo(
/,
**data: typing.Any,
)#

Bases: boilercv_pipeline.sync_dvc.dvc.DvcBaseModel

model_config#

‘ConfigDict(…)’

foreach: boilercv_pipeline.sync_dvc.dvc.ParametrizedString | list[Any] | dict[str, Any]#

None

Iterable to loop through in foreach. Can be a parametrized string, list or a dict.

The stages will be generated by iterating through this data, by substituting data in the do block.

do: boilercv_pipeline.sync_dvc.dvc.Stage#

None

Parametrized stage definition that’ll be substituted over for each of the value from the foreach data.

class boilercv_pipeline.sync_dvc.dvc.Matrix(
/,
**data: typing.Any,
)#

Bases: boilercv_pipeline.sync_dvc.dvc.Stage

model_config#

‘ConfigDict(…)’

matrix: dict[str, list[Any] | boilercv_pipeline.sync_dvc.dvc.ParametrizedString]#

‘Field(…)’

Generate stages based on combination of variables.

The variable can be a list of values, or a parametrized string referencing a list.

boilercv_pipeline.sync_dvc.dvc.Definition#

None

boilercv_pipeline.sync_dvc.dvc.TopLevelPlots: TypeAlias#

None

boilercv_pipeline.sync_dvc.dvc.TopLevelPlotsList: TypeAlias#

None

boilercv_pipeline.sync_dvc.dvc.ArtifactIdOrFilePath: TypeAlias#

None

boilercv_pipeline.sync_dvc.dvc.TopLevelArtifacts: TypeAlias#

None

class boilercv_pipeline.sync_dvc.dvc.DvcYamlModel(
/,
**data: typing.Any,
)#

Bases: boilercv_pipeline.sync_dvc.dvc.DvcBaseModel

model_config#

‘ConfigDict(…)’

vars: boilercv_pipeline.sync_dvc.dvc.Vars#

‘Field(…)’

List of values for substitution.

May include any dict or a path to a params file which may be a string or a dict to params in the file).

Use elsewhere in dvc.yaml with the ${} substitution expression.

stages: dict[boilercv_pipeline.sync_dvc.dvc.StageName, boilercv_pipeline.sync_dvc.dvc.Definition]#

‘Field(…)’

List of stages that form a pipeline.

plots: boilercv_pipeline.sync_dvc.dvc.TopLevelPlots | boilercv_pipeline.sync_dvc.dvc.TopLevelPlotsList#

‘Field(…)’

Top level plots definition.

params: list[boilercv_pipeline.sync_dvc.dvc.FilePath]#

‘Field(…)’

List of parameter files

metrics: list[boilercv_pipeline.sync_dvc.dvc.FilePath]#

‘Field(…)’

List of metric files

artifacts: boilercv_pipeline.sync_dvc.dvc.TopLevelArtifacts#

‘Field(…)’

Top level artifacts definition.