SliceSpan
class SliceSpan(start, stop, data_slices)
Bases: ExecutionSpan
An ExecutionSpan for data stored in a sliceable format.
This type of execution span references pub result data by assuming that it is a sliceable portion of the (row major) flattened data. Therefore, for each pub dependent on this span, the constructor accepts a single slice object, along with the corresponding shape of the data to be sliced.
Parameters
- start (datetime) – The start time of the span, in UTC.
- stop (datetime) – The stop time of the span, in UTC.
- data_slices (dict[int, tuple[ShapeType, slice]]) – A map from pub indices to pairs
(shape_tuple, slice).
Attributes
duration
The duration of this span, in seconds.
pub_idxs
Which pubs, by index, have dependence on one or more execution spans present.
size
The total number of results with dependence on this execution span, across all pubs.
start
The start time of the span, in UTC.
stop
The stop time of the span, in UTC.
Methods
contains_pub
contains_pub(pub_idx)
Return whether the pub with the given index has data with dependence on this span.
Parameters
pub_idx (int | Iterable[int]) – One or more pub indices from the original primitive call.
Returns
Whether there is dependence on this span.
Return type
bool
filter_by_pub
filter_by_pub(pub_idx)
Return a new set of spans where each one has been filtered to the specified pubs.
Parameters
pub_idx (int | Iterable[int])
Return type