Skip to content

feat(g1): add PICO SONIC WebXR teleoperation - #3721

Draft
TomCC7 wants to merge 65 commits into
mainfrom
cc/feat/pico-teleop-sonic
Draft

TomCC7 wants to merge 65 commits into
mainfrom
cc/feat/pico-teleop-sonic

Conversation

@TomCC7

@TomCC7 TomCC7 commented Aug 27, 2026

Copy link
Copy Markdown
Member

Summary

  • route PICO WebXR body tracking through a specialized G1 SONIC teleoperation task
  • keep SONIC balancing active while the WebXR deadman switches between operator and planner references
  • make hardware and MuJoCo control activation wait for a complete low-level command
  • add the runnable unitree-g1-sonic-webxr-teleop blueprint and native MuJoCo visualization path

Dependencies

This draft integrates the three prerequisite branches for end-to-end simulation testing.

Validation

  • 400 affected tests passed; 6 optional-dependency tests skipped as expected
  • Ruff passed on changed source
  • mypy passed on the changed source modules
  • blueprint registry generation and blueprint-kwargs validation passed
  • live PICO + Motion Tracker test passed with:
    uv run dimos --simulation mujoco --viewer none run unitree-g1-sonic-webxr-teleop
    • G1 stood and remained balanced
    • WebXR engagement drove the SONIC reference
    • motion was visible in the native MuJoCo viewer

Local runtime note

ONNX Runtime falls back to CPU when the CUDA execution provider is unavailable.

Nabla7 and others added 30 commits August 19, 2026 18:48
GEAR-SONIC planner+encoder+decoder ported from the Matrix parity
reimplementation into a ControlTask claiming all 29 joints. All 27
locomotion modes RPC-reachable via task_invoke; twist via the standard
duck-typed hook; upper-body targets are encoder hints only (never
post-decoder overrides). Armature-derived SONIC PD gains carried over
exactly, including the doubled ankle/waist entries. Blueprint
unitree-g1-sonic-wbc with the standard sim/real dual backend.

Verified standalone against raw MuJoCo: 40 s continuous choreography
(walk 4 m, squat, boxing, dance) with zero falls and zero NaN at
0.23 ms/step policy latency on CPU onnxruntime.
Groot-style URDF static robot + joint-state overrides, entity key matching
zenoh's stripped topic naming (world/g1_joints). Guarded off under
DIMOS_TRANSPORT=zenoh: callable factories in rerun_config do not survive
zenoh module-deploy serialization (msgpack -> dicts -> validation reject);
applies to any blueprint, works under LCM.
SONIC's native protocol as a first-class task input: wire codec for the
1280-byte packed-header format (round-trip verified against NVIDIA's own
builders), command/planner/pose topic routing polled non-blocking from
compute(), StreamedMotionMerger ported faithfully (sliding window,
catch-up, protocol v1/v2/v3, encode-mode selection), SMPL + wrist encoder
fields for mode 2, wire-order 17-DoF upper-body targets with velocities,
direct planner commands overriding twist mapping, g1_debug state PUB.

E2E verified in sim against the live blueprint driven ONLY by NVIDIA's
sender code: planner-mode walk, then protocol-v1 streamed-motion playback
of the macarena reference clip - 110 planner + 110 pose messages, zero
decode errors, zero tick errors, no falls (base z 0.79 at end).
play_motion_clip/stop_motion_clip/list_motion_clips on the task: reference
clips (50 Hz CSVs, IsaacLab joint order) load into a StreamedMotion and run
through the exact streamed-motion path the ZMQ pose topic uses, heading
re-anchored on start. Verified in the sim blueprint over RPC: macarena
(1375 frames) and dance_in_da_party (497) play end to end, no falls,
clean return to planner idle after stop.

data/sonic ships via LFS (encoder+decoder+774MB planner, observation
config, 13 reference clips); blueprint model paths now default to
LfsPath("sonic") with SONIC_MODEL_DIR/SONIC_PLANNER_PATH still
overriding, so the GR00T-WholeBodyControl checkout is no longer required.

Also restores the LFS pointer for reloc_and_nav_to.webp that the first
SONIC commit accidentally hydrated (132 B -> 1 MB blob).
End-effector teleop through SONIC's native interface: set_vr_3point RPC
and the ZMQ planner-topic vr fields feed root-relative wrist/head poses
(9 pos + 12 quat, C++ GatherVR3Point buffered convention - sender applies
offsets and root normalization) into encoder obs [901:922]. Teleop mode
builds the C++-faithful observation: zeroed buffer, mode scalar,
lowerbody joint history from the planner trajectory using the
mujoco-order-in-isaaclab index set, single-frame anchor orientation.
Stale VR data (>0.5 s) reverts to planner obs; locomotion keeps running
underneath.

Verified: unit test pins every field offset against policy_parameters.hpp
and observation_config.yaml; sim E2E - hands-raised targets streamed at
15 Hz swing the elbows 1.28 rad while base z stays 0.77-0.80, and the
arms return to idle after the stream stops.
NVIDIA's SONIC v1.1 (HF nvidia/GEAR-SONIC sonic_v1_1) is now the shipped
checkpoint: heading-normalized target orientations + wrist-pose
augmentation, the intended model for whole-body teleoperation. The
pipeline selects the obs layout by the encoder's input width (1762
original / 1751 v1.1 - root_z dropped, anchor fields reordered, every
downstream offset shifted) and switches the anchor-orientation left quat
to robot heading only (C++ orientation_mode 1). The original release
still runs via SONIC_MODEL_DIR; data/sonic and the LFS archive carry
v1.1.

Fixes a heading bug v1.1 exposed (latent under the original checkpoint):
motion-source switches kept the previous source's heading delta, so
post-clip planner trajectories stayed anchored to the clip's mocap
heading and the policy turned instead of walking. Heading now re-anchors
on every source switch (C++ reinitialize_heading_ semantics).

PICO 5-sensor teleop path (full-body SMPL from headset + controllers +
foot trackers, pose-topic protocol v3): accept the pico server's
body_quat_w field name, consume vr_position/vr_orientation from the pose
topic, and apply heading_increment (joystick yaw) into the heading delta.

Verified on v1.1 in sim: walk 4.28 m; macarena tracks end to end; VR
3-point elbows 1.34 rad with base z 0.786-0.807; clip->VR->walk
regression 4.19 m; pico-faithful SMPL stream (NVIDIA's pack_pose_message,
exact field set) runs encoder mode 2 with stable stance and +0.9 rad
heading_increment yaws the robot +0.72 rad. Obs layouts for both
variants unit-pinned against the C++ registry and both
observation_config.yaml files.
Drop the checkpoint-variant layout table: we ship exactly one policy
(SONIC v1.1 in the LFS archive), so the obs layout is flat module
constants again and the anchor math is unconditionally heading-normalized.
A checkpoint with a different encoder width now fails at load with a
clear error instead of being silently supported.

Smoke on the stripped build: clip -> walk 4.21 m, base z 0.788.
…on to self-hosted

Both from PR review: set_velocity_command was reachable only via the
coordinator's undeclared reflective-dispatch fallback (warning, no
signature validation); and the blueprint stringifies LfsPath model paths
at import, which on the plain Ubuntu runner means a git-lfs failure or an
836MB pull during blueprint validation - same reason unitree-g1-nav-sim
is self-hosted.
Conflict in test_all_blueprints.py: main reorganized SELF_HOSTED_BLUEPRINTS
(openarm added, nav blueprints removed with the asset-manager migration);
kept main's list plus unitree-g1-sonic-wbc, which still stringifies
LfsPath model paths at import.

Post-merge hardening found by the runtime smoke: pyzmq was never a
declared dependency (the task's ZMQ wire rode a manually installed
package) - added to project deps. And a missing pyzmq used to make
_zmq_start retry the import and log a warning on every 50 Hz compute
tick, which starved the control loop until the robot collapsed; the wire
now disables itself permanently after one failed start, one warning.

Smoke on merged main: arm + walk 3.56 m, base z 0.787.
Two mechanisms from the C++ gamepad manager that the port lacked, found
by chasing a kneel-entry crash (instant walking-context -> kneel switch
made the planner emit a violent drop):

- set_mode now stages floor postures exactly like gamepad_manager.hpp:
  crawling is entered through kneel, elbow crawling through crawling,
  exits reverse the ladder, one rung per 2 s dwell, advanced from step().
- Forced modes apply the C++ applySpeedAndHeight table: kneel/squat/crawl
  send the planner height command (0.4 / 0.4 / 0.3) - without it the
  planner emits a floor-collapse descent instead of a supported kneel -
  and the crawl/boxing families their canonical 0.7 speed.

Also applies command-topic delta_heading (incremental yaw, was decoded
and only logged).

Verified in the standalone harness at real-time planner pacing: kneel
holds at z 0.41 and stands back up; single kneel likewise; crawl ->
kneel -> stand recovery works; full 27-mode + 13-clip take with a live
chained floor section, zero falls. Genuine policy limitation left:
lying face down has no get-up (the C++ transition logic never chains
out of lying either).
Review feedback: nothing points NVIDIA's ZMQ tooling at dimos, and the
teleop work built on this task talks to the pipeline directly (zenoh),
so the socket layer was dead code. Removes zmq_wire.py, the task's
socket/poll/publish plumbing, and the pyzmq dependency. The streamed
motion merger and the pose-fields contract stay; that is what teleop
consumes.
Review feedback: the version is a property of the sender, not of each
chunk. Establish it from the first chunk, hold it until reset(), and keep
the per-chunk field check purely as a mid-stream sender-change guard
(the C++ endpoint errors on that too).
PICO WebXR omits its platform-reserved menu button, so controller packets contain six buttons. Treat the trailing menu slot as optional instead of rejecting otherwise valid joystick input.
@codecov

codecov Bot commented Sep 10, 2026

Copy link
Copy Markdown

❌ 27 Tests Failed:

Tests completed Failed Passed Skipped
5280 27 5253 186
View the top 3 failed test(s) by shortest run time
::dimos.simulation.mujoco.test_model
Stack Traces | 0s run time
ImportError while importing test module '.../simulation/mujoco/test_model.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
.../simulation/mujoco/test_model.py:18: in <module>
    from dimos.simulation.mujoco.model import get_assets
.../simulation/mujoco/model.py:23: in <module>
    from mujoco_playground._src import mjx_env
E   ModuleNotFoundError: No module named 'mujoco_playground'
dimos.control.tasks.g1_sonic_wbc_task.test_sonic_onnx_runtime::test_prepare_rejects_cpu_only_runtime_before_loading_models
Stack Traces | 0.004s run time
mocker = <pytest_mock.plugin.MockerFixture object at 0xffe9d6a79b80>

    def test_prepare_rejects_cpu_only_runtime_before_loading_models(mocker: Any) -> None:
        mocker.patch.object(
            ort,
            "get_available_providers",
            return_value=["CPUExecutionProvider"],
        )
    
        with pytest.raises(RuntimeError, match="requires CUDAExecutionProvider"):
>           sonic_onnx_runtime.prepare_sonic_onnx_runtime()

mocker     = <pytest_mock.plugin.MockerFixture object at 0xffe9d6a79b80>

.../tasks/g1_sonic_wbc_task/test_sonic_onnx_runtime.py:44: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def prepare_sonic_onnx_runtime() -> None:
        """Validate CUDA availability and preload packaged libraries when supported."""
        ort_version = str(getattr(ort, "__version__", "unknown"))
        if platform.machine() == "aarch64" and ort_version != JETSON_ORT_VERSION:
