Interfaces
rerun
class AsComponents
Bases: Protocol
Describes interface for interpreting an object as a bundle of Components.
def as_component_batches()
Returns an iterable of ComponentBatchLike
objects.
Each object in the iterable must adhere to the ComponentBatchLike
interface.
class ComponentBatchLike
Bases: Protocol
Describes interface for objects that can be converted to batch of rerun Components.
def as_arrow_array()
Returns a pyarrow.Array
of the component data.
def component_descriptor()
Returns the complete descriptor of the component.
class ComponentColumn
A column of components that can be sent using send_columns
.
This is represented by a ComponentBatch array that has been partitioned into multiple segments.
This is useful for reinterpreting a single contiguous batch as multiple sub-batches
to use with the send_columns
API.
def __init__(component_batch, *, lengths=None)
Construct a new component column.
This makes it possible to use rr.send_columns
to send columnar data directly into Rerun.
The returned column will be partitioned into unit-length sub-batches by default.
Use ComponentColumn.partition
to repartition the data as needed.
PARAMETER | DESCRIPTION |
---|---|
component_batch
|
The component batch to partition into a column.
TYPE:
|
lengths
|
The offsets to partition the component at.
If specified,
TYPE:
|
def as_arrow_array()
The component as an arrow batch.
Part of the ComponentBatchLike
logging interface.
def component_descriptor()
Returns the complete descriptor of the component.
Part of the ComponentBatchLike
logging interface.
def partition(lengths)
(Re)Partitions the column.
This makes it possible to use rr.send_columns
to send columnar data directly into Rerun.
The returned columns will be partitioned into unit-length sub-batches by default.
Use ComponentColumn.partition
to repartition the data as needed.
PARAMETER | DESCRIPTION |
---|---|
lengths
|
The offsets to partition the component at.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
The (re)partitioned column.
|
|