temporian.has_leak #
has_leak(
output: EventSetNodeCollection,
input: Optional[EventSetNodeCollection] = None,
) -> bool
Tests if a node depends on a leak operator.
Tests if a EventSetNode
or collection of nodes
depends on the only operator that can introduce future leakage:
EventSet.leak()
.
Single input output example
>>> a = tp.input_node([("f", tp.float32)])
>>> b = a.moving_sum(5)
>>> c = b.leak(6)
>>> d = c.prefix("my_prefix_")
>>> e = d.moving_sum(7)
>>> # The computation of "e" contains a leak.
>>> tp.has_leak(e)
True
>>> # The computation of "e" given "d" does not contain a leak.
>>> tp.has_leak(e, d)
False
Parameters:
Name | Type | Description | Default |
---|---|---|---|
output |
EventSetNodeCollection
|
Nodes to compute. Supports Node, dict of Nodes and list of Nodes. |
required |
input |
Optional[EventSetNodeCollection]
|
Optional input nodes. Supports Node, dict of Nodes and list of
Nodes. If not specified, assumes for the input nodes to be the the
raw data inputs e.g. |
None
|
Returns:
Type | Description |
---|---|
bool
|
True if and only if the computation of |
bool
|
on a |