>           raise RuntimeError(
                f"SONIC on Jetson requires validated ONNX Runtime {JETSON_ORT_VERSION}; "
                f"found {ort_version}. Run .../hardware/g1/setup-sonic-jp5."
            )
E           RuntimeError: SONIC on Jetson requires validated ONNX Runtime 1.18.1; found 1.24.1. Run .../hardware/g1/setup-sonic-jp5.

ort_version = '1.24.1'

.../tasks/g1_sonic_wbc_task/sonic_onnx_runtime.py:35: RuntimeError

During handling of the above exception, another exception occurred:

mocker = <pytest_mock.plugin.MockerFixture object at 0xffe9d6a79b80>

    def test_prepare_rejects_cpu_only_runtime_before_loading_models(mocker: Any) -> None:
        mocker.patch.object(
            ort,
            "get_available_providers",
            return_value=["CPUExecutionProvider"],
        )
    
>       with pytest.raises(RuntimeError, match="requires CUDAExecutionProvider"):
E       AssertionError: Regex pattern did not match.
E        Regex: 'requires CUDAExecutionProvider'
E        Input: 'SONIC on Jetson requires validated ONNX Runtime 1.18.1; found 1.24.1. Run .../hardware/g1/setup-sonic-jp5.'

mocker     = <pytest_mock.plugin.MockerFixture object at 0xffe9d6a79b80>

.../tasks/g1_sonic_wbc_task/test_sonic_onnx_runtime.py:43: AssertionError
dimos.control.tasks.g1_sonic_wbc_task.test_sonic_pipeline::test_live_pose_window_replaces_backlogged_stream
Stack Traces | 0.004s run time
mocker = <pytest_mock.plugin.MockerFixture object at 0xff9c0e3a9d60>

    @pytest.fixture
    def pipeline(mocker: Any) -> Iterator[SonicPipeline]:
        encoder = mocker.MagicMock()
        encoder.get_inputs.return_value = [
            SimpleNamespace(name="encoder_input", shape=[1, ENCODER_OBS_DIM])
        ]
        encoder.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
        encoder.run.return_value = [np.zeros((1, 64), dtype=np.float32)]
    
        decoder = mocker.MagicMock()
        decoder.get_inputs.return_value = [SimpleNamespace(name="decoder_input", shape=[1, 994])]
        decoder.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
    
        planner = mocker.MagicMock()
        planner.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
    
        inference_session = mocker.patch.object(
            ort,
            "InferenceSession",
            side_effect=[encoder, decoder, planner],
        )
        preload_dlls = mocker.patch.object(ort, "preload_dlls")
        mocker.patch.object(
            ort,
            "get_available_providers",
            return_value=["CUDAExecutionProvider", "CPUExecutionProvider"],
        )
>       instance = SonicPipeline("encoder.onnx", "decoder.onnx", "planner.onnx")

decoder    = <MagicMock id='281045395640864'>
encoder    = <MagicMock id='281045718706576'>
inference_session = <MagicMock name='InferenceSession' id='281045394535488'>
mocker     = <pytest_mock.plugin.MockerFixture object at 0xff9c0e3a9d60>
planner    = <MagicMock id='281045395203536'>
preload_dlls = <MagicMock name='preload_dlls' id='281045394530112'>

.../tasks/g1_sonic_wbc_task/test_sonic_pipeline.py:102: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.../tasks/g1_sonic_wbc_task/sonic_pipeline.py:580: in __init__
    prepare_sonic_onnx_runtime()
        decoder_path = 'decoder.onnx'
        encoder_path = 'encoder.onnx'
        planner_path = 'planner.onnx'
        profile    = 'sonic-v1.1'
        self       = <dimos.control.tasks.g1_sonic_wbc_task.sonic_pipeline.SonicPipeline object at 0xff9bfaf29d90>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def prepare_sonic_onnx_runtime() -> None:
        """Validate CUDA availability and preload packaged libraries when supported."""
        ort_version = str(getattr(ort, "__version__", "unknown"))
        if platform.machine() == "aarch64" and ort_version != JETSON_ORT_VERSION:
>           raise RuntimeError(
                f"SONIC on Jetson requires validated ONNX Runtime {JETSON_ORT_VERSION}; "
                f"found {ort_version}. Run .../hardware/g1/setup-sonic-jp5."
            )
E           RuntimeError: SONIC on Jetson requires validated ONNX Runtime 1.18.1; found 1.24.1. Run .../hardware/g1/setup-sonic-jp5.

ort_version = '1.24.1'

.../tasks/g1_sonic_wbc_task/sonic_onnx_runtime.py:35: RuntimeError
dimos.control.tasks.g1_sonic_wbc_task.test_sonic_pipeline::test_low_latency_pipeline_accepts_only_its_1247_input_model
Stack Traces | 0.004s run time
mocker = <pytest_mock.plugin.MockerFixture object at 0xff9bfaf2b260>

    def test_low_latency_pipeline_accepts_only_its_1247_input_model(mocker: Any) -> None:
        encoder = mocker.MagicMock()
        encoder.get_inputs.return_value = [SimpleNamespace(name="encoder", shape=[1, 1247])]
        encoder.get_providers.return_value = ["CUDAExecutionProvider"]
        encoder.run.return_value = [np.zeros((1, 64), dtype=np.float32)]
        decoder = mocker.MagicMock()
        decoder.get_inputs.return_value = [SimpleNamespace(name="decoder", shape=[1, 994])]
        decoder.get_providers.return_value = ["CUDAExecutionProvider"]
        planner = mocker.MagicMock()
        planner.get_providers.return_value = ["CUDAExecutionProvider", "CPUExecutionProvider"]
        mocker.patch.object(
            ort,
            "get_available_providers",
            return_value=["CUDAExecutionProvider", "CPUExecutionProvider"],
        )
        mocker.patch.object(ort, "preload_dlls")
        mocker.patch.object(ort, "InferenceSession", side_effect=[encoder, decoder, planner])
    
>       instance = SonicPipeline(
            "low_encoder.onnx",
            "low_decoder.onnx",
            "planner.onnx",
            profile=SONIC_LOW_LATENCY_PIPELINE,
        )

decoder    = <MagicMock id='281045394516896'>
encoder    = <MagicMock id='281045395222992'>
mocker     = <pytest_mock.plugin.MockerFixture object at 0xff9bfaf2b260>
planner    = <MagicMock id='281045394429696'>

.../tasks/g1_sonic_wbc_task/test_sonic_pipeline.py:284: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.../tasks/g1_sonic_wbc_task/sonic_pipeline.py:580: in __init__
    prepare_sonic_onnx_runtime()
        decoder_path = 'low_decoder.onnx'
        encoder_path = 'low_encoder.onnx'
        planner_path = 'planner.onnx'
        profile    = 'sonic-low-latency'
        self       = <dimos.control.tasks.g1_sonic_wbc_task.sonic_pipeline.SonicPipeline object at 0xff9bfaeaf740>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def prepare_sonic_onnx_runtime() -> None:
        """Validate CUDA availability and preload packaged libraries when supported."""
        ort_version = str(getattr(ort, "__version__", "unknown"))
        if platform.machine() == "aarch64" and ort_version != JETSON_ORT_VERSION:
>           raise RuntimeError(
                f"SONIC on Jetson requires validated ONNX Runtime {JETSON_ORT_VERSION}; "
                f"found {ort_version}. Run .../hardware/g1/setup-sonic-jp5."
            )
E           RuntimeError: SONIC on Jetson requires validated ONNX Runtime 1.18.1; found 1.24.1. Run .../hardware/g1/setup-sonic-jp5.

ort_version = '1.24.1'

.../tasks/g1_sonic_wbc_task/sonic_onnx_runtime.py:35: RuntimeError
dimos.control.tasks.g1_sonic_wbc_task.test_sonic_pipeline::test_pipeline_does_not_retry_planner_on_cpu
Stack Traces | 0.004s run time
mocker = <pytest_mock.plugin.MockerFixture object at 0xff9bfaf9a0c0>

    def test_pipeline_does_not_retry_planner_on_cpu(mocker: Any) -> None:
        cuda_session = mocker.MagicMock()
        cuda_session.get_inputs.return_value = [
            SimpleNamespace(name="input", shape=[1, ENCODER_OBS_DIM])
        ]
        cuda_session.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
        mocker.patch.object(
            ort,
            "get_available_providers",
            return_value=["CUDAExecutionProvider", "CPUExecutionProvider"],
        )
        mocker.patch.object(ort, "preload_dlls")
        inference_session = mocker.patch.object(
            ort,
            "InferenceSession",
            side_effect=[cuda_session, cuda_session, RuntimeError("CUDA load failed")],
        )
    
        with pytest.raises(RuntimeError, match="CUDA load failed"):
>           SonicPipeline("encoder.onnx", "decoder.onnx", "planner.onnx")

cuda_session = <MagicMock id='281045718820208'>
inference_session = <MagicMock name='InferenceSession' id='281045395527904'>
mocker     = <pytest_mock.plugin.MockerFixture object at 0xff9bfaf9a0c0>

.../tasks/g1_sonic_wbc_task/test_sonic_pipeline.py:183: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.../tasks/g1_sonic_wbc_task/sonic_pipeline.py:580: in __init__
    prepare_sonic_onnx_runtime()
        decoder_path = 'decoder.onnx'
        encoder_path = 'encoder.onnx'
        planner_path = 'planner.onnx'
        profile    = 'sonic-v1.1'
        self       = <dimos.control.tasks.g1_sonic_wbc_task.sonic_pipeline.SonicPipeline object at 0xff9bfae3d820>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def prepare_sonic_onnx_runtime() -> None:
        """Validate CUDA availability and preload packaged libraries when supported."""
        ort_version = str(getattr(ort, "__version__", "unknown"))
        if platform.machine() == "aarch64" and ort_version != JETSON_ORT_VERSION:
>           raise RuntimeError(
                f"SONIC on Jetson requires validated ONNX Runtime {JETSON_ORT_VERSION}; "
                f"found {ort_version}. Run .../hardware/g1/setup-sonic-jp5."
            )
E           RuntimeError: SONIC on Jetson requires validated ONNX Runtime 1.18.1; found 1.24.1. Run .../hardware/g1/setup-sonic-jp5.

ort_version = '1.24.1'

.../tasks/g1_sonic_wbc_task/sonic_onnx_runtime.py:35: RuntimeError

During handling of the above exception, another exception occurred:

mocker = <pytest_mock.plugin.MockerFixture object at 0xff9bfaf9a0c0>

    def test_pipeline_does_not_retry_planner_on_cpu(mocker: Any) -> None:
        cuda_session = mocker.MagicMock()
        cuda_session.get_inputs.return_value = [
            SimpleNamespace(name="input", shape=[1, ENCODER_OBS_DIM])
        ]
        cuda_session.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
        mocker.patch.object(
            ort,
            "get_available_providers",
            return_value=["CUDAExecutionProvider", "CPUExecutionProvider"],
        )
        mocker.patch.object(ort, "preload_dlls")
        inference_session = mocker.patch.object(
            ort,
            "InferenceSession",
            side_effect=[cuda_session, cuda_session, RuntimeError("CUDA load failed")],
        )
    
>       with pytest.raises(RuntimeError, match="CUDA load failed"):
E       AssertionError: Regex pattern did not match.
E        Regex: 'CUDA load failed'
E        Input: 'SONIC on Jetson requires validated ONNX Runtime 1.18.1; found 1.24.1. Run .../hardware/g1/setup-sonic-jp5.'

