Input¶
- class lsst.pipe.base.connectionTypes.Input(name: str, storageClass: str, doc: str = '', multiple: bool = False, dimensions: Iterable[str] = (), isCalibration: bool = False, deferLoad: bool = False, minimum: int = 1, deferGraphConstraint: bool = False, *, deprecated: str | None = None)¶
Bases:
BaseInput
Class used for declaring PipelineTask input connections
- Parameters:
- name
str
The default name used to identify the dataset type
- storageClass
str
The storage class used when (un)/persisting the dataset type
- multiple
bool
Indicates if this connection should expect to contain multiple objects of the given dataset type. Tasks with more than one connection with
multiple=True
with the same dimensions may want to implementPipelineTaskConnections.adjustQuantum
to ensure those datasets are consistent (i.e. zip-iterable) inPipelineTask.runQuantum
and notify the execution system as early as possible of outputs that will not be produced because the corresponding input is missing.- dimensionsiterable of
str
The
lsst.daf.butler.Butler
lsst.daf.butler.Registry
dimensions used to identify the dataset type identified by the specified name- deferLoad
bool
Indicates that this dataset type will be loaded as a
lsst.daf.butler.DeferredDatasetHandle
. PipelineTasks can use this object to load the object at a later time.- minimum
bool
Minimum number of datasets required for this connection, per quantum. This is checked in the base implementation of
PipelineTaskConnections.adjustQuantum
, which raisesNoWorkFound
if the minimum is not met forInput
connections (causing the quantum to be pruned, skipped, or never created, depending on the context), andFileNotFoundError
forPrerequisiteInput
connections (causing QuantumGraph generation to fail).PipelineTask
implementations may provide customadjustQuantum
implementations for more fine-grained or configuration-driven constraints, as long as they are compatible with this minium.- deferGraphConstraint: `bool`, optional
If
True
, do not include this dataset type’s existence in the initial query that starts the QuantumGraph generation process. This can be used to make QuantumGraph generation faster by avoiding redundant datasets, and in certain cases it can (along with careful attention to which tasks are included in the same QuantumGraph) be used to work around the QuantumGraph generation algorithm’s inflexible handling of spatial overlaps. This option has no effect when the connection is not an overall input of the pipeline (or subset thereof) for which a graph is being created, and it never affects the ordering of quanta.
- name
- Raises:
- TypeError
Raised if
minimum
is greater than one butmultiple=False
.- NotImplementedError
Raised if
minimum
is zero for a regularInput
connection; this is not currently supported by our QuantumGraph generation algorithm.
Attributes Summary
Methods Summary
makeDatasetType
(universe[, parentStorageClass])Construct a true
DatasetType
instance with normalized dimensions.Attributes Documentation
Methods Documentation
- makeDatasetType(universe: DimensionUniverse, parentStorageClass: StorageClass | str | None = None) DatasetType ¶
Construct a true
DatasetType
instance with normalized dimensions.- Parameters:
- universe
lsst.daf.butler.DimensionUniverse
Set of all known dimensions to be used to normalize the dimension names specified in config.
- parentStorageClass
lsst.daf.butler.StorageClass
orstr
, optional Parent storage class for component datasets;
None
otherwise.
- universe
- Returns:
- datasetType
DatasetType
The
DatasetType
defined by this connection.
- datasetType