Extension Components
def rerun.log_extension_components(entity_path, ext, *, identifiers=None, timeless=False, recording=None)
Log an arbitrary collection of extension components.
Each item in ext
will be logged as a separate component.
- The key will be used as the name of the component
- The value must be able to be converted to an array of arrow types. In general, if you can pass it to pyarrow.array, you can log it as a extension component.
All values must either have the same length, or be singular in which case they will be treated as a splat.
Extension components will be prefixed with "ext." to avoid collisions with rerun native components. You do not need to include this prefix; it will be added for you.
Note: rerun requires that a given component only take on a single type. The first type logged will be the type that is used for all future logs of that component. The API will make a best effort to do type conversion if supported by numpy and arrow. Any components that can't be converted will be dropped.
If you are want to inspect how your component will be converted to the underlying arrow code, the following snippet is what is happening internally:
np_value = np.atleast_1d(np.array(value, copy=False))
pa_value = pa.array(value)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
entity_path |
str
|
Path to the extension components in the space hierarchy. |
required |
ext |
dict[str, Any]
|
A dictionary of extension components. |
required |
identifiers |
Sequence[int] | None
|
Optional identifiers for each component. If provided, must be the same length as the components. |
None
|
timeless |
bool
|
If true, the components will be timeless (default: False). |
False
|
recording |
RecordingStream | None
|
Specifies the |
None
|