cuda_session = <MagicMock id='281045718820208'>
inference_session = <MagicMock name='InferenceSession' id='281045395527904'>
mocker     = <pytest_mock.plugin.MockerFixture object at 0xff9bfaf9a0c0>

.../tasks/g1_sonic_wbc_task/test_sonic_pipeline.py:182: AssertionError
dimos.control.tasks.g1_sonic_wbc_task.test_sonic_pipeline::test_planner_cold_start_is_warmed_before_runtime_timing
Stack Traces | 0.004s run time
mocker = <pytest_mock.plugin.MockerFixture object at 0xff9bfae3ec00>

    @pytest.fixture
    def pipeline(mocker: Any) -> Iterator[SonicPipeline]:
        encoder = mocker.MagicMock()
        encoder.get_inputs.return_value = [
            SimpleNamespace(name="encoder_input", shape=[1, ENCODER_OBS_DIM])
        ]
        encoder.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
        encoder.run.return_value = [np.zeros((1, 64), dtype=np.float32)]
    
        decoder = mocker.MagicMock()
        decoder.get_inputs.return_value = [SimpleNamespace(name="decoder_input", shape=[1, 994])]
        decoder.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
    
        planner = mocker.MagicMock()
        planner.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
    
        inference_session = mocker.patch.object(
            ort,
            "InferenceSession",
            side_effect=[encoder, decoder, planner],
        )
        preload_dlls = mocker.patch.object(ort, "preload_dlls")
        mocker.patch.object(
            ort,
            "get_available_providers",
            return_value=["CUDAExecutionProvider", "CPUExecutionProvider"],
        )
>       instance = SonicPipeline("encoder.onnx", "decoder.onnx", "planner.onnx")

decoder    = <MagicMock id='281045395237072'>
encoder    = <MagicMock id='281045394254512'>
inference_session = <MagicMock name='InferenceSession' id='281045394584256'>
mocker     = <pytest_mock.plugin.MockerFixture object at 0xff9bfae3ec00>
planner    = <MagicMock id='281045394576672'>
preload_dlls = <MagicMock name='preload_dlls' id='281045394935968'>

.../tasks/g1_sonic_wbc_task/test_sonic_pipeline.py:102: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.../tasks/g1_sonic_wbc_task/sonic_pipeline.py:580: in __init__
    prepare_sonic_onnx_runtime()
        decoder_path = 'decoder.onnx'
        encoder_path = 'encoder.onnx'
        planner_path = 'planner.onnx'
        profile    = 'sonic-v1.1'
        self       = <dimos.control.tasks.g1_sonic_wbc_task.sonic_pipeline.SonicPipeline object at 0xff9bfaee7da0>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def prepare_sonic_onnx_runtime() -> None:
        """Validate CUDA availability and preload packaged libraries when supported."""
        ort_version = str(getattr(ort, "__version__", "unknown"))
        if platform.machine() == "aarch64" and ort_version != JETSON_ORT_VERSION:
>           raise RuntimeError(
                f"SONIC on Jetson requires validated ONNX Runtime {JETSON_ORT_VERSION}; "
                f"found {ort_version}. Run .../hardware/g1/setup-sonic-jp5."
            )
E           RuntimeError: SONIC on Jetson requires validated ONNX Runtime 1.18.1; found 1.24.1. Run .../hardware/g1/setup-sonic-jp5.

ort_version = '1.24.1'

.../tasks/g1_sonic_wbc_task/sonic_onnx_runtime.py:35: RuntimeError
dimos.control.tasks.g1_sonic_wbc_task.test_sonic_pipeline::test_planner_prepare_uses_measured_joint_context
Stack Traces | 0.004s run time
mocker = <pytest_mock.plugin.MockerFixture object at 0xff9bfad42600>

    @pytest.fixture
    def pipeline(mocker: Any) -> Iterator[SonicPipeline]:
        encoder = mocker.MagicMock()
        encoder.get_inputs.return_value = [
            SimpleNamespace(name="encoder_input", shape=[1, ENCODER_OBS_DIM])
        ]
        encoder.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
        encoder.run.return_value = [np.zeros((1, 64), dtype=np.float32)]
    
        decoder = mocker.MagicMock()
        decoder.get_inputs.return_value = [SimpleNamespace(name="decoder_input", shape=[1, 994])]
        decoder.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
    
        planner = mocker.MagicMock()
        planner.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
    
        inference_session = mocker.patch.object(
            ort,
            "InferenceSession",
            side_effect=[encoder, decoder, planner],
        )
        preload_dlls = mocker.patch.object(ort, "preload_dlls")
        mocker.patch.object(
            ort,
            "get_available_providers",
            return_value=["CUDAExecutionProvider", "CPUExecutionProvider"],
        )
>       instance = SonicPipeline("encoder.onnx", "decoder.onnx", "planner.onnx")

decoder    = <MagicMock id='281045393728016'>
encoder    = <MagicMock id='281045393220592'>
inference_session = <MagicMock name='InferenceSession' id='281045393812432'>
mocker     = <pytest_mock.plugin.MockerFixture object at 0xff9bfad42600>
planner    = <MagicMock id='281045393804848'>
preload_dlls = <MagicMock name='preload_dlls' id='281045394016688'>

.../tasks/g1_sonic_wbc_task/test_sonic_pipeline.py:102: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.../tasks/g1_sonic_wbc_task/sonic_pipeline.py:580: in __init__
    prepare_sonic_onnx_runtime()
        decoder_path = 'decoder.onnx'
        encoder_path = 'encoder.onnx'
        planner_path = 'planner.onnx'
        profile    = 'sonic-v1.1'
        self       = <dimos.control.tasks.g1_sonic_wbc_task.sonic_pipeline.SonicPipeline object at 0xff9bfae07680>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def prepare_sonic_onnx_runtime() -> None:
        """Validate CUDA availability and preload packaged libraries when supported."""
        ort_version = str(getattr(ort, "__version__", "unknown"))
        if platform.machine() == "aarch64" and ort_version != JETSON_ORT_VERSION:
>           raise RuntimeError(
                f"SONIC on Jetson requires validated ONNX Runtime {JETSON_ORT_VERSION}; "
                f"found {ort_version}. Run .../hardware/g1/setup-sonic-jp5."
            )
E           RuntimeError: SONIC on Jetson requires validated ONNX Runtime 1.18.1; found 1.24.1. Run .../hardware/g1/setup-sonic-jp5.

ort_version = '1.24.1'

.../tasks/g1_sonic_wbc_task/sonic_onnx_runtime.py:35: RuntimeError
dimos.control.tasks.g1_sonic_wbc_task.test_sonic_pipeline::test_planner_transition_blends_pose_token_to_each_live_planner_token
Stack Traces | 0.004s run time
mocker = <pytest_mock.plugin.MockerFixture object at 0xff9bfaf284d0>

    @pytest.fixture
    def pipeline(mocker: Any) -> Iterator[SonicPipeline]:
        encoder = mocker.MagicMock()
        encoder.get_inputs.return_value = [
            SimpleNamespace(name="encoder_input", shape=[1, ENCODER_OBS_DIM])
        ]
        encoder.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
        encoder.run.return_value = [np.zeros((1, 64), dtype=np.float32)]
    
        decoder = mocker.MagicMock()
        decoder.get_inputs.return_value = [SimpleNamespace(name="decoder_input", shape=[1, 994])]
        decoder.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
    
        planner = mocker.MagicMock()
        planner.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
    
        inference_session = mocker.patch.object(
            ort,
            "InferenceSession",
            side_effect=[encoder, decoder, planner],
        )
        preload_dlls = mocker.patch.object(ort, "preload_dlls")
        mocker.patch.object(
            ort,
            "get_available_providers",
            return_value=["CUDAExecutionProvider", "CPUExecutionProvider"],
        )
>       instance = SonicPipeline("encoder.onnx", "decoder.onnx", "planner.onnx")

decoder    = <MagicMock id='281045394538224'>
encoder    = <MagicMock id='281045395212336'>
inference_session = <MagicMock name='InferenceSession' id='281045395741760'>
mocker     = <pytest_mock.plugin.MockerFixture object at 0xff9bfaf284d0>
planner    = <MagicMock id='281045395650272'>
preload_dlls = <MagicMock name='preload_dlls' id='281045395750640'>

.../tasks/g1_sonic_wbc_task/test_sonic_pipeline.py:102: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.../tasks/g1_sonic_wbc_task/sonic_pipeline.py:580: in __init__
    prepare_sonic_onnx_runtime()
        decoder_path = 'decoder.onnx'
        encoder_path = 'encoder.onnx'
        planner_path = 'planner.onnx'
        profile    = 'sonic-v1.1'
        self       = <dimos.control.tasks.g1_sonic_wbc_task.sonic_pipeline.SonicPipeline object at 0xff9bfaf26a50>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def prepare_sonic_onnx_runtime() -> None:
        """Validate CUDA availability and preload packaged libraries when supported."""
        ort_version = str(getattr(ort, "__version__", "unknown"))
        if platform.machine() == "aarch64" and ort_version != JETSON_ORT_VERSION:
>           raise RuntimeError(
                f"SONIC on Jetson requires validated ONNX Runtime {JETSON_ORT_VERSION}; "
                f"found {ort_version}. Run .../hardware/g1/setup-sonic-jp5."
            )
E           RuntimeError: SONIC on Jetson requires validated ONNX Runtime 1.18.1; found 1.24.1. Run .../hardware/g1/setup-sonic-jp5.

ort_version = '1.24.1'

.../tasks/g1_sonic_wbc_task/sonic_onnx_runtime.py:35: RuntimeError
dimos.control.tasks.g1_sonic_wbc_task.test_sonic_pipeline::test_planner_transition_rejects_invalid_duration[-0.1]
Stack Traces | 0.004s run time
mocker = <pytest_mock.plugin.MockerFixture object at 0xff9c0e436030>

    @pytest.fixture
    def pipeline(mocker: Any) -> Iterator[SonicPipeline]:
        encoder = mocker.MagicMock()
        encoder.get_inputs.return_value = [
            SimpleNamespace(name="encoder_input", shape=[1, ENCODER_OBS_DIM])
        ]
        encoder.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
        encoder.run.return_value = [np.zeros((1, 64), dtype=np.float32)]
    
        decoder = mocker.MagicMock()
        decoder.get_inputs.return_value = [SimpleNamespace(name="decoder_input", shape=[1, 994])]
        decoder.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
    
        planner = mocker.MagicMock()
        planner.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
    
        inference_session = mocker.patch.object(
            ort,
            "InferenceSession",
            side_effect=[encoder, decoder, planner],
        )
        preload_dlls = mocker.patch.object(ort, "preload_dlls")
        mocker.patch.object(
            ort,
            "get_available_providers",
            return_value=["CUDAExecutionProvider", "CPUExecutionProvider"],
        )
>       instance = SonicPipeline("encoder.onnx", "decoder.onnx", "planner.onnx")

decoder    = <MagicMock id='281045395208000'>
encoder    = <MagicMock id='281045719279488'>
inference_session = <MagicMock name='InferenceSession' id='281045394527856'>
mocker     = <pytest_mock.plugin.MockerFixture object at 0xff9c0e436030>
planner    = <MagicMock id='281045395644656'>
preload_dlls = <MagicMock name='preload_dlls' id='281045394524064'>

