Skip to content

[Tiny] Add primary/main/core/std (whatever you want to call it) extras group for tutorial#978

Merged
spomichter merged 11 commits intodevfrom
jeff_simplify_extras
Jan 13, 2026
Merged

[Tiny] Add primary/main/core/std (whatever you want to call it) extras group for tutorial#978
spomichter merged 11 commits intodevfrom
jeff_simplify_extras

Conversation

@jeff-hykin
Copy link
Member

@spomichter core is aready used by dimos.core and these main/std/whatever deps are completely different than the deps that are required from dimos.core (which only needs lcm in principle), I would guess that lesh has some objections to this group being named "core"

Other than "not core" I don't care what the name is, but it probably will be locked in for a very long time

other changes:

  • the line change about rerun:
    • EITHER rerun needs to be in the base dependencies (which is what this PR does) OR (the better long term fix) the dimos.core python code needs to be edited to make rerun truly optional. Right now absolutely nothing can run with dimos without rerun installed (even if its never used)

@jeff-hykin jeff-hykin requested a review from a team January 12, 2026 03:42
@jeff-hykin jeff-hykin changed the base branch from main to dev January 12, 2026 03:42
@jeff-hykin jeff-hykin changed the title Add primary/main/core/std (whatever you want to call it) extras group for tutorial [Tiny] Add primary/main/core/std (whatever you want to call it) extras group for tutorial Jan 12, 2026
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 12, 2026

Greptile Overview

Greptile Summary

This PR introduces a new main extras group for tutorial/common use cases and addresses critical dependency issues:

Key Changes

Dependency Management:

  • Added new main extras group that bundles agents, web, perception, and visualization dependencies
  • Moved rerun-sdk>=0.20.0 from extras-only to base dependencies as a temporary fix (see TODO comment on line 68-70)
  • Updated unitree extras to use dimos[main] instead of listing individual groups
  • This addresses the issue where dimos.core.blueprints imports rerun unconditionally (lines 26-27), making rerun a de facto hard dependency

Bug Fixes:

  • Fixed MuJoCo video frame format issue: explicitly specify format=ImageFormat.RGB when creating Image from MuJoCo renderer output (line 278), since MuJoCo returns RGB but Image.from_numpy defaults to BGR
  • Improved mujoco_menagerie download trigger: changed from bare import mujoco_playground to from mujoco_playground._src import mjx_env; mjx_env.ensure_menagerie_exists() to properly trigger the download before subprocess launch (prevents timeout issues)
  • Fixed typo in comment: "menajerie" → "menagerie"

Code Hygiene:

  • Removed unused imports: SystemMessage from vlm_agent.py, threading from test_mcp_module.py, and Any from video_operators.py
  • Regenerated uv.lock after dependency changes (removed git-lfs pointer)

Architecture Impact

The main extras group provides a cleaner entry point for users following tutorials, consolidating commonly-needed dependencies. The rerun-sdk move to base dependencies is explicitly marked as temporary - the long-term fix should make rerun truly optional in dimos.core.

Confidence Score: 4/5

  • This PR is safe to merge with minimal risk - changes are well-documented and address real issues
  • Score of 4 reflects solid implementation with documented temporary workarounds. The rerun-sdk dependency move is explicitly marked as temporary (TODO comment), and the MuJoCo RGB format fix addresses a real color channel bug. Code changes are minimal, focused, and include proper cleanup of unused imports. The new 'main' extras group improves user experience without breaking existing functionality.
  • No files require special attention - all changes are straightforward and well-documented

Important Files Changed

File Analysis

Filename Score Overview
dimos/robot/unitree_webrtc/mujoco_connection.py 5/5 Fixed RGB format handling for MuJoCo frames and corrected menagerie download trigger - important bug fixes
pyproject.toml 4/5 Added 'main' extras group and moved rerun-sdk to base dependencies - addresses rerun hard dependency in core
uv.lock 5/5 Lock file regenerated after dependency changes - consistent with pyproject.toml updates

Sequence Diagram

sequenceDiagram
    participant User
    participant PyProject as pyproject.toml
    participant MujocoConn as MujocoConnection
    participant Image as Image.from_numpy
    participant MujocoPlayground as mujoco_playground

    Note over User,PyProject: Dependency Management Changes
    User->>PyProject: Install dimos
    PyProject-->>User: Now includes rerun-sdk in base dependencies
    
    Note over User,PyProject: New 'main' extras group
    User->>PyProject: Install dimos[main]
    PyProject-->>User: Installs agents, web, perception, visualization
    
    User->>PyProject: Install dimos[unitree]
    PyProject-->>User: Now uses dimos[main] (cleaner dependency chain)

    Note over MujocoConn,MujocoPlayground: MuJoCo Initialization
    MujocoConn->>MujocoPlayground: Import mujoco_playground._src.mjx_env
    MujocoPlayground->>MujocoPlayground: ensure_menagerie_exists()
    Note right of MujocoPlayground: Prevents timeout in subprocess

    Note over MujocoConn,Image: Video Frame Handling
    MujocoConn->>MujocoConn: get_video_frame()
    MujocoConn->>Image: from_numpy(frame, format=ImageFormat.RGB)
    Note right of Image: Explicitly specifies RGB format<br/>MuJoCo returns RGB, not BGR
    Image-->>MujocoConn: Correctly formatted Image
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

No files reviewed, no comments

Edit Code Review Agent Settings | Greptile

pyproject.toml Outdated
]

main = [
"dimos[agents,web,perception,visualization]",
Copy link
Contributor

Choose a reason for hiding this comment

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

Redundant. You just added rerun to base dependencies so why would you also import visualization. and why is visualization extra even there

Copy link
Member Author

@jeff-hykin jeff-hykin Jan 13, 2026

Choose a reason for hiding this comment

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

presumably rerun is going to be taken out of the required depnendcies soon (when that happens this change will be necessary). Also if someone adds something extra to visualization they might not know to add visulization here.

e.g. this line is just "if visulization has any deps, install them with 'base'"

Copy link
Contributor

Choose a reason for hiding this comment

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

add sim

pyproject.toml Outdated
]

main = [
"dimos[agents,web,perception,visualization]",
Copy link
Contributor

Choose a reason for hiding this comment

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

add sim

@spomichter spomichter merged commit d193cf1 into dev Jan 13, 2026
6 checks passed
@spomichter spomichter deleted the jeff_simplify_extras branch January 13, 2026 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants