Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions dimos/dashboard/rerun_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,15 @@
_rerun_init_lock = threading.Lock()


def init_rerun_server(viewer_mode: str = "rerun-web") -> str:
def init_rerun_server(viewer_mode: str = "rerun-web", memory_limit: str = "4GB") -> str:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldnt we go off of system settiings similar to how we set num_workers based on CPU cores? Versus 4gb pretty arbitrary

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, and it should probably be a percentage. It's 75% by default if not configured. Maybe 25-50%?

"""Initialize Rerun server in the main process.

Starts the gRPC server and optionally the web/native viewer.
Should only be called once from the main process.

Args:
viewer_mode: One of "rerun-web", "rerun-native", or "rerun-grpc-only"
memory_limit: Maximum memory for Rerun viewer (e.g., "16GB", "25%"). Default 16GB.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

syntax: docstring says "Default 16GB" but the actual default is "4GB"

Suggested change
memory_limit: Maximum memory for Rerun viewer (e.g., "16GB", "25%"). Default 16GB.
memory_limit: Maximum memory for Rerun viewer (e.g., "16GB", "25%"). Default 4GB.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Smh true


Returns:
Server address for workers to connect to.
Expand All @@ -89,8 +90,8 @@ def init_rerun_server(viewer_mode: str = "rerun-web") -> str:

if viewer_mode == "rerun-native":
# Spawn native viewer (requires display)
rr.spawn(port=RERUN_GRPC_PORT, connect=True)
logger.info("Rerun: spawned native viewer", port=RERUN_GRPC_PORT)
rr.spawn(port=RERUN_GRPC_PORT, connect=True, memory_limit=memory_limit)
logger.info("Rerun: spawned native viewer", port=RERUN_GRPC_PORT, memory_limit=memory_limit)
elif viewer_mode == "rerun-web":
# Start gRPC + web viewer (headless friendly)
server_uri = rr.serve_grpc(grpc_port=RERUN_GRPC_PORT)
Expand Down