Skip to main content

pipeline.StepInputs

What a step’s adapter has to call the step with.

Usage

Source

pipeline.StepInputs(
    step,
    results,
    dataset=None,
    root=None,
    data=None,
    previous=None,
    seed=None,
    inputs=list(),
    recorder=None,
    project=None
)

results holds the earlier steps’ results in pipeline order (run now, or carried from an earlier run’s record); dataset is the dataset of the latest of them that holds one. root is the project folder that relative paths are read from (None: as given). data holds frames passed in memory, by input name; previous the previous data vintage; seed the project’s seed (project.yaml: seed) for a step’s random draws. An adapter appends what it read to inputs. record() gives the run record of the steps before this one, for a step that reports on them.

Parameter Attributes

step: str
results: Mapping[str, StepResult]
dataset: Dataset | None = None
root: Path | None = None
data: Mapping[str, Any] | None = None
previous: Dataset | None = None
seed: int | None = None
inputs: list[InputRecord] = list()
recorder: Callable[[], Any] | None = None
project: Any = None

Methods

Name Description
dataset_with() The dataset of an earlier result with this fingerprint (the data a step ran on).
record() The RunRecord of the run so far: every step before this one, run or carried.
require() The earlier result of the step name, or PipelineError saying it must come first.
require_dataset() The latest dataset, or PipelineError naming the step that needs one.
resolve() path read from the project folder when it is relative and there is one.

dataset_with()

The dataset of an earlier result with this fingerprint (the data a step ran on).

Usage

Source

dataset_with(fingerprint)

record()

The RunRecord of the run so far: every step before this one, run or carried.

Usage

Source

record()

require()

The earlier result of the step name, or PipelineError saying it must come first.

Usage

Source

require(name)

require_dataset()

The latest dataset, or PipelineError naming the step that needs one.

Usage

Source

require_dataset()

resolve()

path read from the project folder when it is relative and there is one.

Usage

Source

resolve(path)