.../tasks/g1_sonic_wbc_task/test_sonic_pipeline.py:102: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.../tasks/g1_sonic_wbc_task/sonic_pipeline.py:580: in __init__
    prepare_sonic_onnx_runtime()
        decoder_path = 'decoder.onnx'
        encoder_path = 'encoder.onnx'
        planner_path = 'planner.onnx'
        profile    = 'sonic-v1.1'
        self       = <dimos.control.tasks.g1_sonic_wbc_task.sonic_pipeline.SonicPipeline object at 0xff9bfaf29f40>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def prepare_sonic_onnx_runtime() -> None:
        """Validate CUDA availability and preload packaged libraries when supported."""
        ort_version = str(getattr(ort, "__version__", "unknown"))
        if platform.machine() == "aarch64" and ort_version != JETSON_ORT_VERSION:
>           raise RuntimeError(
                f"SONIC on Jetson requires validated ONNX Runtime {JETSON_ORT_VERSION}; "
                f"found {ort_version}. Run .../hardware/g1/setup-sonic-jp5."
            )
E           RuntimeError: SONIC on Jetson requires validated ONNX Runtime 1.18.1; found 1.24.1. Run .../hardware/g1/setup-sonic-jp5.

ort_version = '1.24.1'

.../tasks/g1_sonic_wbc_task/sonic_onnx_runtime.py:35: RuntimeError
dimos.control.tasks.g1_sonic_wbc_task.test_sonic_pipeline::test_planner_transition_rejects_invalid_duration[0.0]
Stack Traces | 0.004s run time
mocker = <pytest_mock.plugin.MockerFixture object at 0xff9bfad41670>

    @pytest.fixture
    def pipeline(mocker: Any) -> Iterator[SonicPipeline]:
        encoder = mocker.MagicMock()
        encoder.get_inputs.return_value = [
            SimpleNamespace(name="encoder_input", shape=[1, ENCODER_OBS_DIM])
        ]
        encoder.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
        encoder.run.return_value = [np.zeros((1, 64), dtype=np.float32)]
    
        decoder = mocker.MagicMock()
        decoder.get_inputs.return_value = [SimpleNamespace(name="decoder_input", shape=[1, 994])]
        decoder.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
    
        planner = mocker.MagicMock()
        planner.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
    
        inference_session = mocker.patch.object(
            ort,
            "InferenceSession",
            side_effect=[encoder, decoder, planner],
        )
        preload_dlls = mocker.patch.object(ort, "preload_dlls")
        mocker.patch.object(
            ort,
            "get_available_providers",
            return_value=["CUDAExecutionProvider", "CPUExecutionProvider"],
        )
>       instance = SonicPipeline("encoder.onnx", "decoder.onnx", "planner.onnx")

decoder    = <MagicMock id='281045395526656'>
encoder    = <MagicMock id='281045393216800'>
inference_session = <MagicMock name='InferenceSession' id='281045395604784'>
mocker     = <pytest_mock.plugin.MockerFixture object at 0xff9bfad41670>
planner    = <MagicMock id='281045395606032'>
preload_dlls = <MagicMock name='preload_dlls' id='281045397037296'>

.../tasks/g1_sonic_wbc_task/test_sonic_pipeline.py:102: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.../tasks/g1_sonic_wbc_task/sonic_pipeline.py:580: in __init__
    prepare_sonic_onnx_runtime()
        decoder_path = 'decoder.onnx'
        encoder_path = 'encoder.onnx'
        planner_path = 'planner.onnx'
        profile    = 'sonic-v1.1'
        self       = <dimos.control.tasks.g1_sonic_wbc_task.sonic_pipeline.SonicPipeline object at 0xff9c0e3884a0>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def prepare_sonic_onnx_runtime() -> None:
        """Validate CUDA availability and preload packaged libraries when supported."""
        ort_version = str(getattr(ort, "__version__", "unknown"))
        if platform.machine() == "aarch64" and ort_version != JETSON_ORT_VERSION:
>           raise RuntimeError(
                f"SONIC on Jetson requires validated ONNX Runtime {JETSON_ORT_VERSION}; "
                f"found {ort_version}. Run .../hardware/g1/setup-sonic-jp5."
            )
E           RuntimeError: SONIC on Jetson requires validated ONNX Runtime 1.18.1; found 1.24.1. Run .../hardware/g1/setup-sonic-jp5.

ort_version = '1.24.1'

.../tasks/g1_sonic_wbc_task/sonic_onnx_runtime.py:35: RuntimeError
dimos.control.tasks.g1_sonic_wbc_task.test_sonic_pipeline::test_planner_transition_rejects_invalid_duration[inf]
Stack Traces | 0.004s run time
mocker = <pytest_mock.plugin.MockerFixture object at 0xff9bfadae450>

    @pytest.fixture
    def pipeline(mocker: Any) -> Iterator[SonicPipeline]:
        encoder = mocker.MagicMock()
        encoder.get_inputs.return_value = [
            SimpleNamespace(name="encoder_input", shape=[1, ENCODER_OBS_DIM])
        ]
        encoder.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
        encoder.run.return_value = [np.zeros((1, 64), dtype=np.float32)]
    
        decoder = mocker.MagicMock()
        decoder.get_inputs.return_value = [SimpleNamespace(name="decoder_input", shape=[1, 994])]
        decoder.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
    
        planner = mocker.MagicMock()
        planner.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
    
        inference_session = mocker.patch.object(
            ort,
            "InferenceSession",
            side_effect=[encoder, decoder, planner],
        )
        preload_dlls = mocker.patch.object(ort, "preload_dlls")
        mocker.patch.object(
            ort,
            "get_available_providers",
            return_value=["CUDAExecutionProvider", "CPUExecutionProvider"],
        )
>       instance = SonicPipeline("encoder.onnx", "decoder.onnx", "planner.onnx")

decoder    = <MagicMock id='281045394087696'>
encoder    = <MagicMock id='281045393662864'>
inference_session = <MagicMock name='InferenceSession' id='281045393631920'>
mocker     = <pytest_mock.plugin.MockerFixture object at 0xff9bfadae450>
planner    = <MagicMock id='281045393624336'>
preload_dlls = <MagicMock name='preload_dlls' id='281045393770640'>

.../tasks/g1_sonic_wbc_task/test_sonic_pipeline.py:102: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.../tasks/g1_sonic_wbc_task/sonic_pipeline.py:580: in __init__
    prepare_sonic_onnx_runtime()
        decoder_path = 'decoder.onnx'
        encoder_path = 'encoder.onnx'
        planner_path = 'planner.onnx'
        profile    = 'sonic-v1.1'
        self       = <dimos.control.tasks.g1_sonic_wbc_task.sonic_pipeline.SonicPipeline object at 0xff9bfadcb590>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def prepare_sonic_onnx_runtime() -> None:
        """Validate CUDA availability and preload packaged libraries when supported."""
        ort_version = str(getattr(ort, "__version__", "unknown"))
        if platform.machine() == "aarch64" and ort_version != JETSON_ORT_VERSION:
>           raise RuntimeError(
                f"SONIC on Jetson requires validated ONNX Runtime {JETSON_ORT_VERSION}; "
                f"found {ort_version}. Run .../hardware/g1/setup-sonic-jp5."
            )
E           RuntimeError: SONIC on Jetson requires validated ONNX Runtime 1.18.1; found 1.24.1. Run .../hardware/g1/setup-sonic-jp5.

ort_version = '1.24.1'

.../tasks/g1_sonic_wbc_task/sonic_onnx_runtime.py:35: RuntimeError
dimos.control.tasks.g1_sonic_wbc_task.test_sonic_pipeline::test_planner_transition_requires_a_previous_stream_token
Stack Traces | 0.004s run time
mocker = <pytest_mock.plugin.MockerFixture object at 0xff9c0e389670>

    @pytest.fixture
    def pipeline(mocker: Any) -> Iterator[SonicPipeline]:
        encoder = mocker.MagicMock()
        encoder.get_inputs.return_value = [
            SimpleNamespace(name="encoder_input", shape=[1, ENCODER_OBS_DIM])
        ]
        encoder.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
        encoder.run.return_value = [np.zeros((1, 64), dtype=np.float32)]
    
        decoder = mocker.MagicMock()
        decoder.get_inputs.return_value = [SimpleNamespace(name="decoder_input", shape=[1, 994])]
        decoder.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
    
        planner = mocker.MagicMock()
        planner.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
    
        inference_session = mocker.patch.object(
            ort,
            "InferenceSession",
            side_effect=[encoder, decoder, planner],
        )
        preload_dlls = mocker.patch.object(ort, "preload_dlls")
        mocker.patch.object(
            ort,
            "get_available_providers",
            return_value=["CUDAExecutionProvider", "CPUExecutionProvider"],
        )
>       instance = SonicPipeline("encoder.onnx", "decoder.onnx", "planner.onnx")

decoder    = <MagicMock id='281045397043536'>
encoder    = <MagicMock id='281045718574304'>
inference_session = <MagicMock name='InferenceSession' id='281045395605648'>
mocker     = <pytest_mock.plugin.MockerFixture object at 0xff9c0e389670>
planner    = <MagicMock id='281045718495024'>
preload_dlls = <MagicMock name='preload_dlls' id='281045396926256'>

.../tasks/g1_sonic_wbc_task/test_sonic_pipeline.py:102: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.../tasks/g1_sonic_wbc_task/sonic_pipeline.py:580: in __init__
    prepare_sonic_onnx_runtime()
        decoder_path = 'decoder.onnx'
        encoder_path = 'encoder.onnx'
        planner_path = 'planner.onnx'
        profile    = 'sonic-v1.1'
        self       = <dimos.control.tasks.g1_sonic_wbc_task.sonic_pipeline.SonicPipeline object at 0xff9bfae6de20>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def prepare_sonic_onnx_runtime() -> None:
        """Validate CUDA availability and preload packaged libraries when supported."""
        ort_version = str(getattr(ort, "__version__", "unknown"))
        if platform.machine() == "aarch64" and ort_version != JETSON_ORT_VERSION:
>           raise RuntimeError(
                f"SONIC on Jetson requires validated ONNX Runtime {JETSON_ORT_VERSION}; "
                f"found {ort_version}. Run .../hardware/g1/setup-sonic-jp5."
            )
E           RuntimeError: SONIC on Jetson requires validated ONNX Runtime 1.18.1; found 1.24.1. Run .../hardware/g1/setup-sonic-jp5.

ort_version = '1.24.1'

.../tasks/g1_sonic_wbc_task/sonic_onnx_runtime.py:35: RuntimeError
dimos.control.tasks.g1_sonic_wbc_task.test_sonic_pipeline::test_smpl_pose_chunk_populates_all_ten_encoder_frames
Stack Traces | 0.004s run time
mocker = <pytest_mock.plugin.MockerFixture object at 0xff9bfaf754f0>

    @pytest.fixture
    def pipeline(mocker: Any) -> Iterator[SonicPipeline]:
        encoder = mocker.MagicMock()
        encoder.get_inputs.return_value = [
            SimpleNamespace(name="encoder_input", shape=[1, ENCODER_OBS_DIM])
        ]
        encoder.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
        encoder.run.return_value = [np.zeros((1, 64), dtype=np.float32)]
    
        decoder = mocker.MagicMock()
        decoder.get_inputs.return_value = [SimpleNamespace(name="decoder_input", shape=[1, 994])]
        decoder.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
    
        planner = mocker.MagicMock()
        planner.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
    
        inference_session = mocker.patch.object(
            ort,
            "InferenceSession",
            side_effect=[encoder, decoder, planner],
        )
        preload_dlls = mocker.patch.object(ort, "preload_dlls")
        mocker.patch.object(
            ort,
            "get_available_providers",
            return_value=["CUDAExecutionProvider", "CPUExecutionProvider"],
        )
