Initialization functions
rerun
class RecordingStream
A RecordingStream is used to send data to Rerun.
You can instantiate a RecordingStream by calling either rerun.init
(to create a global
recording) or rerun.RecordingStream
(for more advanced use cases).
Multithreading
A RecordingStream can safely be copied and sent to other threads.
You can also set a recording as the global active one for all threads (rerun.set_global_data_recording
)
or just for the current thread (rerun.set_thread_local_data_recording
).
Similarly, the with
keyword can be used to temporarily set the active recording for the
current thread, e.g.:
with rec:
rr.log(...)
rerun.recording_stream_generator_ctx
decorator.
Flushing or context manager exit guarantees that all previous data sent by the calling thread has been recorded and (if applicable) flushed to the underlying OS-managed file descriptor, but other threads may still have data in flight.
See also: rerun.get_data_recording
, rerun.get_global_data_recording
,
rerun.get_thread_local_data_recording
.
Available methods
Every function in the Rerun SDK that takes an optional RecordingStream as a parameter can also be called as a method on RecordingStream itself.
This includes, but isn't limited to:
- Metadata-related functions:
rerun.is_enabled
,rerun.get_recording_id
, … - Sink-related functions:
rerun.connect_grpc
,rerun.spawn
, … - Time-related functions:
rerun.set_time
,rerun.disable_timeline
,rerun.reset_time
, … - Log-related functions:
rerun.log
, …
For an exhaustive list, see help(rerun.RecordingStream)
.
Micro-batching
Micro-batching using both space and time triggers (whichever comes first) is done automatically in a dedicated background thread.
You can configure the frequency of the batches using the following environment variables:
RERUN_FLUSH_TICK_SECS
: Flush frequency in seconds (default:0.05
(50ms)).RERUN_FLUSH_NUM_BYTES
: Flush threshold in bytes (default:1048576
(1MiB)).RERUN_FLUSH_NUM_ROWS
: Flush threshold in number of rows (default:18446744073709551615
(u64::MAX)).
def __init__(application_id, *, recording_id=None, make_default=False, make_thread_default=False, default_enabled=True, send_properties=True)
Creates a new recording stream with a user-chosen application id (name) that can be used to log data.
If you only need a single global recording, rerun.init
might be simpler.
Note that new recording streams always begin connected to a buffered sink.
To send the data to a viewer or file you will likely want to call rerun.connect_grpc
or rerun.save
explicitly.
Warning
If you don't specify a recording_id
, it will default to a random value that is generated once
at the start of the process.
That value will be kept around for the whole lifetime of the process, and even inherited by all
its subprocesses, if any.
This makes it trivial to log data to the same recording in a multiprocess setup, but it also means that the following code will not create two distinct recordings:
rr.init("my_app")
rr.init("my_app")
To create distinct recordings from the same process, specify distinct recording IDs:
from uuid import uuid4
rec = rr.RecordingStream(application_id="test", recording_id=uuid4())
rec = rr.RecordingStream(application_id="test", recording_id=uuid4())
PARAMETER | DESCRIPTION |
---|---|
application_id
|
Your Rerun recordings will be categorized by this application id, so try to pick a unique one for each application that uses the Rerun SDK. For example, if you have one application doing object detection
and another doing camera calibration, you could have
TYPE:
|
recording_id
|
Set the recording ID that this process is logging to, as a UUIDv4. The default recording_id is based on If you are not using
TYPE:
|
make_default
|
If true (not the default), the newly initialized recording will replace the current active one (if any) in the global scope.
TYPE:
|
make_thread_default
|
If true (not the default), the newly initialized recording will replace the current active one (if any) in the thread-local scope.
TYPE:
|
default_enabled
|
Should Rerun logging be on by default?
Can be overridden with the RERUN env-var, e.g.
TYPE:
|
send_properties
|
Immediately send the recording properties to the viewer (default: True)
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
RecordingStream
|
A handle to the |
Examples:
Using a recording stream object directly.
from uuid import uuid4
stream = rr.RecordingStream("my_app", recording_id=uuid4())
stream.connect_grpc()
stream.log("hello", rr.TextLog("Hello world"))
def connect_grpc(url=None, *, flush_timeout_sec=2.0, default_blueprint=None)
Connect to a remote Rerun Viewer on the given HTTP(S) URL.
This function returns immediately.
PARAMETER | DESCRIPTION |
---|---|
url
|
The HTTP(S) URL to connect to
TYPE:
|
flush_timeout_sec
|
The minimum time the SDK will wait during a flush before potentially
dropping data if progress is not being made. Passing
TYPE:
|
default_blueprint
|
Optionally set a default blueprint to use for this application. If the application
already has an active blueprint, the new blueprint won't become active until the user
clicks the "reset blueprint" button. If you want to activate the new blueprint
immediately, instead use the
TYPE:
|
def disable_timeline(timeline)
Clear time information for the specified timeline on this thread.
PARAMETER | DESCRIPTION |
---|---|
timeline
|
The name of the timeline to clear the time for.
TYPE:
|
def disconnect()
Closes all TCP connections, servers, and files.
Closes all TCP connections, servers, and files that have been opened with
[rerun.connect_grpc
], [rerun.serve
], [rerun.save
] or [rerun.spawn
].
def flush(blocking=True)
Initiates a flush the batching pipeline and optionally waits for it to propagate to the underlying file descriptor (if any).
PARAMETER | DESCRIPTION |
---|---|
blocking
|
If true, the flush will block until the flush is complete.
TYPE:
|
def log(entity_path, entity, *extra, static=False, strict=None)
Log data to Rerun.
This is the main entry point for logging data to rerun. It can be used to log anything
that implements the rerun.AsComponents
interface, or a collection of ComponentBatchLike
objects.
When logging data, you must always provide an entity_path for identifying the data. Note that paths prefixed with "__" are considered reserved for use by the Rerun SDK itself and should not be used for logging user data. This is where Rerun will log additional information such as properties and warnings.
The most common way to log is with one of the rerun archetypes, all of which implement
the AsComponents
interface.
For example, to log a 3D point:
rr.log("my/point", rr.Points3D(position=[1.0, 2.0, 3.0]))
The log
function can flexibly accept an arbitrary number of additional objects which will
be merged into the first entity so long as they don't expose conflicting components, for instance:
# Log three points with arrows sticking out of them,
# and a custom "confidence" component.
rr.log(
"my/points",
rr.Points3D([[0.2, 0.5, 0.3], [0.9, 1.2, 0.1], [1.0, 4.2, 0.3]], radii=[0.1, 0.2, 0.3]),
rr.Arrows3D(vectors=[[0.3, 2.1, 0.2], [0.9, -1.1, 2.3], [-0.4, 0.5, 2.9]]),
rr.AnyValues(confidence=[0.3, 0.4, 0.9]),
)
PARAMETER | DESCRIPTION |
---|---|
entity_path
|
Path to the entity in the space hierarchy. The entity path can either be a string
(with special characters escaped, split on unescaped slashes)
or a list of unescaped strings.
This means that logging to See https://www.rerun.io/docs/concepts/entity-path for more on entity paths. |
entity
|
Anything that implements the
TYPE:
|
*extra
|
An arbitrary number of additional component bundles implementing the
TYPE:
|
static
|
If true, the components will be logged as static data. Static data has no time associated with it, exists on all timelines, and unconditionally shadows any temporal data of the same type. Otherwise, the data will be timestamped automatically with
TYPE:
|
strict
|
If True, raise exceptions on non-loggable data.
If False, warn on non-loggable data.
if None, use the global default from
TYPE:
|
def log_file_from_contents(file_path, file_contents, *, entity_path_prefix=None, static=False)
Logs the given file_contents
using all DataLoader
s available.
A single path
might be handled by more than one loader.
This method blocks until either at least one DataLoader
starts
streaming data in or all of them fail.
See https://www.rerun.io/docs/getting-started/data-in/open-any-file for more information.
PARAMETER | DESCRIPTION |
---|---|
file_path
|
Path to the file that the |
file_contents
|
Contents to be logged.
TYPE:
|
entity_path_prefix
|
What should the logged entity paths be prefixed with?
TYPE:
|
static
|
If true, the components will be logged as static data. Static data has no time associated with it, exists on all timelines, and unconditionally shadows any temporal data of the same type. Otherwise, the data will be timestamped automatically with
TYPE:
|
def log_file_from_path(file_path, *, entity_path_prefix=None, static=False)
Logs the file at the given path
using all DataLoader
s available.
A single path
might be handled by more than one loader.
This method blocks until either at least one DataLoader
starts
streaming data in or all of them fail.
See https://www.rerun.io/docs/getting-started/data-in/open-any-file for more information.
PARAMETER | DESCRIPTION |
---|---|
file_path
|
Path to the file to be logged. |
entity_path_prefix
|
What should the logged entity paths be prefixed with?
TYPE:
|
static
|
If true, the components will be logged as static data. Static data has no time associated with it, exists on all timelines, and unconditionally shadows any temporal data of the same type. Otherwise, the data will be timestamped automatically with
TYPE:
|
def memory_recording()
Streams all log-data to a memory buffer.
This can be used to display the RRD to alternative formats such as html. See: rerun.notebook_show.
RETURNS | DESCRIPTION |
---|---|
MemoryRecording
|
A memory recording object that can be used to read the data. |
def notebook_show(*, width=None, height=None, blueprint=None)
Output the Rerun viewer in a notebook using IPython IPython.core.display.HTML.
Any data logged to the recording after initialization will be sent directly to the viewer.
Note that this can be called at any point during cell execution. The call will block until the embedded viewer is initialized and ready to receive data. Thereafter any log calls will immediately send data to the viewer.
PARAMETER | DESCRIPTION |
---|---|
width
|
The width of the viewer in pixels.
TYPE:
|
height
|
The height of the viewer in pixels.
TYPE:
|
blueprint
|
A blueprint object to send to the viewer. It will be made active and set as the default blueprint in the recording. Setting this is equivalent to calling
TYPE:
|
def save(path, default_blueprint=None)
Stream all log-data to a file.
Call this before you log any data!
The Rerun Viewer is able to read continuously from the resulting rrd file while it is being written. However, depending on your OS and configuration, changes may not be immediately visible due to file caching. This is a common issue on Windows and (to a lesser extent) on MacOS.
PARAMETER | DESCRIPTION |
---|---|
path
|
The path to save the data to. |
default_blueprint
|
Optionally set a default blueprint to use for this application. If the application
already has an active blueprint, the new blueprint won't become active until the user
clicks the "reset blueprint" button. If you want to activate the new blueprint
immediately, instead use the
TYPE:
|
def send_blueprint(blueprint, *, make_active=True, make_default=True)
Create a blueprint from a BlueprintLike
and send it to the RecordingStream
.
PARAMETER | DESCRIPTION |
---|---|
blueprint
|
A blueprint object to send to the viewer.
TYPE:
|
make_active
|
Immediately make this the active blueprint for the associated
TYPE:
|
make_default
|
Make this the default blueprint for the
TYPE:
|
def send_columns(entity_path, indexes, columns, strict=None)
Send columnar data to Rerun.
Unlike the regular log
API, which is row-oriented, this API lets you submit the data
in a columnar form. Each TimeColumnLike
and ComponentColumn
object represents a column
of data that will be sent to Rerun. The lengths of all these columns must match, and all
data that shares the same index across the different columns will act as a single logical row,
equivalent to a single call to rr.log()
.
Note that this API ignores any stateful time set on the log stream via the rerun.set_time_*
APIs.
Furthermore, this will not inject the default timelines log_tick
and log_time
timeline columns.
PARAMETER | DESCRIPTION |
---|---|
entity_path
|
Path to the entity in the space hierarchy. See https://www.rerun.io/docs/concepts/entity-path for more on entity paths.
TYPE:
|
indexes
|
The time values of this batch of data. Each
TYPE:
|
columns
|
The columns of components to log. Each object represents a single column of data. In order to send multiple components per time value, explicitly create a
TYPE:
|
strict
|
If True, raise exceptions on non-loggable data.
If False, warn on non-loggable data.
If None, use the global default from
TYPE:
|
def send_property(name, values)
Send a property of the recording.
PARAMETER | DESCRIPTION |
---|---|
name
|
Name of the property.
TYPE:
|
values
|
Anything that implements the
TYPE:
|
def send_recording_name(name)
Send the name of the recording.
This name is shown in the Rerun Viewer.
PARAMETER | DESCRIPTION |
---|---|
name
|
The name of the recording.
TYPE:
|
def send_recording_start_time_nanos(nanos)
Send the start time of the recording.
This timestamp is shown in the Rerun Viewer.
PARAMETER | DESCRIPTION |
---|---|
nanos
|
The start time of the recording.
TYPE:
|
def serve_web(*, open_browser=True, web_port=None, grpc_port=None, default_blueprint=None, server_memory_limit='25%')
Serve log-data over WebSockets and serve a Rerun web viewer over HTTP.
You can also connect to this server with the native viewer using rerun localhost:9090
.
The WebSocket server will buffer all log data in memorsy so that late connecting viewers will get all the data.
You can limit the amount of data buffered by the WebSocket server with the server_memory_limit
argument.
Once reached, the earliest logged data will be dropped.
Note that this means that static data may be dropped if logged early (see https://github.com/rerun-io/rerun/issues/5531).
This function returns immediately.
PARAMETER | DESCRIPTION |
---|---|
open_browser
|
Open the default browser to the viewer.
TYPE:
|
web_port
|
The port to serve the web viewer on (defaults to 9090).
TYPE:
|
grpc_port
|
The port to serve the gRPC server on (defaults to 9876)
TYPE:
|
default_blueprint
|
Optionally set a default blueprint to use for this application. If the application
already has an active blueprint, the new blueprint won't become active until the user
clicks the "reset blueprint" button. If you want to activate the new blueprint
immediately, instead use the
TYPE:
|
server_memory_limit
|
Maximum amount of memory to use for buffering log data for clients that connect late. This can be a percentage of the total ram (e.g. "50%") or an absolute value (e.g. "4GB").
TYPE:
|
def set_time(timeline, *, sequence=None, duration=None, timestamp=None)
Set the current time of a timeline for this thread.
Used for all subsequent logging on the same thread, until the next call to
rerun.set_time
, rerun.reset_time
or rerun.disable_timeline
.
For example: set_time("frame_nr", sequence=frame_nr)
.
There is no requirement of monotonicity. You can move the time backwards if you like.
You are expected to set exactly ONE of the arguments sequence
, duration
, or timestamp
.
You may NOT change the type of a timeline, so if you use duration
for a specific timeline,
you must only use duration
for that timeline going forward.
The columnar equivalent to this function is rerun.TimeColumn
.
PARAMETER | DESCRIPTION |
---|---|
timeline
|
The name of the timeline to set the time for.
TYPE:
|
sequence
|
Used for sequential indices, like
TYPE:
|
duration
|
Used for relative times, like
TYPE:
|
timestamp
|
Used for absolute time indices, like
TYPE:
|
def set_time_nanos(timeline, nanos)
Set the current time for this thread.
Used for all subsequent logging on the same thread,
until the next call to rerun.set_time_nanos
or rerun.set_time_seconds
.
For example: set_time_nanos("capture_time", nanos_since_unix_epoch)
.
You can remove a timeline again using disable_timeline("capture_time")
.
Very large values will automatically be interpreted as nanoseconds since unix epoch (1970-01-01).
Small values (less than a few years) will be interpreted as relative
some unknown point in time, and will be shown as e.g. +3.132s
.
The bindings has a built-in time which is log_time
, and is logged as nanos since
unix epoch.
There is no requirement of monotonicity. You can move the time backwards if you like.
This function marks the timeline as being of a temporal type.
You should not use the sequential function rerun.set_time_sequence
on the same timeline, as that will produce undefined behavior.
PARAMETER | DESCRIPTION |
---|---|
timeline
|
The name of the timeline to set the time for.
TYPE:
|
nanos
|
The current time on the timeline in nanoseconds.
TYPE:
|
def set_time_seconds(timeline, seconds)
Set the current time for this thread in seconds.
Used for all subsequent logging on the same thread,
until the next call to rerun.set_time_seconds
or rerun.set_time_nanos
.
For example: set_time_seconds("capture_time", seconds_since_unix_epoch)
.
You can remove a timeline again using disable_timeline("capture_time")
.
Very large values will automatically be interpreted as seconds since unix epoch (1970-01-01).
Small values (less than a few years) will be interpreted as relative
some unknown point in time, and will be shown as e.g. +3.132s
.
The bindings has a built-in time which is log_time
, and is logged as seconds
since unix epoch.
There is no requirement of monotonicity. You can move the time backwards if you like.
This function marks the timeline as being of a temporal type.
You should not use the sequential function rerun.set_time_sequence
on the same timeline, as that will produce undefined behavior.
PARAMETER | DESCRIPTION |
---|---|
timeline
|
The name of the timeline to set the time for.
TYPE:
|
seconds
|
The current time on the timeline in seconds.
TYPE:
|
def set_time_sequence(timeline, sequence)
Set the current time for this thread as an integer sequence.
Used for all subsequent logging on the same thread,
until the next call to set_time_sequence
.
For example: set_time_sequence("frame_nr", frame_nr)
.
You can remove a timeline again using disable_timeline("frame_nr")
.
There is no requirement of monotonicity. You can move the time backwards if you like.
This function marks the timeline as being of a squential type.
You should not use the temporal functions (rerun.set_time_seconds
, rerun.set_time_nanos
)
on the same timeline, as that will produce undefined behavior.
PARAMETER | DESCRIPTION |
---|---|
timeline
|
The name of the timeline to set the time for.
TYPE:
|
sequence
|
The current time on the timeline in integer units.
TYPE:
|
def spawn(*, port=9876, connect=True, memory_limit='75%', hide_welcome_screen=False, default_blueprint=None)
Spawn a Rerun Viewer, listening on the given port.
This is often the easiest and best way to use Rerun. Just call this once at the start of your program.
You can also call rerun.init with a spawn=True
argument.
PARAMETER | DESCRIPTION |
---|---|
port
|
The port to listen on.
TYPE:
|
connect
|
also connect to the viewer and stream logging data to it.
TYPE:
|
memory_limit
|
An upper limit on how much memory the Rerun Viewer should use.
When this limit is reached, Rerun will drop the oldest data.
Example:
TYPE:
|
hide_welcome_screen
|
Hide the normal Rerun welcome screen.
TYPE:
|
default_blueprint
|
Optionally set a default blueprint to use for this application. If the application
already has an active blueprint, the new blueprint won't become active until the user
clicks the "reset blueprint" button. If you want to activate the new blueprint
immediately, instead use the
TYPE:
|
def stdout(default_blueprint=None)
Stream all log-data to stdout.
Pipe it into a Rerun Viewer to visualize it.
Call this before you log any data!
If there isn't any listener at the other end of the pipe, the RecordingStream
will
default back to buffered
mode, in order not to break the user's terminal.
PARAMETER | DESCRIPTION |
---|---|
default_blueprint
|
Optionally set a default blueprint to use for this application. If the application
already has an active blueprint, the new blueprint won't become active until the user
clicks the "reset blueprint" button. If you want to activate the new blueprint
immediately, instead use the
TYPE:
|
def init(application_id, *, recording_id=None, spawn=False, init_logging=True, default_enabled=True, strict=None, default_blueprint=None, send_properties=True)
Initialize the Rerun SDK with a user-chosen application id (name).
You must call this function first in order to initialize a global recording. Without an active recording, all methods of the SDK will turn into no-ops.
For more advanced use cases, e.g. multiple recordings setups, see rerun.RecordingStream
.
Warning
If you don't specify a recording_id
, it will default to a random value that is generated once
at the start of the process.
That value will be kept around for the whole lifetime of the process, and even inherited by all
its subprocesses, if any.
This makes it trivial to log data to the same recording in a multiprocess setup, but it also means that the following code will not create two distinct recordings:
rr.init("my_app")
rr.init("my_app")
To create distinct recordings from the same process, specify distinct recording IDs:
from uuid import uuid4
rr.init("my_app", recording_id=uuid4())
rr.init("my_app", recording_id=uuid4())
PARAMETER | DESCRIPTION |
---|---|
application_id
|
Your Rerun recordings will be categorized by this application id, so try to pick a unique one for each application that uses the Rerun SDK. For example, if you have one application doing object detection
and another doing camera calibration, you could have
Application ids starting with
TYPE:
|
recording_id
|
Set the recording ID that this process is logging to, as a UUIDv4. The default recording_id is based on If you are not using
TYPE:
|
spawn
|
Spawn a Rerun Viewer and stream logging data to it.
Short for calling
TYPE:
|
default_enabled
|
Should Rerun logging be on by default?
Can be overridden with the RERUN env-var, e.g.
TYPE:
|
init_logging
|
Should we initialize the logging for this application?
TYPE:
|
strict
|
If
TYPE:
|
default_blueprint
|
Optionally set a default blueprint to use for this application. If the application
already has an active blueprint, the new blueprint won't become active until the user
clicks the "reset blueprint" button. If you want to activate the new blueprint
immediately, instead use the
TYPE:
|
send_properties
|
TYPE:
|
def connect_grpc(url=None, *, flush_timeout_sec=2.0, default_blueprint=None, recording=None)
Connect to a remote Rerun Viewer on the given HTTP(S) URL.
This function returns immediately.
PARAMETER | DESCRIPTION |
---|---|
url
|
The HTTP(S) URL to connect to
TYPE:
|
flush_timeout_sec
|
The minimum time the SDK will wait during a flush before potentially
dropping data if progress is not being made. Passing
TYPE:
|
default_blueprint
|
Optionally set a default blueprint to use for this application. If the application
already has an active blueprint, the new blueprint won't become active until the user
clicks the "reset blueprint" button. If you want to activate the new blueprint
immediately, instead use the
TYPE:
|
recording
|
Specifies the
TYPE:
|
def disconnect(recording=None)
Closes all TCP connections, servers, and files.
Closes all TCP connections, servers, and files that have been opened with
[rerun.connect_grpc
], [rerun.serve
], [rerun.save
] or [rerun.spawn
].
PARAMETER | DESCRIPTION |
---|---|
recording
|
Specifies the
TYPE:
|
def save(path, default_blueprint=None, recording=None)
Stream all log-data to a file.
Call this before you log any data!
The Rerun Viewer is able to read continuously from the resulting rrd file while it is being written. However, depending on your OS and configuration, changes may not be immediately visible due to file caching. This is a common issue on Windows and (to a lesser extent) on MacOS.
PARAMETER | DESCRIPTION |
---|---|
path
|
The path to save the data to. |
default_blueprint
|
Optionally set a default blueprint to use for this application. If the application
already has an active blueprint, the new blueprint won't become active until the user
clicks the "reset blueprint" button. If you want to activate the new blueprint
immediately, instead use the
TYPE:
|
recording
|
Specifies the
TYPE:
|
def send_blueprint(blueprint, *, make_active=True, make_default=True, recording=None)
Create a blueprint from a BlueprintLike
and send it to the RecordingStream
.
PARAMETER | DESCRIPTION |
---|---|
blueprint
|
A blueprint object to send to the viewer.
TYPE:
|
make_active
|
Immediately make this the active blueprint for the associated
TYPE:
|
make_default
|
Make this the default blueprint for the
TYPE:
|
recording
|
Specifies the
TYPE:
|
def serve_web(*, open_browser=True, web_port=None, grpc_port=None, default_blueprint=None, recording=None, server_memory_limit='25%')
Serve log-data over WebSockets and serve a Rerun web viewer over HTTP.
You can also connect to this server with the native viewer using rerun localhost:9090
.
The WebSocket server will buffer all log data in memory so that late connecting viewers will get all the data.
You can limit the amount of data buffered by the WebSocket server with the server_memory_limit
argument.
Once reached, the earliest logged data will be dropped.
Note that this means that static data may be dropped if logged early (see https://github.com/rerun-io/rerun/issues/5531).
This function returns immediately.
PARAMETER | DESCRIPTION |
---|---|
open_browser
|
Open the default browser to the viewer.
TYPE:
|
web_port
|
The port to serve the web viewer on (defaults to 9090).
TYPE:
|
grpc_port
|
The port to serve the gRPC server on (defaults to 9876)
TYPE:
|
default_blueprint
|
Optionally set a default blueprint to use for this application. If the application
already has an active blueprint, the new blueprint won't become active until the user
clicks the "reset blueprint" button. If you want to activate the new blueprint
immediately, instead use the
TYPE:
|
recording
|
Specifies the
TYPE:
|
server_memory_limit
|
Maximum amount of memory to use for buffering log data for clients that connect late. This can be a percentage of the total ram (e.g. "50%") or an absolute value (e.g. "4GB").
TYPE:
|
def spawn(*, port=9876, connect=True, memory_limit='75%', hide_welcome_screen=False, default_blueprint=None, recording=None)
Spawn a Rerun Viewer, listening on the given port.
This is often the easiest and best way to use Rerun. Just call this once at the start of your program.
You can also call rerun.init with a spawn=True
argument.
PARAMETER | DESCRIPTION |
---|---|
port
|
The port to listen on.
TYPE:
|
connect
|
also connect to the viewer and stream logging data to it.
TYPE:
|
memory_limit
|
An upper limit on how much memory the Rerun Viewer should use.
When this limit is reached, Rerun will drop the oldest data.
Example:
TYPE:
|
hide_welcome_screen
|
Hide the normal Rerun welcome screen.
TYPE:
|
recording
|
Specifies the
TYPE:
|
default_blueprint
|
Optionally set a default blueprint to use for this application. If the application
already has an active blueprint, the new blueprint won't become active until the user
clicks the "reset blueprint" button. If you want to activate the new blueprint
immediately, instead use the
TYPE:
|
def memory_recording(recording=None)
Streams all log-data to a memory buffer.
This can be used to display the RRD to alternative formats such as html. See: rerun.notebook_show.
PARAMETER | DESCRIPTION |
---|---|
recording
|
Specifies the
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
MemoryRecording
|
A memory recording object that can be used to read the data. |
def notebook_show(*, width=None, height=None, blueprint=None, recording=None)
Output the Rerun viewer in a notebook using IPython IPython.core.display.HTML.
Any data logged to the recording after initialization will be sent directly to the viewer.
Note that this can be called at any point during cell execution. The call will block until the embedded viewer is initialized and ready to receive data. Thereafter any log calls will immediately send data to the viewer.
PARAMETER | DESCRIPTION |
---|---|
width
|
The width of the viewer in pixels.
TYPE:
|
height
|
The height of the viewer in pixels.
TYPE:
|
blueprint
|
A blueprint object to send to the viewer. It will be made active and set as the default blueprint in the recording. Setting this is equivalent to calling
TYPE:
|
recording
|
Specifies the
TYPE:
|
def legacy_notebook_show(*, width=DEFAULT_WIDTH, height=DEFAULT_HEIGHT, app_url=None, timeout_ms=DEFAULT_TIMEOUT, blueprint=None, recording=None)
Output the Rerun viewer in a notebook using IPython IPython.core.display.HTML.
This is a legacy function that uses a limited mechanism of inlining an RRD into a self-contained HTML template that loads the viewer in an iframe.
In general, rerun.notebook_show should be preferred. However, this function can be useful
in some systems with incomplete support for the anywidget
library.
PARAMETER | DESCRIPTION |
---|---|
width
|
The width of the viewer in pixels.
TYPE:
|
height
|
The height of the viewer in pixels.
TYPE:
|
app_url
|
Alternative HTTP url to find the Rerun web viewer. This will default to using
TYPE:
|
timeout_ms
|
The number of milliseconds to wait for the Rerun web viewer to load.
TYPE:
|
blueprint
|
The blueprint to display in the viewer.
TYPE:
|
recording
|
Specifies the
TYPE:
|