PipelineDatasetTypes

class lsst.pipe.base.PipelineDatasetTypes(initInputs: lsst.daf.butler.core.named.NamedValueSet[lsst.daf.butler.core.datasets.type.DatasetType][lsst.daf.butler.core.datasets.type.DatasetType], initOutputs: lsst.daf.butler.core.named.NamedValueSet[lsst.daf.butler.core.datasets.type.DatasetType][lsst.daf.butler.core.datasets.type.DatasetType], initIntermediates: lsst.daf.butler.core.named.NamedValueSet[lsst.daf.butler.core.datasets.type.DatasetType][lsst.daf.butler.core.datasets.type.DatasetType], inputs: lsst.daf.butler.core.named.NamedValueSet[lsst.daf.butler.core.datasets.type.DatasetType][lsst.daf.butler.core.datasets.type.DatasetType], prerequisites: lsst.daf.butler.core.named.NamedValueSet[lsst.daf.butler.core.datasets.type.DatasetType][lsst.daf.butler.core.datasets.type.DatasetType], intermediates: lsst.daf.butler.core.named.NamedValueSet[lsst.daf.butler.core.datasets.type.DatasetType][lsst.daf.butler.core.datasets.type.DatasetType], outputs: lsst.daf.butler.core.named.NamedValueSet[lsst.daf.butler.core.datasets.type.DatasetType][lsst.daf.butler.core.datasets.type.DatasetType], byTask: Mapping[str, lsst.pipe.base.pipeline.TaskDatasetTypes])

Bases: object

An immutable struct that classifies the dataset types used in a Pipeline.

Attributes Summary

packagesDatasetName Name of a dataset type used to save package versions.

Methods Summary

fromPipeline(pipeline, …) Extract and classify the dataset types from all tasks in a Pipeline.
initOutputNames(pipeline, …) Return the names of dataset types ot task initOutputs, Configs, and package versions for a pipeline.

Attributes Documentation

packagesDatasetName = 'packages'

Name of a dataset type used to save package versions.

Methods Documentation

classmethod fromPipeline(pipeline: Union[lsst.pipe.base.pipeline.Pipeline, Iterable[lsst.pipe.base.pipeline.TaskDef]], *, registry: lsst.daf.butler.registry._registry.Registry, include_configs: bool = True, include_packages: bool = True) → lsst.pipe.base.pipeline.PipelineDatasetTypes

Extract and classify the dataset types from all tasks in a Pipeline.

Parameters:
pipeline: `Pipeline` or `Iterable` [ `TaskDef` ]

A dependency-ordered collection of tasks that can be run together.

registry: `Registry`

Registry used to construct normalized DatasetType objects and retrieve those that are incomplete.

include_configs : bool, optional

If True (default) include config dataset types as initOutputs.

include_packages : bool, optional

If True (default) include the dataset type for software package versions in initOutputs.

Returns:
types: `PipelineDatasetTypes`

The dataset types used by this Pipeline.

Raises:
ValueError

Raised if Tasks are inconsistent about which datasets are marked prerequisite. This indicates that the Tasks cannot be run as part of the same Pipeline.

classmethod initOutputNames(pipeline: Union[lsst.pipe.base.pipeline.Pipeline, Iterable[lsst.pipe.base.pipeline.TaskDef]], *, include_configs: bool = True, include_packages: bool = True) → Iterator[str]

Return the names of dataset types ot task initOutputs, Configs, and package versions for a pipeline.

Parameters:
pipeline: `Pipeline` or `Iterable` [ `TaskDef` ]

A Pipeline instance or collection of TaskDef instances.

include_configs : bool, optional

If True (default) include config dataset types.

include_packages : bool, optional

If True (default) include the dataset type for package versions.

Yields:
datasetTypeName : str

Name of the dataset type.