>       instance = SonicPipeline("encoder.onnx", "decoder.onnx", "planner.onnx")

decoder    = <MagicMock id='281045396920976'>
encoder    = <MagicMock id='281045395527232'>
inference_session = <MagicMock name='InferenceSession' id='281045395616160'>
mocker     = <pytest_mock.plugin.MockerFixture object at 0xff9bfaf754f0>
planner    = <MagicMock id='281045395605408'>
preload_dlls = <MagicMock name='preload_dlls' id='281045720017104'>

.../tasks/g1_sonic_wbc_task/test_sonic_pipeline.py:102: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.../tasks/g1_sonic_wbc_task/sonic_pipeline.py:580: in __init__
    prepare_sonic_onnx_runtime()
        decoder_path = 'decoder.onnx'
        encoder_path = 'encoder.onnx'
        planner_path = 'planner.onnx'
        profile    = 'sonic-v1.1'
        self       = <dimos.control.tasks.g1_sonic_wbc_task.sonic_pipeline.SonicPipeline object at 0xff9bfb0e5c70>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def prepare_sonic_onnx_runtime() -> None:
        """Validate CUDA availability and preload packaged libraries when supported."""
        ort_version = str(getattr(ort, "__version__", "unknown"))
        if platform.machine() == "aarch64" and ort_version != JETSON_ORT_VERSION:
>           raise RuntimeError(
                f"SONIC on Jetson requires validated ONNX Runtime {JETSON_ORT_VERSION}; "
                f"found {ort_version}. Run .../hardware/g1/setup-sonic-jp5."
            )
E           RuntimeError: SONIC on Jetson requires validated ONNX Runtime 1.18.1; found 1.24.1. Run .../hardware/g1/setup-sonic-jp5.

ort_version = '1.24.1'

.../tasks/g1_sonic_wbc_task/sonic_onnx_runtime.py:35: RuntimeError
dimos.control.tasks.g1_sonic_wbc_task.test_sonic_pipeline::test_stop_clip_cancels_reference_transition
Stack Traces | 0.004s run time
mocker = <pytest_mock.plugin.MockerFixture object at 0xff9c0e388620>

    @pytest.fixture
    def pipeline(mocker: Any) -> Iterator[SonicPipeline]:
        encoder = mocker.MagicMock()
        encoder.get_inputs.return_value = [
            SimpleNamespace(name="encoder_input", shape=[1, ENCODER_OBS_DIM])
        ]
        encoder.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
        encoder.run.return_value = [np.zeros((1, 64), dtype=np.float32)]
    
        decoder = mocker.MagicMock()
        decoder.get_inputs.return_value = [SimpleNamespace(name="decoder_input", shape=[1, 994])]
        decoder.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
    
        planner = mocker.MagicMock()
        planner.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
    
        inference_session = mocker.patch.object(
            ort,
            "InferenceSession",
            side_effect=[encoder, decoder, planner],
        )
        preload_dlls = mocker.patch.object(ort, "preload_dlls")
        mocker.patch.object(
            ort,
            "get_available_providers",
            return_value=["CUDAExecutionProvider", "CPUExecutionProvider"],
        )
>       instance = SonicPipeline("encoder.onnx", "decoder.onnx", "planner.onnx")

decoder    = <MagicMock id='281045394446704'>
encoder    = <MagicMock id='281045718573488'>
inference_session = <MagicMock name='InferenceSession' id='281045395612368'>
mocker     = <pytest_mock.plugin.MockerFixture object at 0xff9c0e388620>
planner    = <MagicMock id='281045395616592'>
preload_dlls = <MagicMock name='preload_dlls' id='281045396917376'>

.../tasks/g1_sonic_wbc_task/test_sonic_pipeline.py:102: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.../tasks/g1_sonic_wbc_task/sonic_pipeline.py:580: in __init__
    prepare_sonic_onnx_runtime()
        decoder_path = 'decoder.onnx'
        encoder_path = 'encoder.onnx'
        planner_path = 'planner.onnx'
        profile    = 'sonic-v1.1'
        self       = <dimos.control.tasks.g1_sonic_wbc_task.sonic_pipeline.SonicPipeline object at 0xff9bfb102150>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def prepare_sonic_onnx_runtime() -> None:
        """Validate CUDA availability and preload packaged libraries when supported."""
        ort_version = str(getattr(ort, "__version__", "unknown"))
        if platform.machine() == "aarch64" and ort_version != JETSON_ORT_VERSION:
>           raise RuntimeError(
                f"SONIC on Jetson requires validated ONNX Runtime {JETSON_ORT_VERSION}; "
                f"found {ort_version}. Run .../hardware/g1/setup-sonic-jp5."
            )
E           RuntimeError: SONIC on Jetson requires validated ONNX Runtime 1.18.1; found 1.24.1. Run .../hardware/g1/setup-sonic-jp5.

ort_version = '1.24.1'

.../tasks/g1_sonic_wbc_task/sonic_onnx_runtime.py:35: RuntimeError
dimos.control.tasks.g1_sonic_wbc_task.test_sonic_pipeline::test_stream_transition_blends_planner_token_to_each_live_pose_token
Stack Traces | 0.004s run time
mocker = <pytest_mock.plugin.MockerFixture object at 0xff9bfae83e00>

    @pytest.fixture
    def pipeline(mocker: Any) -> Iterator[SonicPipeline]:
        encoder = mocker.MagicMock()
        encoder.get_inputs.return_value = [
            SimpleNamespace(name="encoder_input", shape=[1, ENCODER_OBS_DIM])
        ]
        encoder.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
        encoder.run.return_value = [np.zeros((1, 64), dtype=np.float32)]
    
        decoder = mocker.MagicMock()
        decoder.get_inputs.return_value = [SimpleNamespace(name="decoder_input", shape=[1, 994])]
        decoder.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
    
        planner = mocker.MagicMock()
        planner.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
    
        inference_session = mocker.patch.object(
            ort,
            "InferenceSession",
            side_effect=[encoder, decoder, planner],
        )
        preload_dlls = mocker.patch.object(ort, "preload_dlls")
        mocker.patch.object(
            ort,
            "get_available_providers",
            return_value=["CUDAExecutionProvider", "CPUExecutionProvider"],
        )
>       instance = SonicPipeline("encoder.onnx", "decoder.onnx", "planner.onnx")

decoder    = <MagicMock id='281045412626560'>
encoder    = <MagicMock id='281045394534336'>
inference_session = <MagicMock name='InferenceSession' id='281045719282416'>
mocker     = <pytest_mock.plugin.MockerFixture object at 0xff9bfae83e00>
planner    = <MagicMock id='281045395743104'>
preload_dlls = <MagicMock name='preload_dlls' id='281045395204832'>

.../tasks/g1_sonic_wbc_task/test_sonic_pipeline.py:102: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.../tasks/g1_sonic_wbc_task/sonic_pipeline.py:580: in __init__
    prepare_sonic_onnx_runtime()
        decoder_path = 'decoder.onnx'
        encoder_path = 'encoder.onnx'
        planner_path = 'planner.onnx'
        profile    = 'sonic-v1.1'
        self       = <dimos.control.tasks.g1_sonic_wbc_task.sonic_pipeline.SonicPipeline object at 0xff9bfaf932c0>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def prepare_sonic_onnx_runtime() -> None:
        """Validate CUDA availability and preload packaged libraries when supported."""
        ort_version = str(getattr(ort, "__version__", "unknown"))
        if platform.machine() == "aarch64" and ort_version != JETSON_ORT_VERSION:
>           raise RuntimeError(
                f"SONIC on Jetson requires validated ONNX Runtime {JETSON_ORT_VERSION}; "
                f"found {ort_version}. Run .../hardware/g1/setup-sonic-jp5."
            )
E           RuntimeError: SONIC on Jetson requires validated ONNX Runtime 1.18.1; found 1.24.1. Run .../hardware/g1/setup-sonic-jp5.

ort_version = '1.24.1'

.../tasks/g1_sonic_wbc_task/sonic_onnx_runtime.py:35: RuntimeError
dimos.control.tasks.g1_sonic_wbc_task.test_sonic_pipeline::test_stream_transition_rejects_invalid_duration[-0.1]
Stack Traces | 0.004s run time
mocker = <pytest_mock.plugin.MockerFixture object at 0xff9bfae6e060>

    @pytest.fixture
    def pipeline(mocker: Any) -> Iterator[SonicPipeline]:
        encoder = mocker.MagicMock()
        encoder.get_inputs.return_value = [
            SimpleNamespace(name="encoder_input", shape=[1, ENCODER_OBS_DIM])
        ]
        encoder.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
        encoder.run.return_value = [np.zeros((1, 64), dtype=np.float32)]
    
        decoder = mocker.MagicMock()
        decoder.get_inputs.return_value = [SimpleNamespace(name="decoder_input", shape=[1, 994])]
        decoder.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
    
        planner = mocker.MagicMock()
        planner.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
    
        inference_session = mocker.patch.object(
            ort,
            "InferenceSession",
            side_effect=[encoder, decoder, planner],
        )
        preload_dlls = mocker.patch.object(ort, "preload_dlls")
        mocker.patch.object(
            ort,
            "get_available_providers",
            return_value=["CUDAExecutionProvider", "CPUExecutionProvider"],
        )
>       instance = SonicPipeline("encoder.onnx", "decoder.onnx", "planner.onnx")

decoder    = <MagicMock id='281045395527088'>
encoder    = <MagicMock id='281045394448096'>
inference_session = <MagicMock name='InferenceSession' id='281045395614288'>
mocker     = <pytest_mock.plugin.MockerFixture object at 0xff9bfae6e060>
planner    = <MagicMock id='281045395618656'>
preload_dlls = <MagicMock name='preload_dlls' id='281045718515792'>

.../tasks/g1_sonic_wbc_task/test_sonic_pipeline.py:102: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.../tasks/g1_sonic_wbc_task/sonic_pipeline.py:580: in __init__
    prepare_sonic_onnx_runtime()
        decoder_path = 'decoder.onnx'
        encoder_path = 'encoder.onnx'
        planner_path = 'planner.onnx'
        profile    = 'sonic-v1.1'
        self       = <dimos.control.tasks.g1_sonic_wbc_task.sonic_pipeline.SonicPipeline object at 0xff9bfb0e7bc0>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def prepare_sonic_onnx_runtime() -> None:
        """Validate CUDA availability and preload packaged libraries when supported."""
        ort_version = str(getattr(ort, "__version__", "unknown"))
        if platform.machine() == "aarch64" and ort_version != JETSON_ORT_VERSION:
>           raise RuntimeError(
                f"SONIC on Jetson requires validated ONNX Runtime {JETSON_ORT_VERSION}; "
                f"found {ort_version}. Run .../hardware/g1/setup-sonic-jp5."
            )
E           RuntimeError: SONIC on Jetson requires validated ONNX Runtime 1.18.1; found 1.24.1. Run .../hardware/g1/setup-sonic-jp5.

ort_version = '1.24.1'

