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
(object)clear
()copy
()count
(value)extend
(iterable)index
(value, [start, [stop]])Raises ValueError if the value is not present. insert
L.insert(index, object) – insert object before index labelIndex
(label)Return task index given its label. pop
([index])Raises IndexError if list is empty or index is out of range. remove
(value)Raises ValueError if the value is not present. reverse
L.reverse() – reverse IN PLACE sort
([key, reverse])Methods Documentation
-
append
(object) → None -- append object to end¶
-
clear
() → None -- remove all items from L¶
-
copy
() → list -- a shallow copy of L¶
-
count
(value) → integer -- return number of occurrences of value¶
-
extend
(iterable) → None -- extend list by appending elements from the iterable¶
-
index
(value[, start[, stop]]) → integer -- return first index of value.¶ Raises ValueError if the value is not present.
-
insert
()¶ L.insert(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
([index]) → item -- remove and return item at index (default last).¶ Raises IndexError if list is empty or index is out of range.
-
remove
(value) → None -- remove first occurrence of value.¶ Raises ValueError if the value is not present.
-
reverse
()¶ L.reverse() – reverse IN PLACE
-
sort
(key=None, reverse=False) → None -- stable sort *IN PLACE*¶
- pipeline : iterable of