Pipeline¶
-
class
lsst.pipe.base.
Pipeline
(iterable=None)¶ Bases:
list
Pipeline is a sequence of
TaskDef
objects.Pipeline is given as one of the inputs to a supervising framework which builds execution graph out of it. Pipeline contains a sequence of
TaskDef
instances.Main purpose of this class is to provide a mechanism to pass pipeline definition from users to supervising framework. That mechanism is implemented using simple serialization and de-serialization via
pickle
. Note that pipeline serialization is not guaranteed to be compatible between different versions or releases.In current implementation Pipeline is a list (it inherits from
list
) and one can use all list methods on pipeline. Content of the pipeline can be modified, it is up to the client to verify that modifications leave pipeline in a consistent state. One could modify container directly by adding or removing its elements.Parameters: - pipeline : iterable of
TaskDef
instances, optional Initial sequence of tasks.
Methods Summary
append
($self, object, /)Append object to the end of the list. clear
($self, /)Remove all items from list. copy
($self, /)Return a shallow copy of the list. count
($self, value, /)Return number of occurrences of value. extend
($self, iterable, /)Extend list by appending elements from the iterable. index
($self, value[, start, stop])Return first index of value. insert
($self, index, object, /)Insert object before index. labelIndex
(label)Return task index given its label. pop
($self[, index])Remove and return item at index (default last). remove
($self, value, /)Remove first occurrence of value. reverse
($self, /)Reverse IN PLACE. sort
($self, /, *[, key, reverse])Stable sort IN PLACE. Methods Documentation
-
append
($self, object, /)¶ Append object to the end of the list.
-
clear
($self, /)¶ Remove all items from list.
-
copy
($self, /)¶ Return a shallow copy of the list.
-
count
($self, value, /)¶ Return number of occurrences of value.
-
extend
($self, iterable, /)¶ Extend list by appending elements from the iterable.
-
index
($self, value, start=0, stop=sys.maxsize, /)¶ Return first index of value.
Raises ValueError if the value is not present.
-
insert
($self, index, object, /)¶ Insert object before index.
-
labelIndex
(label)¶ Return task index given its label.
Parameters: - label :
str
Task label.
Returns: - index :
int
Task index, or -1 if label is not found.
- label :
-
pop
($self, index=-1, /)¶ Remove and return item at index (default last).
Raises IndexError if list is empty or index is out of range.
-
remove
($self, value, /)¶ Remove first occurrence of value.
Raises ValueError if the value is not present.
-
reverse
($self, /)¶ Reverse IN PLACE.
-
sort
($self, /, *, key=None, reverse=False)¶ Stable sort IN PLACE.
- pipeline : iterable of