.../tasks/g1_sonic_wbc_task/sonic_onnx_runtime.py:35: RuntimeError
dimos.control.tasks.g1_sonic_wbc_task.test_sonic_pipeline::test_stream_transition_rejects_invalid_duration[0.0]
Stack Traces | 0.004s run time
mocker = <pytest_mock.plugin.MockerFixture object at 0xff9bfae6ee10>

    @pytest.fixture
    def pipeline(mocker: Any) -> Iterator[SonicPipeline]:
        encoder = mocker.MagicMock()
        encoder.get_inputs.return_value = [
            SimpleNamespace(name="encoder_input", shape=[1, ENCODER_OBS_DIM])
        ]
        encoder.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
        encoder.run.return_value = [np.zeros((1, 64), dtype=np.float32)]
    
        decoder = mocker.MagicMock()
        decoder.get_inputs.return_value = [SimpleNamespace(name="decoder_input", shape=[1, 994])]
        decoder.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
    
        planner = mocker.MagicMock()
        planner.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
    
        inference_session = mocker.patch.object(
            ort,
            "InferenceSession",
            side_effect=[encoder, decoder, planner],
        )
        preload_dlls = mocker.patch.object(ort, "preload_dlls")
        mocker.patch.object(
            ort,
            "get_available_providers",
            return_value=["CUDAExecutionProvider", "CPUExecutionProvider"],
        )
>       instance = SonicPipeline("encoder.onnx", "decoder.onnx", "planner.onnx")

decoder    = <MagicMock id='281045394876960'>
encoder    = <MagicMock id='281045394451456'>
inference_session = <MagicMock name='InferenceSession' id='281045394699136'>
mocker     = <pytest_mock.plugin.MockerFixture object at 0xff9bfae6ee10>
planner    = <MagicMock id='281045394691360'>
preload_dlls = <MagicMock name='preload_dlls' id='281045720327296'>

.../tasks/g1_sonic_wbc_task/test_sonic_pipeline.py:102: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.../tasks/g1_sonic_wbc_task/sonic_pipeline.py:580: in __init__
    prepare_sonic_onnx_runtime()
        decoder_path = 'decoder.onnx'
        encoder_path = 'encoder.onnx'
        planner_path = 'planner.onnx'
        profile    = 'sonic-v1.1'
        self       = <dimos.control.tasks.g1_sonic_wbc_task.sonic_pipeline.SonicPipeline object at 0xff9bfaea7e00>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def prepare_sonic_onnx_runtime() -> None:
        """Validate CUDA availability and preload packaged libraries when supported."""
        ort_version = str(getattr(ort, "__version__", "unknown"))
        if platform.machine() == "aarch64" and ort_version != JETSON_ORT_VERSION:
>           raise RuntimeError(
                f"SONIC on Jetson requires validated ONNX Runtime {JETSON_ORT_VERSION}; "
                f"found {ort_version}. Run .../hardware/g1/setup-sonic-jp5."
            )
E           RuntimeError: SONIC on Jetson requires validated ONNX Runtime 1.18.1; found 1.24.1. Run .../hardware/g1/setup-sonic-jp5.

ort_version = '1.24.1'

.../tasks/g1_sonic_wbc_task/sonic_onnx_runtime.py:35: RuntimeError
dimos.control.tasks.g1_sonic_wbc_task.test_sonic_pipeline::test_stream_transition_rejects_invalid_duration[inf]
Stack Traces | 0.004s run time
mocker = <pytest_mock.plugin.MockerFixture object at 0xff9c0e3abb30>

    @pytest.fixture
    def pipeline(mocker: Any) -> Iterator[SonicPipeline]:
        encoder = mocker.MagicMock()
        encoder.get_inputs.return_value = [
            SimpleNamespace(name="encoder_input", shape=[1, ENCODER_OBS_DIM])
        ]
        encoder.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
        encoder.run.return_value = [np.zeros((1, 64), dtype=np.float32)]
    
        decoder = mocker.MagicMock()
        decoder.get_inputs.return_value = [SimpleNamespace(name="decoder_input", shape=[1, 994])]
        decoder.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
    
        planner = mocker.MagicMock()
        planner.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
    
        inference_session = mocker.patch.object(
            ort,
            "InferenceSession",
            side_effect=[encoder, decoder, planner],
        )
        preload_dlls = mocker.patch.object(ort, "preload_dlls")
        mocker.patch.object(
            ort,
            "get_available_providers",
            return_value=["CUDAExecutionProvider", "CPUExecutionProvider"],
        )
>       instance = SonicPipeline("encoder.onnx", "decoder.onnx", "planner.onnx")

decoder    = <MagicMock id='281045395203728'>
encoder    = <MagicMock id='281045719271808'>
inference_session = <MagicMock name='InferenceSession' id='281045395213152'>
mocker     = <pytest_mock.plugin.MockerFixture object at 0xff9c0e3abb30>
planner    = <MagicMock id='281045395748672'>
preload_dlls = <MagicMock name='preload_dlls' id='281045394531072'>

.../tasks/g1_sonic_wbc_task/test_sonic_pipeline.py:102: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.../tasks/g1_sonic_wbc_task/sonic_pipeline.py:580: in __init__
    prepare_sonic_onnx_runtime()
        decoder_path = 'decoder.onnx'
        encoder_path = 'encoder.onnx'
        planner_path = 'planner.onnx'
        profile    = 'sonic-v1.1'
        self       = <dimos.control.tasks.g1_sonic_wbc_task.sonic_pipeline.SonicPipeline object at 0xff9bfae83320>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def prepare_sonic_onnx_runtime() -> None:
        """Validate CUDA availability and preload packaged libraries when supported."""
        ort_version = str(getattr(ort, "__version__", "unknown"))
        if platform.machine() == "aarch64" and ort_version != JETSON_ORT_VERSION:
>           raise RuntimeError(
                f"SONIC on Jetson requires validated ONNX Runtime {JETSON_ORT_VERSION}; "
                f"found {ort_version}. Run .../hardware/g1/setup-sonic-jp5."
            )
E           RuntimeError: SONIC on Jetson requires validated ONNX Runtime 1.18.1; found 1.24.1. Run .../hardware/g1/setup-sonic-jp5.

ort_version = '1.24.1'

.../tasks/g1_sonic_wbc_task/sonic_onnx_runtime.py:35: RuntimeError
dimos.control.tasks.g1_sonic_wbc_task.test_sonic_pipeline::test_stream_transition_rejects_invalid_duration[nan]
Stack Traces | 0.004s run time
mocker = <pytest_mock.plugin.MockerFixture object at 0xff9bfaea2960>

    @pytest.fixture
    def pipeline(mocker: Any) -> Iterator[SonicPipeline]:
        encoder = mocker.MagicMock()
        encoder.get_inputs.return_value = [
            SimpleNamespace(name="encoder_input", shape=[1, ENCODER_OBS_DIM])
        ]
        encoder.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
        encoder.run.return_value = [np.zeros((1, 64), dtype=np.float32)]
    
        decoder = mocker.MagicMock()
        decoder.get_inputs.return_value = [SimpleNamespace(name="decoder_input", shape=[1, 994])]
        decoder.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
    
        planner = mocker.MagicMock()
        planner.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
    
        inference_session = mocker.patch.object(
            ort,
            "InferenceSession",
            side_effect=[encoder, decoder, planner],
        )
        preload_dlls = mocker.patch.object(ort, "preload_dlls")
        mocker.patch.object(
            ort,
            "get_available_providers",
            return_value=["CUDAExecutionProvider", "CPUExecutionProvider"],
        )
>       instance = SonicPipeline("encoder.onnx", "decoder.onnx", "planner.onnx")

decoder    = <MagicMock id='281045394761168'>
encoder    = <MagicMock id='281045394663584'>
inference_session = <MagicMock name='InferenceSession' id='281045394812624'>
mocker     = <pytest_mock.plugin.MockerFixture object at 0xff9bfaea2960>
planner    = <MagicMock id='281045394804992'>
preload_dlls = <MagicMock name='preload_dlls' id='281045393476880'>

.../tasks/g1_sonic_wbc_task/test_sonic_pipeline.py:102: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.../tasks/g1_sonic_wbc_task/sonic_pipeline.py:580: in __init__
    prepare_sonic_onnx_runtime()
        decoder_path = 'decoder.onnx'
        encoder_path = 'encoder.onnx'
        planner_path = 'planner.onnx'
        profile    = 'sonic-v1.1'
        self       = <dimos.control.tasks.g1_sonic_wbc_task.sonic_pipeline.SonicPipeline object at 0xff9bfafaaae0>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def prepare_sonic_onnx_runtime() -> None:
        """Validate CUDA availability and preload packaged libraries when supported."""
        ort_version = str(getattr(ort, "__version__", "unknown"))
        if platform.machine() == "aarch64" and ort_version != JETSON_ORT_VERSION:
>           raise RuntimeError(
                f"SONIC on Jetson requires validated ONNX Runtime {JETSON_ORT_VERSION}; "
                f"found {ort_version}. Run .../hardware/g1/setup-sonic-jp5."
            )
E           RuntimeError: SONIC on Jetson requires validated ONNX Runtime 1.18.1; found 1.24.1. Run .../hardware/g1/setup-sonic-jp5.

ort_version = '1.24.1'

.../tasks/g1_sonic_wbc_task/sonic_onnx_runtime.py:35: RuntimeError
dimos.control.tasks.g1_sonic_wbc_task.test_sonic_pipeline::test_stream_transition_requires_a_previous_planner_token
Stack Traces | 0.004s run time
mocker = <pytest_mock.plugin.MockerFixture object at 0xff9bfb0e4ef0>

    @pytest.fixture
    def pipeline(mocker: Any) -> Iterator[SonicPipeline]:
        encoder = mocker.MagicMock()
        encoder.get_inputs.return_value = [
            SimpleNamespace(name="encoder_input", shape=[1, ENCODER_OBS_DIM])
        ]
        encoder.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
        encoder.run.return_value = [np.zeros((1, 64), dtype=np.float32)]
    
        decoder = mocker.MagicMock()
        decoder.get_inputs.return_value = [SimpleNamespace(name="decoder_input", shape=[1, 994])]
        decoder.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
    
        planner = mocker.MagicMock()
        planner.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
    
        inference_session = mocker.patch.object(
            ort,
            "InferenceSession",
            side_effect=[encoder, decoder, planner],
        )
        preload_dlls = mocker.patch.object(ort, "preload_dlls")
        mocker.patch.object(
            ort,
            "get_available_providers",
            return_value=["CUDAExecutionProvider", "CPUExecutionProvider"],
        )
>       instance = SonicPipeline("encoder.onnx", "decoder.onnx", "planner.onnx")

decoder    = <MagicMock id='281045718528176'>
encoder    = <MagicMock id='281045397036384'>
inference_session = <MagicMock name='InferenceSession' id='281045395608384'>
mocker     = <pytest_mock.plugin.MockerFixture object at 0xff9bfb0e4ef0>
planner    = <MagicMock id='281045718821360'>
preload_dlls = <MagicMock name='preload_dlls' id='281045396926736'>

.../tasks/g1_sonic_wbc_task/test_sonic_pipeline.py:102: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.../tasks/g1_sonic_wbc_task/sonic_pipeline.py:580: in __init__
    prepare_sonic_onnx_runtime()
        decoder_path = 'decoder.onnx'
        encoder_path = 'encoder.onnx'
        planner_path = 'planner.onnx'
        profile    = 'sonic-v1.1'
        self       = <dimos.control.tasks.g1_sonic_wbc_task.sonic_pipeline.SonicPipeline object at 0xff9bfaf77e00>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def prepare_sonic_onnx_runtime() -> None:
        """Validate CUDA availability and preload packaged libraries when supported."""
        ort_version = str(getattr(ort, "__version__", "unknown"))
        if platform.machine() == "aarch64" and ort_version != JETSON_ORT_VERSION:
>           raise RuntimeError(
                f"SONIC on Jetson requires validated ONNX Runtime {JETSON_ORT_VERSION}; "
                f"found {ort_version}. Run .../hardware/g1/setup-sonic-jp5."
            )
E           RuntimeError: SONIC on Jetson requires validated ONNX Runtime 1.18.1; found 1.24.1. Run .../hardware/g1/setup-sonic-jp5.

ort_version = '1.24.1'

.../tasks/g1_sonic_wbc_task/sonic_onnx_runtime.py:35: RuntimeError
dimos.control.tasks.g1_sonic_wbc_task.test_sonic_pipeline::test_pipeline_fails_before_loading_models_when_cuda_is_unavailable
Stack Traces | 0.005s run time
mocker = <pytest_mock.plugin.MockerFixture object at 0xff9bfaf935c0>

    def test_pipeline_fails_before_loading_models_when_cuda_is_unavailable(mocker: Any) -> None:
        mocker.patch.object(
            ort,
            "get_available_providers",
            return_value=["CPUExecutionProvider"],
        )
        preload_dlls = mocker.patch.object(ort, "preload_dlls")
        inference_session = mocker.patch.object(ort, "InferenceSession")
    
        with pytest.raises(RuntimeError, match="requires CUDAExecutionProvider"):
>           SonicPipeline("encoder.onnx", "decoder.onnx", "planner.onnx")

inference_session = <MagicMock name='InferenceSession' id='281045395740992'>
mocker     = <pytest_mock.plugin.MockerFixture object at 0xff9bfaf935c0>
preload_dlls = <MagicMock name='preload_dlls' id='281045718302592'>

.../tasks/g1_sonic_wbc_task/test_sonic_pipeline.py:126: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.../tasks/g1_sonic_wbc_task/sonic_pipeline.py:580: in __init__
    prepare_sonic_onnx_runtime()
        decoder_path = 'decoder.onnx'
        encoder_path = 'encoder.onnx'
        planner_path = 'planner.onnx'
        profile    = 'sonic-v1.1'
        self       = <dimos.control.tasks.g1_sonic_wbc_task.sonic_pipeline.SonicPipeline object at 0xff9c0e436a20>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def prepare_sonic_onnx_runtime() -> None:
        """Validate CUDA availability and preload packaged libraries when supported."""
        ort_version = str(getattr(ort, "__version__", "unknown"))
        if platform.machine() == "aarch64" and ort_version != JETSON_ORT_VERSION:
>           raise RuntimeError(
                f"SONIC on Jetson requires validated ONNX Runtime {JETSON_ORT_VERSION}; "
                f"found {ort_version}. Run .../hardware/g1/setup-sonic-jp5."
            )
E           RuntimeError: SONIC on Jetson requires validated ONNX Runtime 1.18.1; found 1.24.1. Run .../hardware/g1/setup-sonic-jp5.

ort_version = '1.24.1'

.../tasks/g1_sonic_wbc_task/sonic_onnx_runtime.py:35: RuntimeError

During handling of the above exception, another exception occurred:

mocker = <pytest_mock.plugin.MockerFixture object at 0xff9bfaf935c0>

    def test_pipeline_fails_before_loading_models_when_cuda_is_unavailable(mocker: Any) -> None:
        mocker.patch.object(
            ort,
            "get_available_providers",
            return_value=["CPUExecutionProvider"],
        )
        preload_dlls = mocker.patch.object(ort, "preload_dlls")
        inference_session = mocker.patch.object(ort, "InferenceSession")
    
>       with pytest.raises(RuntimeError, match="requires CUDAExecutionProvider"):
E       AssertionError: Regex pattern did not match.
E        Regex: 'requires CUDAExecutionProvider'
E        Input: 'SONIC on Jetson requires validated ONNX Runtime 1.18.1; found 1.24.1. Run .../hardware/g1/setup-sonic-jp5.'

inference_session = <MagicMock name='InferenceSession' id='281045395740992'>
mocker     = <pytest_mock.plugin.MockerFixture object at 0xff9bfaf935c0>
preload_dlls = <MagicMock name='preload_dlls' id='281045718302592'>

.../tasks/g1_sonic_wbc_task/test_sonic_pipeline.py:125: AssertionError
dimos.control.tasks.g1_sonic_wbc_task.test_sonic_pipeline::test_pipeline_fails_if_any_model_does_not_activate_cuda
Stack Traces | 0.005s run time
mocker = <pytest_mock.plugin.MockerFixture object at 0xff9c0e3401d0>

    def test_pipeline_fails_if_any_model_does_not_activate_cuda(mocker: Any) -> None:
        cuda_session = mocker.MagicMock()
        cuda_session.get_inputs.return_value = [
            SimpleNamespace(name="input", shape=[1, ENCODER_OBS_DIM])
        ]
        cuda_session.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
        cpu_session = mocker.MagicMock()
        cpu_session.get_providers.return_value = ["CPUExecutionProvider"]
        mocker.patch.object(
            ort,
            "get_available_providers",
            return_value=["CUDAExecutionProvider", "CPUExecutionProvider"],
        )
        mocker.patch.object(ort, "preload_dlls")
        inference_session = mocker.patch.object(
            ort,
            "InferenceSession",
            side_effect=[cuda_session, cuda_session, cpu_session],
        )
    
        with pytest.raises(RuntimeError, match="planner.*did not activate CUDA"):
>           SonicPipeline("encoder.onnx", "decoder.onnx", "planner.onnx")

cpu_session = <MagicMock id='281045718529616'>
cuda_session = <MagicMock id='281045397155056'>
inference_session = <MagicMock name='InferenceSession' id='281045395604064'>
mocker     = <pytest_mock.plugin.MockerFixture object at 0xff9c0e3401d0>

.../tasks/g1_sonic_wbc_task/test_sonic_pipeline.py:156: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.../tasks/g1_sonic_wbc_task/sonic_pipeline.py:580: in __init__
    prepare_sonic_onnx_runtime()
        decoder_path = 'decoder.onnx'
        encoder_path = 'encoder.onnx'
        planner_path = 'planner.onnx'
        profile    = 'sonic-v1.1'
        self       = <dimos.control.tasks.g1_sonic_wbc_task.sonic_pipeline.SonicPipeline object at 0xff9bfb0cac00>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def prepare_sonic_onnx_runtime() -> None:
        """Validate CUDA availability and preload packaged libraries when supported."""
        ort_version = str(getattr(ort, "__version__", "unknown"))
        if platform.machine() == "aarch64" and ort_version != JETSON_ORT_VERSION:
>           raise RuntimeError(
                f"SONIC on Jetson requires validated ONNX Runtime {JETSON_ORT_VERSION}; "
                f"found {ort_version}. Run .../hardware/g1/setup-sonic-jp5."
            )
E           RuntimeError: SONIC on Jetson requires validated ONNX Runtime 1.18.1; found 1.24.1. Run .../hardware/g1/setup-sonic-jp5.

ort_version = '1.24.1'

.../tasks/g1_sonic_wbc_task/sonic_onnx_runtime.py:35: RuntimeError

During handling of the above exception, another exception occurred:

mocker = <pytest_mock.plugin.MockerFixture object at 0xff9c0e3401d0>

    def test_pipeline_fails_if_any_model_does_not_activate_cuda(mocker: Any) -> None:
        cuda_session = mocker.MagicMock()
        cuda_session.get_inputs.return_value = [
            SimpleNamespace(name="input", shape=[1, ENCODER_OBS_DIM])
        ]
        cuda_session.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
        cpu_session = mocker.MagicMock()
        cpu_session.get_providers.return_value = ["CPUExecutionProvider"]
        mocker.patch.object(
            ort,
            "get_available_providers",
            return_value=["CUDAExecutionProvider", "CPUExecutionProvider"],
        )
        mocker.patch.object(ort, "preload_dlls")
        inference_session = mocker.patch.object(
            ort,
            "InferenceSession",
            side_effect=[cuda_session, cuda_session, cpu_session],
        )
    
>       with pytest.raises(RuntimeError, match="planner.*did not activate CUDA"):
E       AssertionError: Regex pattern did not match.
E        Regex: 'planner.*did not activate CUDA'
E        Input: 'SONIC on Jetson requires validated ONNX Runtime 1.18.1; found 1.24.1. Run .../hardware/g1/setup-sonic-jp5.'

cpu_session = <MagicMock id='281045718529616'>
cuda_session = <MagicMock id='281045397155056'>
inference_session = <MagicMock name='InferenceSession' id='281045395604064'>
mocker     = <pytest_mock.plugin.MockerFixture object at 0xff9c0e3401d0>

.../tasks/g1_sonic_wbc_task/test_sonic_pipeline.py:155: AssertionError
dimos.control.tasks.g1_sonic_wbc_task.test_sonic_pipeline::test_planner_transition_rejects_invalid_duration[nan]
Stack Traces | 0.005s run time
mocker = <pytest_mock.plugin.MockerFixture object at 0xff9bfaf28860>

    @pytest.fixture
    def pipeline(mocker: Any) -> Iterator[SonicPipeline]:
        encoder = mocker.MagicMock()
        encoder.get_inputs.return_value = [
            SimpleNamespace(name="encoder_input", shape=[1, ENCODER_OBS_DIM])
        ]
        encoder.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
        encoder.run.return_value = [np.zeros((1, 64), dtype=np.float32)]
    
        decoder = mocker.MagicMock()
        decoder.get_inputs.return_value = [SimpleNamespace(name="decoder_input", shape=[1, 994])]
        decoder.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
    
        planner = mocker.MagicMock()
        planner.get_providers.return_value = [
            "CUDAExecutionProvider",
            "CPUExecutionProvider",
        ]
    
        inference_session = mocker.patch.object(
            ort,
            "InferenceSession",
            side_effect=[encoder, decoder, planner],
        )
        preload_dlls = mocker.patch.object(ort, "preload_dlls")
        mocker.patch.object(
            ort,
            "get_available_providers",
            return_value=["CUDAExecutionProvider", "CPUExecutionProvider"],
        )
>       instance = SonicPipeline("encoder.onnx", "decoder.onnx", "planner.onnx")

decoder    = <MagicMock id='281045394535968'>
encoder    = <MagicMock id='281045395212576'>
inference_session = <MagicMock name='InferenceSession' id='281045395750784'>
mocker     = <pytest_mock.plugin.MockerFixture object at 0xff9bfaf28860>
planner    = <MagicMock id='281045394658160'>
preload_dlls = <MagicMock name='preload_dlls' id='281045718294336'>

.../tasks/g1_sonic_wbc_task/test_sonic_pipeline.py:102: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.../tasks/g1_sonic_wbc_task/sonic_pipeline.py:580: in __init__
    prepare_sonic_onnx_runtime()
        decoder_path = 'decoder.onnx'
        encoder_path = 'encoder.onnx'
        planner_path = 'planner.onnx'
        profile    = 'sonic-v1.1'
        self       = <dimos.control.tasks.g1_sonic_wbc_task.sonic_pipeline.SonicPipeline object at 0xff9c0e34d220>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def prepare_sonic_onnx_runtime() -> None:
        """Validate CUDA availability and preload packaged libraries when supported."""
        ort_version = str(getattr(ort, "__version__", "unknown"))
        if platform.machine() == "aarch64" and ort_version != JETSON_ORT_VERSION:
>           raise RuntimeError(
                f"SONIC on Jetson requires validated ONNX Runtime {JETSON_ORT_VERSION}; "
                f"found {ort_version}. Run .../hardware/g1/setup-sonic-jp5."
            )
E           RuntimeError: SONIC on Jetson requires validated ONNX Runtime 1.18.1; found 1.24.1. Run .../hardware/g1/setup-sonic-jp5.

ort_version = '1.24.1'

.../tasks/g1_sonic_wbc_task/sonic_onnx_runtime.py:35: RuntimeError
dimos.codebase_checks.test_docs_branding::test_docs_use_current_branding
Stack Traces | 0.015s run time
def test_docs_use_current_branding() -> None:
        """Fail if any file under docs/ spells the brand "DimOS" instead of "dimOS"."""
        hits = find_old_branding()
        if hits:
            listing = "\n".join(
                f"  - {p.relative_to(DIMOS_PROJECT_ROOT)}:{lineno}: {line.strip()}"
                for p, lineno, line in hits
            )
>           raise AssertionError(f'Found "DimOS" in docs/:\n{listing}\n\nThe brand is spelled "dimOS".')
E           AssertionError: Found "DimOS" in docs/:
E             - .../humanoid/g1/index.md:142: DimOS also provides an experimental ONNX Runtime path for the original G1 PC2
E             - .../humanoid/g1/index.md:232: physical stop, one wearing the PICO, and one at the DimOS terminal. Do not run
E             - .../humanoid/g1/index.md:349: SONIC inference runs at 50 Hz. The SONIC blueprint is Zenoh-only inside DimOS:
E             - .../humanoid/g1/index.md:375: not stream the G1 model, sensors, or other DimOS topics. The bridge retains only
E             - .../humanoid/g1/index.md:442: DimOS uses ONNX Runtime's CUDA 12 build and preloads its CUDA 12/cuDNN 9
E           
E           The brand is spelled "dimOS".

hits       = [(PosixPath('/home/runner/work/dimos/dimos/.../humanoid/g1/index.md'), 142, 'DimOS also provides an experim....../humanoid/g1/index.md'), 442, "DimOS uses ONNX Runtime's CUDA 12 build and preloads its CUDA 12/cuDNN 9")]
listing    = "  - .../humanoid/g1/index.md:142: DimOS also provides an experimental ONNX Runtime path for the original G...n  - .../humanoid/g1/index.md:442: DimOS uses ONNX Runtime's CUDA 12 build and preloads its CUDA 12/cuDNN 9"

dimos/codebase_checks/test_docs_branding.py:43: AssertionError
dimos.manipulation.planning.spec.test_config::test_robot_model_survives_blueprint_config_round_trip
Stack Traces | 0.129s run time
tmp_path = PosixPath('.../pytest-0/popen-gw3/test_robot_model_survives_blue0')

    def test_robot_model_survives_blueprint_config_round_trip(tmp_path: Path) -> None:
        urdf = tmp_path / "robot.urdf"
        urdf.write_text("<robot name='arm'><link name='base'/></robot>")
        config = RobotModelConfig(
            model=RobotModel.from_file(urdf),
            joint_names=[],
        )
        blueprint = ManipulationModule.blueprint(model=config)
    
        parsed = BlueprintConfigParser(blueprint).parse(environ={})
    
        kwargs = parsed.module_kwargs(blueprint.blueprints[0].name)
>       assert kwargs["model"]["model"]["_source_path"] == urdf
E       TypeError: 'RobotModelConfig' object is not subscriptable

blueprint  = Blueprint(blueprints=(BlueprintAtom(kwargs={'model': RobotModelConfig(rpc_transport=<class 'dimos.protocol.rpc.zenohrp...lobal_config_overrides=mappingproxy({}), remapping_map=mappingproxy({}), requirement_checks=(), configurator_checks=())
config     = RobotModelConfig(rpc_transport=<class 'dimos.protocol.rpc.zenohrpc.ZenohRPC'>, default_rpc_timeout=120.0, rpc_timeouts...0.1, open_margin=0.05, open_tolerance=0.15, timeout=3.0, poll_interval=0.05, settle_tolerance=0.005, settle_samples=3))
kwargs     = {'model': RobotModelConfig(rpc_transport=<class 'dimos.protocol.rpc.zenohrpc.ZenohRPC'>, default_rpc_timeout=120.0, rp....1, open_margin=0.05, open_tolerance=0.15, timeout=3.0, poll_interval=0.05, settle_tolerance=0.005, settle_samples=3))}
parsed     = ParsedBlueprintConfig()
tmp_path   = PosixPath('.../pytest-0/popen-gw3/test_robot_model_survives_blue0')
urdf       = PosixPath('.../pytest-0/popen-gw3/test_robot_model_survives_blue0/robot.urdf')

.../planning/spec/test_config.py:35: TypeError
dimos.protocol.pubsub.test_spec::test_unsubscribe_nonblocking_during_dispatch[zenoh_pickle_context-topic5-values5]
Stack Traces | 2.02s run time
pubsub_context = <function zenoh_pickle_context at 0xffeb080b3ec0>
topic = Topic(topic='.../test/spec/pickle', lcm_type=None, queue_capacity=10000)
values = [{'key': 'value1'}, {'key': 'value2'}, {'key': 'value3'}]

    @pytest.mark.parametrize("pubsub_context, topic, values", testdata)
    def test_unsubscribe_nonblocking_during_dispatch(
        pubsub_context: Callable[[], Any], topic: Any, values: list[Any]
    ) -> None:
        """unsubscribe() must not wait for an in-flight callback.
    
        Unsubscribing threads may be ones the system needs for progress (an
        asyncio event loop tearing down a module); a dispatch thread stuck in a
        slow callback must not be able to wedge them.
        """
        with pubsub_context() as x:
            in_callback = threading.Event()
            release = threading.Event()
    
            def slow_callback(message: Any, topic: Any) -> None:
                in_callback.set()
                release.wait(timeout=10.0)
    
            unsubscribe = x.subscribe(topic, slow_callback)
    
            # Publish from a helper thread: in-process backends dispatch
            # synchronously on the publishing thread.
            publisher = threading.Thread(target=x.publish, args=(topic, values[0]), daemon=True)
            publisher.start()
            assert in_callback.wait(timeout=5.0), "callback was never dispatched"
    
            unsubscribed = threading.Event()
    
            def do_unsubscribe() -> None:
                unsubscribe()
                unsubscribed.set()
    
            unsubscriber = threading.Thread(target=do_unsubscribe, daemon=True)
            unsubscriber.start()
            try:
>               assert unsubscribed.wait(timeout=2.0), (
                    "unsubscribe blocked behind an in-flight callback"
                )
E               AssertionError: unsubscribe blocked behind an in-flight callback
E               assert False
E                +  where False = wait(timeout=2.0)
E                +    where wait = <threading.Event at 0xffeaf8c40980: unset>.wait

do_unsubscribe = <function test_unsubscribe_nonblocking_during_dispatch.<locals>.do_unsubscribe at 0xffeaf8be36a0>
in_callback = <threading.Event at 0xffeaf8c53230: set>
publisher  = <Thread(Thread-517 (publish), stopped daemon 281384563175808)>
pubsub_context = <function zenoh_pickle_context at 0xffeb080b3ec0>
release    = <threading.Event at 0xffeaf8c53410: set>
slow_callback = <function test_unsubscribe_nonblocking_during_dispatch.<locals>.slow_callback at 0xffeaf8be2660>
topic      = Topic(topic='.../test/spec/pickle', lcm_type=None, queue_capacity=10000)
unsubscribe = <function ZenohPubSubBase.subscribe.<locals>.unsubscribe at 0xffeaf8be1e40>
unsubscribed = <threading.Event at 0xffeaf8c40980: set>
unsubscriber = <Thread(Thread-518 (do_unsubscribe), stopped daemon 281384563175808)>
values     = [{'key': 'value1'}, {'key': 'value2'}, {'key': 'value3'}]
x          = <dimos.protocol.pubsub.impl.zenohpubsub.PickleZenoh object at 0xffeaf8c53380>

.../protocol/pubsub/test_spec.py:309: AssertionError
dimos.protocol.pubsub.test_spec::test_unsubscribe_nonblocking_during_dispatch[zenoh_lcm_context-topic4-values4]
Stack Traces | 2.51s run time
pubsub_context = <function zenoh_lcm_context at 0xffeb080b3d80>
topic = Topic(topic='dimos/test/spec', lcm_type=<class 'dimos.msgs.geometry_msgs.Vector3.Vector3'>, queue_capacity=10000)
values = [Vector([          1           2           3]), Vector([          4           5           6]), Vector([          7           8           9])]

    @pytest.mark.parametrize("pubsub_context, topic, values", testdata)
    def test_unsubscribe_nonblocking_during_dispatch(
        pubsub_context: Callable[[], Any], topic: Any, values: list[Any]
    ) -> None:
        """unsubscribe() must not wait for an in-flight callback.
    
        Unsubscribing threads may be ones the system needs for progress (an
        asyncio event loop tearing down a module); a dispatch thread stuck in a
        slow callback must not be able to wedge them.
        """
        with pubsub_context() as x:
            in_callback = threading.Event()
            release = threading.Event()
    
            def slow_callback(message: Any, topic: Any) -> None:
                in_callback.set()
                release.wait(timeout=10.0)
    
            unsubscribe = x.subscribe(topic, slow_callback)
    
            # Publish from a helper thread: in-process backends dispatch
            # synchronously on the publishing thread.
            publisher = threading.Thread(target=x.publish, args=(topic, values[0]), daemon=True)
            publisher.start()
            assert in_callback.wait(timeout=5.0), "callback was never dispatched"
    
            unsubscribed = threading.Event()
    
            def do_unsubscribe() -> None:
                unsubscribe()
                unsubscribed.set()
    
            unsubscriber = threading.Thread(target=do_unsubscribe, daemon=True)
            unsubscriber.start()
            try:
>               assert unsubscribed.wait(timeout=2.0), (
                    "unsubscribe blocked behind an in-flight callback"
                )
E               AssertionError: unsubscribe blocked behind an in-flight callback
E               assert False
E                +  where False = wait(timeout=2.0)
E                +    where wait = <threading.Event at 0xffeaf8c53890: unset>.wait

do_unsubscribe = <function test_unsubscribe_nonblocking_during_dispatch.<locals>.do_unsubscribe at 0xffeaf8be2980>
in_callback = <threading.Event at 0xffeaf8c52d20: set>
publisher  = <Thread(Thread-514 (publish), stopped daemon 281384563175808)>
pubsub_context = <function zenoh_lcm_context at 0xffeb080b3d80>
release    = <threading.Event at 0xffeaf8c53290: set>
slow_callback = <function test_unsubscribe_nonblocking_during_dispatch.<locals>.slow_callback at 0xffeaf8be2520>
topic      = Topic(topic='dimos/test/spec', lcm_type=<class 'dimos.msgs.geometry_msgs.Vector3.Vector3'>, queue_capacity=10000)
unsubscribe = <function ZenohPubSubBase.subscribe.<locals>.unsubscribe at 0xffeaf8be2840>
unsubscribed = <threading.Event at 0xffeaf8c53890: set>
unsubscriber = <Thread(Thread-515 (do_unsubscribe), stopped daemon 281384563175808)>
values     = [Vector([          1           2           3]), Vector([          4           5           6]), Vector([          7           8           9])]
x          = <dimos.protocol.pubsub.impl.zenohpubsub.Zenoh object at 0xffeaf8c52ed0>

.../protocol/pubsub/test_spec.py:309: AssertionError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

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